Commit Graph
4844 Commits
Author SHA1 Message Date
Combiler01 1d8bc156e5 fix(ui): read pointer state through PagePointer in canvas and edit_text_ui 2026-10-25 18:29:28 +05:30
Combiler01 8e95a63e98 Merge remote-tracking branch 'upstream/main' into main 2026-10-25 17:49:11 +05:30
Combiler01 0ef72966e5 Address review findings: context menu permissions, font submenu, parity notes, and lockfile
- Grey out restricted page context-menu actions (editing, annotation, assembly, printing) on protected PDFs.
- Group installed fonts by family with search, max height, and scroll area in the format panel. Prevent row cutoff in font dropdown.
- Document Unicode character conversion behavior for superscript and subscript in parity notes.
- Revert unintended clipboard-win bump in Cargo.lock back to 5.4.1.
2026-10-25 17:04:56 +05:30
Combiler01 b8b07d0a99 Re-resolve image selection by XObject and rect across undo/redo
When undoing or redoing an edit (such as Arrange), re-resolve any active image selection to match the same image's XObject, name, and position rather than leaving the selection stuck on the old index (which could point to another image). If ambiguous or no longer present, clear the selection.
2026-10-25 16:47:24 +05:30
Combiler01 fa213cfad0 fix(ui): show selection font/size in format panel and add missing accessibility labels 2026-10-25 16:16:59 +05:30
Claude f75af23d4e M6: deleting a radio button turns the group off when no button left shows its choice
CodeRabbit on #4631: a twin with the same on-state name that is currently
off does not keep the choice visible, so compare the remaining buttons'
appearance state (/AS), not their on-state name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LymhVaGZCWwB9HNEbLzeMM
2026-10-25 10:26:51 +00:00
RiceDee e6e57a9a07 fix(ui): formatting restarts a text box's history; the menu claims the box first
Three holes in the shared text box's history:

- Formatting applied with the paragraph open left typing_from as it
  was, so when the format left the text unchanged the box kept its
  history, and Redo put typing undone before the format back on top of
  it. applied() now resets typing_from, so the next claim clears it.
- Undo or Redo from the menu in the same frame as a tab switch ran
  before the box was drawn, on the history of the other tab's box: Undo
  put tab B's text into tab A's box, and Redo put A's undone typing into
  B's. undo_in_page_box and redo_in_page_box now make the box claim the
  text box first (claim_typing), as drawing it does.
- A box new to the text box cleared only the last box's history and
  kept its caret and selection; it now starts from a default state.

claim_typing on LineEditor and TextDraft is now the one way a box takes
the text box, for drawing and for the menu.

Carried from #4179 (aa326f37). On this branch the rows' alignments by
text restart with the history, so a Redo past a format can't bring
back an alignment from before it.
2026-10-25 21:22:57 +11:00
RiceDee aa326f37cd fix(ui): formatting restarts a text box's history; the menu claims the box first
Three holes in the shared text box's history:

- Formatting applied with the paragraph open left typing_from as it
  was, so when the format left the text unchanged the box kept its
  history, and Redo put typing undone before the format back on top of
  it. applied() now resets typing_from, so the next claim clears it.
- Undo or Redo from the menu in the same frame as a tab switch ran
  before the box was drawn, on the history of the other tab's box: Undo
  put tab B's text into tab A's box, and Redo put A's undone typing into
  B's. undo_in_page_box and redo_in_page_box now make the box claim the
  text box first (claim_typing), as drawing it does.
- A box new to the text box cleared only the last box's history and
  kept its caret and selection; it now starts from a default state.

claim_typing on LineEditor and TextDraft is now the one way a box takes
the text box, for drawing and for the menu.
2026-10-25 21:15:26 +11:00
Combiler01 42b2a3ebdb fix(fonts): subset added TrueType fonts to used glyphs on document save 2026-10-25 15:35:28 +05:30
Lcoding15 e3662af3a5 M6: Delete removes one selected radio button, not its whole group (#4609)
Prepare Form deletes the selected widget: one radio button of a group or
one copy of a duplicated field, as Acrobat does; a field's last widget
takes the field with it. The widget leaves its page, the field's /Kids
and /CO; a per-widget /Opt loses its entry, and a group that was on only
through it turns Off. form_delete_field takes an optional widget.
2026-10-25 10:56:17 +01:00
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
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
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
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
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
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
vangel76andClaude Sonnet 5.5 0f64d9589e Run rustfmt on the mode bar after the upstream merge
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 21:45:07 +02:00
vangel76andClaude Sonnet 5.5 cb30754975 Merge upstream/main into feat/redact-mark-regex
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 21:13:31 +02:00