Skip to content

Accept w:delInstrText, the deleted counterpart of w:instrText - #256

Open
ikashapov wants to merge 1 commit into
nerdy-pro:mainfrom
ikashapov:issue-253-del-instr-text
Open

ikashapov wants to merge 1 commit into
nerdy-pro:mainfrom
ikashapov:issue-253-del-instr-text

Conversation

@ikashapov

Copy link
Copy Markdown
Contributor

Accept w:delInstrText, the deleted counterpart of w:instrText

Closes #253.

§17.16.13: Word writes w:delInstrText for the instruction of a field deleted while changes are tracked, exactly as it writes w:delText for deleted text. The element was not among the run-content variants, so the whole document was rejected — "unknown variant delInstrText" — while a deleted word parsed fine. Any affidavit, contract or report with a field removed under tracking failed to convert at all.

Change

Accept the element and draw nothing. The run it sits in is inside a w:del, which the paragraph walk already drops wholesale; and were a deleted run ever kept, a deleted instruction is still not a field and must not open one.

Tests

  • del_instr_text_is_accepted_and_dropped (parse) — the paragraph keeps Kept and nothing of the deleted field.
  • tests/tracked_field_deletion.rs — the reporter's reproducer, verbatim: it parses, contributes no text, and converts to a PDF.

Both watched fail before the change (the variant renamed away → parse error).

§17.16.13: Word writes `w:delInstrText` for the instruction of a field deleted
while changes are tracked, exactly as it writes `w:delText` for deleted text.
The element was not among the run-content variants, so the whole document was
rejected — "unknown variant `delInstrText`" — while a deleted *word* parsed
fine. Any affidavit, contract or report with a field removed under tracking
failed to convert at all.

Accept it and draw nothing. The run it sits in is inside a `w:del`, which the
paragraph walk already drops wholesale; and were a deleted run ever kept, a
deleted instruction is still not a field and must not open one. The reporter's
reproducer is the integration test, verbatim.

Closes nerdy-pro#253
ikashapov added a commit to ikashapov/dxpdf that referenced this pull request Oct 14, 2026
One squashed commit carrying the tree of integration/2026-10-14, which was
previously a chain of ten merges ending at ac5787e (kept locally as
archive/integration-2026-10-14-merges). Base: upstream main 3a5c7ca.

Integrated, each at the head of its open upstream pull request:

- nerdy-pro#252  fix-layout-defects-228-232 (a40d5ce) — issues nerdy-pro#228–nerdy-pro#232: bookmark-only
        paragraphs, nested-table width, list instances over one abstract
        numbering, table width resolution (pct and tcW autofit), column
        balancing and separators
- nerdy-pro#183  issue-150-wmf-svg (6e5aa99) — WMF/EMF and SVG images
- nerdy-pro#184  issue-151-pgborders-docgrid (27204b3) — page borders, document grid
- nerdy-pro#186  issue-153-shaped-clusters (65739f6) — shaped text clusters
- nerdy-pro#187  issue-154-tracked-changes (6982b34) — tracked changes and comments
- nerdy-pro#185  issue-155-smartart-charts (3683223) — SmartArt and charts
- nerdy-pro#256  issue-253-del-instr-text (0656a52) — w:delInstrText tolerated
- nerdy-pro#257  issue-250-image-hyperlinks (cb5ce2b) — a:hlinkClick on pictures
- nerdy-pro#258  issue-188-font-absent-cost (9a63bf0) — no deep catalogue tier before
        the substitution table, no theme script-font preload
- nerdy-pro#259  issue-158-auto-hyphenation (9bfbae2) — w:autoHyphenation

Beyond the union of those branches, the integration itself changed:
- README keeps one row per feature after the merges; the matrix tally is
  recomputed from the rows.
- nerdy-pro#253's tests assert that a deleted field code is never drawn and never run
  text, because nerdy-pro#154 keeps w:del runs instead of dropping them at parse.
- nerdy-pro#250's push_link_over sits after nerdy-pro#151's resolve_line_metrics; nerdy-pro#158's
  HyphenationCtx.measure and rejoin_hyphenated take &dyn SplitMeasure (nerdy-pro#153).

Verified on this exact tree: cargo fmt, clippy and doc clean; cargo test
2977 passed / 0 failed (skipping the capi library freshness guards);
--no-default-features and --features capi build; the twelve-document
harness passes 12/12.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A field code deleted with change tracking on breaks dxpdf

1 participant