Commit Graph
6348 Commits
Author SHA1 Message Date
Combiler01 4696dd2f42 fix(engine): enforce font discovery total budget before file reads and limit after sort 2026-10-25 15:07:47 +05:30
vangel76andClaude Sonnet 5.5 589c4af8e7 Redact regex: fail when a page exceeds the match cap
UserRegex::find now returns an error instead of silently stopping at
10,000 matches, so redact_mark cannot report success while later matches
stay readable. Empty-match detection probes several short texts so
patterns like \b are refused with the clear message. Schema notes that
the 1024 limit is in bytes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 10:19:17 +01:00
vangel76 5925539221 Merge remote-tracking branch 'upstream/main' into feat/redact-mark-regex 2026-10-25 10:13:28 +01:00
RiceDee bfc6f8b1b9 fix(ui): a text box keeps its typing history through a trip to another tab
The tabs share one text box, and its Undo history was cleared whenever
another document's box took it: opening a paragraph in tab B wiped tab
A's typing steps, so Edit ▸ Undo back in A found none and closed A's
paragraph instead of taking the typing back. The box being left now
keeps a copy of its history and caret aside, under its document, and
the same box gets it back on its return; a box new to the text box
still starts with none, so typing still never reaches another tab. The
copy is a deep one: a state's history is shared between its clones.

Carried from #4179 (abc378c0). On this branch the rows' alignments by
text go aside and come back with the history, so Undo after the trip
still restores a deleted row's alignment.
2026-10-25 19:19:20 +11:00
Combiler01 338211cdbf fix(edit): preserve clipping and graphics state when rearranging marked content 2026-10-25 13:46:48 +05:30
RiceDee abc378c0bb fix(ui): a text box keeps its typing history through a trip to another tab
The tabs share one text box, and its Undo history was cleared whenever
another document's box took it: opening a paragraph in tab B wiped tab
A's typing steps, so Edit ▸ Undo back in A found none and closed A's
paragraph instead of taking the typing back. The box being left now
keeps a copy of its history and caret aside, under its document, and
the same box gets it back on its return; a box new to the text box
still starts with none, so typing still never reaches another tab. The
copy is a deep one: a state's history is shared between its clones.
2026-10-25 19:10:46 +11:00
alehelandClaude Opus 5.5 e71a946c0f fix(edit): a backdrop is only a fill the graphics state paints plain white
Review of #2815 (FredApps): two ways the detector took real content for a
page's own white backdrop and replaced it by default.

- A `gs` sets only the keys its dictionary has, but each one replaced the
  whole opacity decision and read every key it left out as its default,
  so `/Transparent gs /LineOnly gs 1 g ... re f` (ca 0.5, then only a
  line width) counted as opaque. Fill alpha, soft mask and blend mode are
  now kept one by one, through `gs` and `q`/`Q`.
- A transfer function was never read: TR or TR2 mapping 1 to 0 paints
  `1 g` black, and the fill was still replaced. The transfer function is
  tracked too, TR2 over TR in the same dictionary, and only /Identity
  (and /Default for TR2) counts; anything else leaves the fill alone.

Tests: nine graphics states that must keep the fill (each also checks Add
Background leaves the content as it was) and nine that still find the
backdrop (keys set back, TR2 /Default over a TR function, q/Q restoring),
plus an end-to-end render of the reviewer's translucent case under a red
background. All the keep cases fail on the code before this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 08:31:05 +01:00
RiceDee c9abf15e7c fix(edit): only a row aligned on its own is rewritten
A nonempty aligns counted as a style change, so every row of the
paragraph was rebuilt from the text state: rows left unselected lost
their source operators, and with TJ word gaps their words moved by
about a point and a half while the row's outer width stayed the same.
aligns no longer makes an edit non-plain; a row whose own line has an
alignment override is rewritten, and the others keep their operators.
2026-10-25 16:57:41 +11:00
RiceDee 2f50e1fde7 fix(ui): typing Undo brings back a deleted row's alignment
egui's typing history keeps only text and caret, so Undo bringing back
a deleted row or line (added text, or a paragraph) gave it the
alignment of the row before it, and finishing the box could save that.
Each page box now keeps the texts it has shown through its own typing,
with every row's alignment then (follow_typing): Undo or Redo back to
one of them restores those alignments, and a new text follows the edit
with remap. An alignment picked since makes the older ones stale; they
are dropped, so Undo never takes back a pick. The record is cleared
with the box's typing history and holds 100 texts, as egui's does. It
covers typing, the keys and the menu's Undo and Redo.

On this branch the two-tab test also runs the menu's Redo in the copy,
where the box, with no Redo of its own, passes the step on and closes;
that step no longer requires the editor to stay open.

Also carries #4179's stronger two-tab test (dd47c4f9): the copy's
paragraph must be open before the key Redo and after it.
2026-10-25 15:48:04 +11:00
RiceDee b7f7b27f8f fix(ui): menu Undo takes back typing in the open text box first
Edit ▸ Undo with typing in a paragraph or added text box that the page
doesn't have yet applied the typing (a new edit, which dropped the
document's waiting Redo), closed the box and undid the typing all at
once; the key takes it back a step at a time in the box. Menu Undo now
goes to the box first, as Redo does, and is enabled while the box holds
such typing. Undo and Redo share typing_step for the box's own history.
2026-10-25 15:28:38 +11:00
RiceDee 6901f66876 Merge main into feat/align-selected-lines
Main took integration batch 6 (#4566). Conflict in edit_text_ui.rs: the
overlay keeps this PR's view_id with main's interact_pos comment. The
two TextDraft literals from #4441's tests take selection and
typing_from.
2026-10-25 15:25:11 +11:00
jonathanwxh-cell 522653d6b1 fix(organize,print): join /Contents array pieces with a space (#3502) 2026-10-25 12:03:40 +08:00
PerchAnton 54423364bb fix: integrate current main for PR #2778 2026-10-25 06:02:43 +02:00
aiongg 418ac6a2af fix(ui): the page ignores the pointer while a panel is being dragged (#4581) 2026-10-24 22:12:46 -04:00
Claude 4c09747773 M4: bookmarks from text styles need copying permission and keep columns apart (#1693)
CodeRabbit on #4560:
- The bookmark titles are the document's text, so the edit now needs
  copying permission as well as assembly, and Document::text_styles (the
  dialog's samples) is empty when copying is withheld; the automation
  text_styles tool already checked it.
- A heading went on to the next row whenever it was close below in the
  same style, so same-style headings in two columns on staggered rows ran
  together into one bookmark. A line continues a heading only when it lies
  under it.
- Lines found their style by a scan over every style so far; they are now
  indexed by font, weight, slant and quarter-point size, so a page with
  thousands of styles no longer makes the scan quadratic.

Regression tests for the first two (each fails without its fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LymhVaGZCWwB9HNEbLzeMM
2026-10-25 01:14:19 +00:00
jonathanwxh-cell 24edde6563 forms: clear typed XFA password field values from datasets on save (#3944) (#4506) 2026-10-24 21:08:21 -04:00
Dylan M. Taylor aa9a9105fc fix(redact): remove AcroForm on Hidden::FormFields even when field count is zero (#4571)
* fix(redact): remove AcroForm on Hidden::FormFields even when field count is zero

* fix(redact): report AcroForm presence in scan() and format
2026-10-24 21:07:16 -04:00
Dylan M. Taylor 4c69b8cf88 fix(forms): align has_password_flag traversal depth with field enumeration (#4570)
* fix(forms): align has_password_flag traversal depth with field enumeration

* fix(forms): extend field_chain depth to 64 and fix test formatting
2026-10-24 21:07:09 -04:00
Dylan M. Taylor f4f91d0d5c fix(xfa): require full save when stripping XFA packets (#4568) 2026-10-24 21:03:25 -04:00
Eric Kaden 9def3415b7 Merge remote-tracking branch 'upstream/main' into fix/choice-list-popup
# Conflicts:
#	crates/ui-egui/src/editing.rs
#	crates/ui-egui/src/forms_ui.rs
2026-10-24 20:50:51 -04:00
Eric Kaden 87eb5835e5 Merge remote-tracking branch 'upstream/main' into feat/sign-tab-empty-signature-fields
# Conflicts:
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/forms_ui.rs
2026-10-24 20:43:09 -04:00
Eric Kaden 1591b6b655 Merge remote-tracking branch 'upstream/main' into fix/xfa-enter-exit-on-focus 2026-10-24 20:40:39 -04:00
RiceDee 08ec1db79b Merge main into fix/undo-in-open-text-editor
Main took integration batch 6 (#4566). Conflict in edit_text_ui.rs: the
overlay keeps this PR's view_id and main's switch to interact_pos for
clicks outside the document.
2026-10-25 11:36:47 +11:00
Eric Kaden af27c3a290 M12: Revert drops the focus without running the field's exit
Revert closed the field editor but kept the record of which field had the focus, so the next frame ran that field's exit on the reverted document and made it unsaved again. The record is cleared with the editor, and the engine forgets the exits that changes ran, as undo does.
2026-10-24 20:30:04 -04:00
aiongg c28d1c8e22 Merge pull request #4566 from aiongg/r4-batch
Integration batch 6: 6 contributor PRs (All tools view, page pointer, comments, redaction, Properties, Home)
2026-10-24 20:24:05 -04:00
Eric Kaden 6a1e089a49 M12: committing the form runs the focus scripts of a move not yet run
Save, Print, Export, Sign and the other commands commit the form first. A focus move made in the same frame (or the editor they close) ran its enter and exit scripts only afterwards, so the document they read lacked what those scripts change. commit_form_typing now runs them before it returns. Also words the comment on noted exits so a failed exit reads as run.
2026-10-24 20:12:24 -04:00
aiongg 0140f1047c Integration: the page input guard also catches egui's per-button pointer reads (#2685) 2026-10-24 23:56:44 +00:00
aiongg c276f92b54 Integration: the roadmap entry for comment threads says what the count counts (#4061) 2026-10-24 23:55:17 +00:00
aiongg 756660f6d2 Integration: the arrow keys leave a reply to an unnamed comment where it is (#4061) 2026-10-24 23:55:10 +00:00
Eric Kaden aad694b6ad M12: a widget index the field doesn't have runs no focus scripts
widget_som fell back to the field's own SOM path for an index out of range, so for a radio field it ran the group's scripts. It now returns None unless the field has that widget.
2026-10-24 19:49:52 -04:00
Eric Kaden 0a6d8fe775 Merge remote-tracking branch 'upstream/main' into fix/xfa-enter-exit-on-focus 2026-10-24 19:30:03 -04:00
aiongg 80d8c60ac2 Integration: no link or comment tip beside the open palette (#2685) 2026-10-24 23:23:47 +00:00
aiongg bb06649527 Integration: two comments whose /IRTs point at each other stay comments of their own (#4061) 2026-10-24 23:23:47 +00:00
aiongg e0c319d273 Integration: a comment listed through a reference chain keeps its replies after an edit (#4061) 2026-10-24 23:18:59 +00:00
Lcoding15 4ce68f517b M4: New bookmarks from text styles, for headings that aren't tagged (#1693)
Bookmark options > New bookmarks from text styles... lists the styles the
document's text is set in (font without its subset tag, the size shown,
bold, italic, how many lines, a sample), the largest first, and takes one
style per bookmark level. Every line in a level's style becomes a
bookmark of that level under a new first "Untitled" bookmark, as from
structure; a heading set on several rows is one bookmark, and each goes
to the top of its heading.

The detection lives in engine::text_style_bookmarks on top of
edit::text_lines, reading each page top to bottom then left to right, so
two headings on one row stay two. text_styles and
bookmark_from_text_styles reach it headlessly, and the command
bookmark.from_text_styles opens the dialog. OutlineEntry gets an
optional top for the /XYZ destination; structure bookmarks keep theirs.
2026-10-25 01:03:08 +02:00
aiongg 73240d978f Integration: M3: All tools expands to a full, searchable view (#2460) 2026-10-24 22:48:11 +00:00
aiongg e5005f062a Integration: fix(ui): one page pointer per frame, so taps work and nothing over a page lets it through (#2685) 2026-10-24 22:48:11 +00:00
aiongg d821f91001 Integration: fix(comments): thread replies by their /IRT reference, count comments like Acrobat (#4061) 2026-10-24 22:48:11 +00:00
aiongg f94b34adc9 Integration: fix(redact,cos): cleared redaction marks leave nothing behind (#4226) 2026-10-24 22:48:11 +00:00
aiongg 78dbea442e Integration: M3: the community card on Home can be closed for the rest of the run (#2617) 2026-10-24 22:34:42 +00:00
aiongg 808fe853d6 Integration: fix(ui): Document Properties layout, Space Audit tab, no page cursors under dialogs (#2556) 2026-10-24 22:34:42 +00:00
RiceDee dd47c4f9e1 test(ui): the two-tab Redo test checks the copy's paragraph stays open
If the copy's editor had closed before or during Redo, the check for the
other tab's typing passed on an empty text. It now requires the editor
to be open before Redo and after it.
2026-10-25 08:56:55 +11:00
RiceDee f3b61b73b0 style: rustfmt the two TextDraft test literals that took typing_from 2026-10-25 08:41:17 +11:00
RiceDee dd6e86b6cb Merge pull request #1 from aiongg/fix-4179-main
Merge main; set typing_from in two tests from #4441
2026-10-25 08:37:19 +11:00
RiceDee b9035271b0 fix(ui): menu Undo takes back typing in the open text box first
Edit ▸ Undo with typing in a paragraph or added text box that the page
doesn't have yet applied the typing (a new edit, which dropped the
document's waiting Redo), closed the box and undid the typing all at
once; the key takes it back a step at a time in the box. Menu Undo now
goes to the box first, as Redo does, and is enabled while the box holds
such typing. Undo and Redo share typing_step for the box's own history.
2026-10-25 08:36:17 +11:00
alehelandClaude Opus 5.5 120de553ab fix(ui): the Background preview follows the Replace checkbox
The dialog previews a colour as a tint of the page's thumbnail (main's #3009). It tinted every
page, so with Replace unticked a page that keeps its own white backdrop previewed coloured,
though OK leaves it white. A page a picture covers (a scan) previewed coloured too.

background_tint() now shows no colour where the page will still hide the background after OK:
a scan, or a white backdrop with Replace unticked. It reads the page from the dialog's backdrop
check (BackdropCheck::found, for the current version of the document only); a page the check
hasn't reached yet previews coloured, as before.

Tests, both seen failing with the fix reverted:
- marks_ui::tests::the_preview_shows_a_background_only_where_ok_lets_it_show (the rule);
- it::marks::the_background_preview_follows_the_replace_checkbox (what the dialog paints, per
  page, ticked and unticked).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 23:06:34 +02:00
Eric Kaden 0b7839d1e3 M12: the page-number assignment scan reads a bounded number of bounded expressions 2026-10-24 16:17:13 -04:00
Eric Kaden 9b5598b071 M12: a layout:ready assignment written over several lines is read whole 2026-10-24 16:10:18 -04:00
Eric Kaden ba33e3c432 M12: the required-fields test checks that radio buttons carry no Required flag of their own 2026-10-24 16:08:36 -04:00
Eric Kaden 2cdc785c60 M12: only a field its layout:ready script gives a page call's result is numbered by the layout 2026-10-24 15:50:52 -04:00