Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
312 commits
Select commit Hold shift + click to select a range
d60bebc
Draw a table's cell borders, consolidated as LibreOffice consolidates…
claude Jul 31, 2026
12bc53a
Read cell borders from DOCX and RTF, each with its own trap
claude Jul 31, 2026
abb0a85
Merge pull request #2 from theolivenbaum/claude/paperless-odf-phase-1…
theolivenbaum Jul 31, 2026
6cc008e
Record what a note-numbering restart actually renders as
claude Jul 31, 2026
f8357e0
Read where a note's count begins again, in all four formats
claude Jul 31, 2026
922b5c4
Put a Word table's left edge where Writer puts it, and join its grid …
claude Jul 31, 2026
26759a3
Read a DOC table cell's borders and shading, in both of the forms eac…
claude Jul 31, 2026
af875e7
Join a Word table's grid lines the way Word joins them
claude Jul 31, 2026
87b473f
Compare DOC's cell borders and shading against LibreOffice's own
claude Jul 31, 2026
0e7076e
Merge branch 'wt/origin' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
f1f002c
Record tracked changes with their author, timestamp and words
claude Jul 31, 2026
13f97ec
Resolve the bidirectional algorithm, verified against LibreOffice's o…
claude Jul 31, 2026
6830c31
Read a DOC's cell shading and borders, and close the table origin
claude Jul 31, 2026
b62b7be
Resolve ODF column widths a table states none for
claude Jul 31, 2026
c2e3f25
Merge DOC cell borders and shading, reconciling one rule found twice
claude Jul 31, 2026
f018bbe
Record bookmarks as ranges and fields as definition plus result
claude Jul 31, 2026
7d3f818
Compare the bookmark and field document against the reference filter
claude Jul 31, 2026
5700ded
Cut a paragraph into direction, script and face sub-runs before shaping
claude Jul 31, 2026
1112359
Attach a mark between two paragraphs to the one just before it
claude Jul 31, 2026
b06a601
Merge branch 'wt/model-marks' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
9b80dbd
Wrap text around a floating frame, for ODF
claude Jul 31, 2026
8d8d5c8
Floating frames: read from ODF, place, and wrap body text round them
claude Jul 31, 2026
bee83d8
Measure the sub-run widths against LibreOffice, and report a fallback…
claude Jul 31, 2026
e8ece62
Merge branch 'wt/text-bidi' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
f024f1e
Floating frames: read a DOCX's w:drawing
claude Jul 31, 2026
8f071c3
Bring the master plan back in line with what the tree does
claude Jul 31, 2026
d5d9d34
Lay out and draw a frame's own text
claude Jul 31, 2026
baec3e4
Merge pull request #3 from theolivenbaum/claude/paperless-odf-phase-1…
theolivenbaum Jul 31, 2026
8baa133
Floating frames: read an RTF shape, and write down what was measured
claude Jul 31, 2026
1c40304
PPTX extraction: slides, shapes, notes and tables
claude Jul 31, 2026
a1001e0
Spreadsheets: read XLSX, XLSM, XLTX and XLTM
claude Jul 31, 2026
b5dd5ec
Frames: a second corpus document, and the bug it found immediately
claude Jul 31, 2026
a1d5d33
Read legacy binary PowerPoint through the persist directory
claude Jul 31, 2026
735492e
Merge floating frames with text wrap, for ODF, DOCX and RTF
claude Jul 31, 2026
42a73e1
Size a table's columns when the file states no widths
theolivenbaum Jul 31, 2026
9fce348
Read a BIFF8 workbook's cells, and what its number formats display
claude Jul 31, 2026
56fc7ce
Record what PPT extraction reads, and what it was measured against
claude Jul 31, 2026
ec5b89d
PPTX: SmartArt text, bullet rules measured against LibreOffice, tests
claude Jul 31, 2026
4b1a69d
Write down what the width-less table turned out to be
theolivenbaum Jul 31, 2026
c004432
Read separated-value text, and say out loud what was guessed
claude Jul 31, 2026
019a089
Spreadsheets: synthetic-workbook and number-format tests, and the XLS…
claude Jul 31, 2026
c9d6b7c
Record the PPTX measurements with the numbers actually observed
claude Jul 31, 2026
a0f27bb
Size a table whose columns state no widths — and correct the item's p…
claude Jul 31, 2026
12c9974
Merge branch 'wt/xlsx' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
67c4bd4
Merge branch 'wt/pptx' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
00f6286
Bound the persist directory by what the edit says it wrote
claude Jul 31, 2026
59b371c
Keep the PPT record constants in the format's own numeric order
claude Jul 31, 2026
b1ab7b0
Merge XLSX and PPTX extraction
claude Jul 31, 2026
e528282
Merge PPT extraction, and stop testing "unsupported" against a suppor…
claude Jul 31, 2026
d1d037a
Note what BIFF's DIMENSIONS says, and write down what was measured
claude Jul 31, 2026
fcc0111
Approximate a fraction format instead of laying its digits out
claude Jul 31, 2026
e57f07b
Build the projects that run for the host architecture only
claude Jul 31, 2026
5f57561
Write down how to run the tests on Linux, now that it is settled
claude Jul 31, 2026
12c0e7f
Add Markdown output as a phase, and name the two raster outputs
claude Jul 31, 2026
dbc5ba2
Split the structured-text phase into XHTML, then Markdown
claude Jul 31, 2026
3ce90d8
Merge XLS and CSV extraction, onto one number-format engine
claude Jul 31, 2026
1ed570b
Merge branch 'wt/reconcile' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
2789417
Add Paperless.Markup: a semantic XHTML writer and a GFM writer over it
theolivenbaum Jul 31, 2026
7a70ca7
Resolve a PPT slide's formatting against its master's TxMasterStyleAtom
claude Jul 31, 2026
a679792
Extract slide comments, and stop filing ODF's as slide text
claude Jul 31, 2026
457ca97
Resolve DrawingML theme colours, in Paperless.Ooxml, and use them for…
claude Jul 31, 2026
5f9e30e
Read fontTable.xml, and report what only it knows
claude Jul 31, 2026
626da14
Test both writers against the tree, and fix what real documents found
theolivenbaum Jul 31, 2026
edfbc9e
Render: a PDF writer with real text, and a Skia rasteriser
claude Jul 31, 2026
c99bad2
Inherit the half of a run's character properties extraction can see
claude Jul 31, 2026
aee3e24
Merge branch 'wt/ppt-styles' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
a42ea7f
Read DOC's drawings through the shared Escher reader
claude Jul 31, 2026
f087ff5
Write down what DOC's drawings turned out to be
claude Jul 31, 2026
72c5656
Compare the XHTML against LibreOffice's own export, and add --format
theolivenbaum Jul 31, 2026
52e149f
Write down what Phase 2.5 settled, and correct two figures by measuring
theolivenbaum Jul 31, 2026
92e48bc
Wire the one w:compat flag measured to move text, and record what the…
claude Jul 31, 2026
ddd92e2
Merge branch 'wt/doc-shapes' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
cb9286d
Read a w:altChunk when it holds a format Paperless reads
claude Jul 31, 2026
ba516a4
Merge DOC drawings and the XHTML/Markdown output path
claude Jul 31, 2026
d177392
Render: verify both backends, and fix a subset-splitting bug the test…
claude Jul 31, 2026
cfe99a2
Write down the four DOCX reads, and what unblocks XLSX and PPTX
claude Jul 31, 2026
10dc4ad
Render: write down what the two backends do and what they still do not
claude Jul 31, 2026
9e53d31
Merge branch 'wt/docx-theme' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
9631142
Render: drop three members nothing reads
claude Jul 31, 2026
a9c3422
Merge the PDF and raster backends; Paperless renders
claude Jul 31, 2026
f945112
Corpus: a hand-written deck whose every shape is at a known place
claude Jul 31, 2026
ed9834f
DOCX: resolve the theme for a cell's shading and a table's borders
claude Jul 31, 2026
845e529
Fill both sides of a frame that touches neither margin
claude Jul 31, 2026
725be15
Take this branch's implementations over master's parallel PR #3
claude Jul 31, 2026
b75673b
Presentations: slides lay out, and their shapes land where LibreOffic…
claude Jul 31, 2026
d91f7de
Charge a paragraph's first-line leading to the paragraph above it
claude Jul 31, 2026
feb9c85
Draw a mixed-direction line in visual order, and mirror a right-to-le…
claude Jul 31, 2026
8f6e5c2
Attribute footnotes.rtf's note separator to LibreOffice's own import
claude Jul 31, 2026
c1d340f
Presentations: ODP slides lay out through the same placed-shape model
claude Jul 31, 2026
1fb27d4
Fill a right-to-left section's rightmost column first, and write both…
claude Jul 31, 2026
0e6c68c
Write down two right-to-left gaps the corpus does not reach: tabs, an…
claude Jul 31, 2026
422485a
Note the one right-to-left line the manual-break suppression leaves m…
claude Jul 31, 2026
2ff447b
Spreadsheets: derive pages from the print setup
claude Jul 31, 2026
ea3c1cd
Correct the sprm citation: the section flag is at sprmids.hxx:588, no…
claude Jul 31, 2026
2b5e6f5
Pin rule L2's generic form and the guard that keeps a Latin paragraph…
claude Jul 31, 2026
1480d00
Describe the two right-to-left corpus documents, and why one of them …
claude Jul 31, 2026
68e89c3
Spreadsheets: apply the centring flags, and honour a band switched off
claude Jul 31, 2026
877671a
Place the frames anchored in a cell, a header or a footnote
claude Jul 31, 2026
f2023f2
PPTX: the shape's own text style, and the colour and typeface it carries
claude Jul 31, 2026
011de1f
Write down the frame tail: what wraps now, and what still does not
claude Jul 31, 2026
5fa6228
Spreadsheets: record two more measured facts about pagination
claude Jul 31, 2026
bfa7bc2
Presentations: bullets, an outline's paragraphs, and a slide's paper
claude Jul 31, 2026
3bc62ca
Record why a DOCX frame divides one line fewer than its ODF form
claude Jul 31, 2026
3abd328
Merge branch 'wt/themed-parts' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
69d4e4d
Merge branch 'wt/frame-tail' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
0edb371
Spreadsheets: a BIFF header string's length field is one byte in BIFF5
claude Jul 31, 2026
ff53e69
Number a page's notes afresh where the document asks, then stop
claude Jul 31, 2026
96f0c47
Presentations: write down what draws, what does not, and why
claude Jul 31, 2026
ba11d82
Merge the two rendering-found layout bugs and the note-restart pass
claude Jul 31, 2026
f479975
Merge branch 'wt/slide-render' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
bdb25ae
Merge slide rendering and right-to-left text
claude Jul 31, 2026
76485a8
Merge branch 'wt/sheet-print' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
c57248a
Rendering: take a glyph's width off the run when the face's file will…
claude Jul 31, 2026
f1c51f1
Presentations: draw a slide's tables, and skip hidden slides in the p…
claude Jul 31, 2026
b0960b0
Spreadsheets: draw a cell's text in its own font, aligned as Calc ali…
claude Jul 31, 2026
6085294
Rendering: draw gradients, tiled bitmap fills and decoded pictures
claude Jul 31, 2026
12c6cf3
Presentations: measure the slide table against LibreOffice, and add t…
claude Jul 31, 2026
7877be6
Rendering: pin the new paints in both backends and against LibreOffice
claude Jul 31, 2026
fe07ec3
Rendering: give a fading gradient a soft mask in PDF, so both backend…
claude Jul 31, 2026
392dd4a
Spreadsheets: draw what a printed sheet holds besides its cells' text
claude Jul 31, 2026
0d39e12
Spreadsheets: read the cell formats all three formats state
claude Jul 31, 2026
19269a3
Write down what the fills draw, what was measured, and what is left
claude Jul 31, 2026
611f311
Spreadsheets: write down what the decoration path draws, and what it …
claude Jul 31, 2026
bcac5bb
Spreadsheets: say why the path field gets a name
claude Jul 31, 2026
122b7f1
Spreadsheets: close a border where the next placed row is not the nex…
claude Jul 31, 2026
1c4f913
Spreadsheets: measure cell text against LibreOffice, and write down t…
claude Jul 31, 2026
223df59
Merge branch 'wt/paint-images' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
ede254c
Presentations: evaluate all 187 preset geometries, dashes, arrowheads…
claude Jul 31, 2026
fb7b8db
Spreadsheets: record the suite's new size beside the measurements
claude Jul 31, 2026
5b9da58
Presentations: write down what the tables, presets, dashes and number…
claude Jul 31, 2026
31c69e5
Bring the master plan status back in line with the tree
claude Jul 31, 2026
2b8d344
Presentations: record that a raster export has no opinion about hidde…
claude Jul 31, 2026
ef3df63
Merge branch 'wt/slide-shapes' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
83b8f73
Merge branch 'wt/sheet-text': one sheet, its text and its decoration
claude Jul 31, 2026
1f24e88
Merge branch 'wt/sheet-merge' into claude/paperless-odf-phase-1-rnyzcu
claude Jul 31, 2026
1fb3215
Let a reader emit a picture without depending on the rasteriser
claude Aug 1, 2026
b8cbfd8
Presentations: draw an ODF table through the layouter PPTX already uses
claude Aug 1, 2026
0c7181c
Word processing: read an ODF picture's bytes and draw them
claude Aug 1, 2026
2756881
Presentations: lay a binary PowerPoint deck out
claude Aug 1, 2026
ad442bd
Presentations: two layout rules the binary path exposed
claude Aug 1, 2026
b7abe12
Presentations: measure the binary path against LibreOffice
claude Aug 1, 2026
22c5bf0
Presentations: write down what the binary path cost and what it bought
claude Aug 1, 2026
8c83cfe
Slides: draw pictures and gradient fills, in both PPTX and ODP
claude Aug 1, 2026
fa66655
Rendering: do not discard an image a reader has not decoded
claude Aug 1, 2026
826daf7
Presentations: record what the fills draw and what they were measured…
claude Aug 1, 2026
49d4cd1
Merge PPT binary layout: all three presentation formats render
claude Aug 1, 2026
3e9d736
Presentations: draw an ODF shape from its own enhanced path, through …
claude Aug 1, 2026
aa09f25
Vector: say what a decoded vector image is, before decoding one
claude Aug 1, 2026
b1e43d8
Vector: SVG through the seam, with LibreOffice's size rule and our ow…
claude Aug 1, 2026
be01570
Rendering: let an undecoded image draw
claude Aug 1, 2026
232c41d
Ooxml: choose a picture's SVG rendering over its raster fallback
claude Aug 1, 2026
7310605
Vector: tests, and two corpus documents that carry a real SVG
claude Aug 1, 2026
6bc4784
Spreadsheets: draw a cell whose text changes format part-way through
claude Aug 1, 2026
fe99d10
Warn that a truncated test run reports success
claude Aug 1, 2026
b9132e4
Plan the embedded-graphics phase: metafiles, charts, SmartArt
claude Aug 1, 2026
be339d7
Vector: write down what the seam is, and tighten two things reading i…
claude Aug 1, 2026
a70a55a
Spreadsheets: read which rows are sized by their content, and measure…
claude Aug 1, 2026
93d64b7
Merge branch 'wt/slide-images' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
8a41980
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' into wt/sheet-images
claude Aug 1, 2026
4e4c22f
Presentations: read an ODF outline's list style, and place a bullet w…
claude Aug 1, 2026
979d35f
Merge slide pictures and gradients, and SVG with its vector seam
claude Aug 1, 2026
1991a8c
Spreadsheets: draw a picture anchored to a cell
claude Aug 1, 2026
0a1fd91
Spreadsheets: write down the rich text, the pictures and the row height
claude Aug 1, 2026
fce0c24
Spreadsheets: one ODF length parser, not a fourth copy
claude Aug 1, 2026
b282718
Spreadsheets: say "not an anchor" with null rather than with a cast
claude Aug 1, 2026
8fc3108
Presentations: record the ODF drawing work, its measurements and what…
claude Aug 1, 2026
07dd0b7
Corpus: describe what sheet-rich-text is for, in each of its three forms
claude Aug 1, 2026
128deb2
Merge ODP tables and custom shapes: one path emitter for both vocabul…
claude Aug 1, 2026
042594a
Merge branch 'wt/sheet-images' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
d3a721e
Vector: shared metafile device context, object table, mapping and wor…
theolivenbaum Aug 1, 2026
c81eca8
Record a whole-corpus render sweep, and what it found
claude Aug 1, 2026
673ca79
Spreadsheets: record why the second horizontal page of a spilling she…
claude Aug 1, 2026
bcf8227
Vector: WMF reader, decoder and corpus fixtures
theolivenbaum Aug 1, 2026
fbd4469
Read the chart model in all three families, from the cache
claude Aug 1, 2026
df9ccd2
Vector: tests for the metafile groundwork, WMF records, scaling, bitm…
theolivenbaum Aug 1, 2026
fddeed0
Vector: write down what WMF taught, and what EMF starts from
theolivenbaum Aug 1, 2026
ad041e3
Corpus: describe the WMF fixtures and why they are hand-built
theolivenbaum Aug 1, 2026
8b13a7c
Merge branch 'wt/wmf' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
d9da983
Presentations: stop a flat ODP drawing an embedded document's markup …
claude Aug 1, 2026
bc4bd92
Record what the chart corpus measured, before and after
claude Aug 1, 2026
8c047ac
Cite the one real multi-level category chart the assertion is modelle…
claude Aug 1, 2026
07bfb91
Note that the XHTML projection already names a chart, and Markdown do…
claude Aug 1, 2026
e40eea5
Sharpen the chart notes: three call sites, and the sparse-index case …
claude Aug 1, 2026
288f7be
Merge branch 'wt/charts' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
3f49cf4
Vector: an EMF reader on the metafile groundwork, and the WMF that wa…
claude Aug 1, 2026
bd2e6fb
Vector: EMF tests, corpus fixtures, and what the raster ops needed
claude Aug 1, 2026
64f23bb
Spreadsheets: draw the cell left of a page whose text reaches into it
theolivenbaum Aug 1, 2026
9969cde
Spreadsheets: stop a cell's overflow at a neighbour a merge covers
theolivenbaum Aug 1, 2026
450c2f1
Vector: settle the raster-op question by reading DIB pixels, in both …
claude Aug 1, 2026
60f6ac7
WIP: work in progress when the container restarted
claude Aug 1, 2026
b086579
WIP: work in progress when the container restarted
claude Aug 1, 2026
21e0086
WIP: work in progress when the container restarted
claude Aug 1, 2026
b848a82
Merge branch 'wt/emf' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
f6f4b09
Merge branch 'wt/sheet-fix' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
04bebff
Merge remote-tracking branch 'origin/claude/paperless-odf-phase-1-rny…
claude Aug 1, 2026
7d4653d
Merge remote-tracking branch 'origin/claude/paperless-odf-phase-1-rny…
claude Aug 1, 2026
e0d80ae
Draw SmartArt from the baked diagram drawing, with a corpus fixture
claude Aug 1, 2026
e4920ac
Record the SmartArt measurement and correct the plan it contradicted
claude Aug 1, 2026
37256ba
Correct the diagram doc comments to the numbers the measurement gives
claude Aug 1, 2026
99f76ef
Charts: draw them, because neither family ships a fallback we can replay
claude Aug 1, 2026
bc8d53f
Charts: write down the fallback measurement and what is left
claude Aug 1, 2026
cc2879b
Vector: an EMF+ reader, and the dual-format question answered from emfio
claude Aug 1, 2026
9d74f3d
Vector: an EMF+ Dual corpus fixture, hand-built because nothing here …
claude Aug 1, 2026
5483d02
Vector: close the metafile notes, now that all three formats are in
claude Aug 1, 2026
6e64069
Charts: draw only bar charts, because the loose match drew a pie as e…
claude Aug 1, 2026
16d4071
Vector: say when an EMF+ gradient repeats and the drawing model cannot
claude Aug 1, 2026
bc473a9
Vector: tick the two WMF entries EMF closed, and contrast the two arc…
claude Aug 1, 2026
897acd5
Vector: two corrections in the EMF+ notes
claude Aug 1, 2026
e97e81e
Merge chart drawing, and kill the metafile-fallback shortcut for good
claude Aug 1, 2026
67082f7
Merge branch 'wt/emf-plus' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
4d6bf08
Word processing: give an inline picture room on its line, and fix two…
claude Aug 1, 2026
61c6a96
Merge word-processing pictures, and close both sweep regressions
claude Aug 1, 2026
175a293
Vector: a triangle-mesh paint, gradient spreads, and a gradient focus
claude Aug 1, 2026
61c2e67
Word processing: draw list labels, and give a list level its indents
claude Aug 1, 2026
7431366
SmartArt: evaluate the layout atoms when there is no baked drawing
claude Aug 1, 2026
c7f5eb6
EMF+: draw the seven line caps that are decorations rather than caps
claude Aug 1, 2026
bb33990
Word processing: write down what the character-anchored frame item costs
claude Aug 1, 2026
db732a5
Charts: move the model into Core, draw a sheet's chart, and add the r…
claude Aug 1, 2026
b50c483
Merge list labels: one missing feature, six sweep rows
claude Aug 1, 2026
b54c74c
Merge branch 'wt/chart-types' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
dc91da9
Update .gitignore
theolivenbaum Aug 1, 2026
96c9788
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' of https://github.…
theolivenbaum Aug 1, 2026
aeae5c1
EMF+: replay a metafile carried as an image, and write down what changed
claude Aug 1, 2026
09d9515
Merge branch 'wt/emfplus-gaps' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
7100d95
Charts: data labels, number formats on ticks, a secondary axis and a …
claude Aug 1, 2026
206adda
SmartArt: the last four layout algorithms, and paragraph spacing as a…
claude Aug 1, 2026
0f6954b
Draw an embedded vector picture, in all three families
claude Aug 1, 2026
3e5a804
Merge branch 'wt/frame-seam' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
21ec1c7
Vector: close the region gaps with a rectangle algebra, and decline t…
claude Aug 1, 2026
422c52f
Merge branch 'wt/vector-regions' into claude/paperless-odf-phase-1-rn…
claude Aug 1, 2026
bd8ed7b
Charts: read the extension coordinate-region, stretch the glyphs, and…
claude Aug 1, 2026
54fde31
Merge branch 'wt/chart-rest' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
81e7ed1
Fonts: carry the resolver's key to the PDF, so a rendered page draws …
claude Aug 1, 2026
ef2efaa
Merge branch 'wt/font-embed' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
3e0f7bc
Record the structured-text sweep beside the render sweep
claude Aug 1, 2026
512f995
Charts: fit trendlines, turn crowded axis labels, and draw the data t…
claude Aug 1, 2026
e84c341
Charts: draw radar, bubble, stock and of-pie; decline surface with th…
claude Aug 1, 2026
105ab69
Merge radar, bubble, stock and of-pie; decline surface with reasons
claude Aug 1, 2026
b108b00
Sheets: read table:shapes, and let a drawing widen the print area
claude Aug 1, 2026
83f48cf
Writer draws a chart: a DOCX w:drawing and an ODT draw:object
claude Aug 1, 2026
cc8cb5f
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' of https://github.…
theolivenbaum Aug 1, 2026
ce31b84
Sheets: read XLSB, and stop losing sheets whose content is a shape
claude Aug 1, 2026
601788f
Charts: measure the plot rectangle on 100 charts, and find it in the …
claude Aug 1, 2026
e0310b2
A DOC's picture set in a line is decided by a SHAPE field
claude Aug 1, 2026
8872bf0
Solve the shrink-to-fit, turn a cycle's labels, draw a master's logo
claude Aug 1, 2026
9cde79c
Merge branch 'wt/writer-charts' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
531f214
Merge branch 'wt/plot-rect' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
0fffca3
Merge branch 'wt/slide-tail' into claude/paperless-odf-phase-1-rnyzcu
claude Aug 1, 2026
438e70c
Stop the catalogue lying, and set a chart's labels in the right face
claude Aug 1, 2026
b30584f
Merge branch 'claude/paperless-odf-phase-1-rnyzcu' of https://github.…
theolivenbaum Aug 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
51 changes: 51 additions & 0 deletions .claude/skills/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Skills for developing Paperless

Four skills covering development of the [Paperless](../../dotnet/) C# libraries against
headless LibreOffice as the reference implementation.

| Skill | Use it when |
|---|---|
| [`libreoffice-reference`](libreoffice-reference/) | You need ground truth: reference PDFs, per-page PNGs, or reference text from a document. Also when `soffice --convert-to` misbehaves. |
| [`render-comparison`](render-comparison/) | Comparing a Paperless rendering against the reference, and working out *why* it differs. |
| [`extraction-comparison`](extraction-comparison/) | Comparing extracted text. Also the right first step for a visual bug — parsing bugs are far cheaper to find in text than in pixels. |
| [`paperless-corpus`](paperless-corpus/) | Building or curating test documents. |

## Start here

```bash
.claude/skills/libreoffice-reference/scripts/check-env.sh
```

Nothing else is trustworthy until this passes. It catches the two failures that waste the
most time:

- **Application modules missing.** `libreoffice-core` alone installs a `soffice` that runs
but cannot load *any* document, failing with a maximally unhelpful
`Error: source file could not be loaded`.
- **Wrong font substitution.** If Calibri resolves to DejaVu Sans rather than Carlito,
advance widths change, so line breaks change, so pagination changes — and every page after
the first differs for a reason that has nothing to do with Paperless.

## Scripts

All are dependency-free (bash, or Python using only the standard library) and all were
verified against LibreOffice 24.2.7.2 on real files.

| Script | Does |
|---|---|
| `libreoffice-reference/scripts/check-env.sh` | Verifies soffice, modules, fonts, rasteriser |
| `libreoffice-reference/scripts/lo-convert.sh` | Documents → reference PDFs and page PNGs |
| `libreoffice-reference/scripts/lo-extract.sh` | Documents → reference text (right filter per family) |
| `render-comparison/scripts/compare-images.py` | Page images → metrics, diagnosis, diff images |
| `extraction-comparison/scripts/compare-text.py` | Text → similarity, first divergence, codepoint diagnostics |
| `paperless-corpus/scripts/make-corpus.sh` | Generates a test corpus across all 17 formats |

## Two facts worth knowing before you start

**`soffice` exits 0 even when it converts nothing.** Never trust its exit code — always check
that the output file exists. The scripts here all do.

**Rasterised LibreOffice output is byte-deterministic.** Verified: the same input converted
twice and rasterised gives identical PNGs. So golden reference images can be committed and
checksummed, and a changed checksum is a real signal. The PDFs themselves are *not*
byte-identical — they embed a timestamp — so checksum the PNGs, never the PDFs.
103 changes: 103 additions & 0 deletions .claude/skills/extraction-comparison/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
name: extraction-comparison
description: Compare Paperless text/content extraction against headless LibreOffice's own text export, and interpret the differences. Use when validating extraction correctness for any office format, investigating missing or garbled extracted text, checking encoding handling in legacy binary formats, or deciding whether an extraction difference is a real bug. Also the right first step when a rendering differs, since parsing bugs are far easier to find in text than in pixels.
---

# Comparing extraction against LibreOffice

Generate reference text with the **libreoffice-reference** skill
(`scripts/lo-extract.sh`); this skill covers comparing against it.

## Do this before comparing renderings

When a rendered page looks wrong, check extraction first. If the extracted text already
differs, the bug is in **parsing**, not rendering — and a text diff points at it far more
directly than a pixel diff ever will. Only once the text matches is a visual difference
actually about layout or drawing.

## Running a comparison

```bash
# 1. Reference text from LibreOffice
.claude/skills/libreoffice-reference/scripts/lo-extract.sh --outdir /tmp/ref document.docx

# 2. Paperless extraction
dotnet run --project dotnet/tools/Paperless.Cli -- extract --outdir /tmp/actual document.docx

# 3. Compare
.claude/skills/extraction-comparison/scripts/compare-text.py \
--expected /tmp/ref/document.docx/document.txt \
--actual /tmp/actual/document.txt
```

`compare-text.py` normalises before comparing (see below), reports similarity plus the
first divergence, and prints a unified diff of the differing region.

## What the reference can and cannot tell you

LibreOffice's text export is a genuine oracle for *content*, but it is lossy and
opinionated. Know the limits before treating a difference as a defect.

| Reference | Covers | Does not cover |
|---|---|---|
| `Text` filter (Writer) | Paragraph text in document order | Headers/footers, footnotes, comments, text inside shapes, table structure (cells become tab-separated) |
| `csv` filter (Calc) | Cell **displayed** values, first sheet | **Every sheet after the first.** Formulas, comments, shape text |
| `impress_html_Export` | Slide text as HTML | Speaker notes placement, shape z-order, exact reading order |

Two consequences worth stating plainly:

- **A Paperless extraction that finds *more* than the reference is usually correct, not
wrong.** Headers, comments, notes and shape text are things Paperless deliberately
extracts and these filters deliberately drop. Compare the intersection; do not chase
parity on what the reference cannot express.
- **For multi-sheet spreadsheets the CSV reference is nearly useless.** Use the reference
PDF's text layer instead (`pdftotext`), which covers all printed sheets.

## Normalisation, and why each step is justified

Comparing raw bytes produces noise that hides real bugs. `compare-text.py` normalises,
and each step exists for a specific reason rather than to make numbers look better:

| Step | Why |
|---|---|
| CRLF/CR → LF | The filters differ in line ending by platform; never a real difference |
| Strip BOM | LibreOffice writes one; it is an encoding artefact, not content |
| NFC Unicode normalisation | The same character can be composed or decomposed. Visually and semantically identical |
| Collapse runs of blank lines | The filters emit inconsistent blank-line padding around blocks |
| Strip trailing whitespace per line | Padding artefact |
| Normalise non-breaking space to space (`--fold-spaces`) | **Off by default.** NBSP versus space *is* a real difference and can be a genuine bug; only fold when you have established it is not what you are chasing |

Nothing is case-folded and no punctuation is stripped: those would hide real bugs.

## Reading the result

| Symptom | Likely cause |
|---|---|
| Similarity ~1.0, tiny diffs | Match. Check the diff is only whitespace/padding |
| Paperless has *extra* content | Usually correct — headers, comments, notes, shape text the filter drops. Verify by eye, do not "fix" |
| Paperless *missing* a contiguous block | An unhandled structure: a table, a text box, a section, a nested field |
| Text present but mangled into wrong characters | **Encoding.** Legacy DOC/XLS/PPT store text in a codepage chosen by the file; if the codepage was misread every non-ASCII character is wrong. Check the codepage record before suspecting the parser |
| Right characters, wrong order | Reading order: a table traversed column-major, or shapes in z-order rather than position order |
| Paragraphs merged or split | Paragraph-boundary detection. In DOC/WW8 this often means the piece table was mishandled |
| Empty output from Paperless, reference fine | Format detection failed, or the reader threw. Check `identify` first |

### Encoding problems specifically

The tell is *systematic* corruption of non-ASCII characters while ASCII is perfect. That
is a codepage mismatch, not a parsing bug:

- **DOC/WW8** — codepage derives from the language id in the FIB.
- **XLS/BIFF** — the `CODEPAGE` record; BIFF8 is mostly UTF-16 but not universally.
- **PPT** — per-run character properties can override.
- **CSV** — genuinely ambiguous; detection is heuristic and a mismatch here may be
expected rather than a bug.

`compare-text.py --show-codepoints` prints the differing characters with their code
points, which usually makes the substitution pattern obvious at a glance.

## Metadata

Metadata comes from three unrelated systems — ODF `meta.xml`, OOXML `docProps/*`, and the
OLE summary-information property sets — so compare it separately and per-field. A missing
field is often "the format never recorded it", not a bug: Paperless leaves unrecorded
fields null precisely so that "absent" stays distinguishable from "empty".
176 changes: 176 additions & 0 deletions .claude/skills/extraction-comparison/scripts/compare-text.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
#!/usr/bin/env python3
"""Compare extracted text against a LibreOffice reference extraction.

Normalises away differences that are never real (line endings, BOMs, Unicode
composition, blank-line padding) while preserving those that can be genuine bugs
(case, punctuation, non-breaking spaces). See ../SKILL.md for the rationale per step.

Standard library only.
"""

from __future__ import annotations

import argparse
import difflib
import pathlib
import re
import sys
import unicodedata

NBSP = " "


def load(path: pathlib.Path) -> str:
"""Read a file, tolerating the encodings these filters actually emit."""
raw = path.read_bytes()
for encoding in ("utf-8-sig", "utf-8", "utf-16", "cp1252", "latin-1"):
try:
return raw.decode(encoding)
except (UnicodeDecodeError, UnicodeError):
continue
# latin-1 cannot fail, so this is unreachable in practice.
return raw.decode("latin-1", errors="replace")


def normalise(text: str, fold_spaces: bool) -> str:
text = text.replace("", "") # BOM: an encoding artefact
text = text.replace("\r\n", "\n").replace("\r", "\n")
text = unicodedata.normalize("NFC", text) # composed == decomposed
if fold_spaces:
# Off by default: NBSP vs space can itself be the bug being investigated.
text = text.replace(NBSP, " ").replace(" ", " ")
text = "\n".join(line.rstrip() for line in text.split("\n"))
text = re.sub(r"\n{3,}", "\n\n", text) # inconsistent block padding
return text.strip("\n")


def token_similarity(a: str, b: str) -> float:
"""Word-level similarity. More meaningful than character ratio for prose, where a
one-word change should not look like a large difference."""
wa, wb = a.split(), b.split()
if not wa and not wb:
return 1.0
return difflib.SequenceMatcher(None, wa, wb, autojunk=False).ratio()


def first_divergence(a: str, b: str) -> tuple[int, int, str] | None:
"""Locate the first differing line, which is where a cascade begins."""
la, lb = a.split("\n"), b.split("\n")
for i in range(max(len(la), len(lb))):
x = la[i] if i < len(la) else None
y = lb[i] if i < len(lb) else None
if x != y:
if x is None:
return i + 1, 0, f"actual ended; reference still has: {y!r}"
if y is None:
return i + 1, 0, f"reference ended; actual still has: {x!r}"
col = next((c + 1 for c, (p, q) in enumerate(zip(x, y)) if p != q),
min(len(x), len(y)) + 1)
return i + 1, col, f"reference: {y!r}\n actual: {x!r}"
return None


def describe_codepoints(a: str, b: str, limit: int = 24) -> list[str]:
"""Show differing characters with code points.

A systematic substitution pattern here (every non-ASCII character wrong, ASCII
perfect) means a codepage was misread, not that parsing failed.
"""
out: list[str] = []
matcher = difflib.SequenceMatcher(None, b, a, autojunk=False)
for tag, i1, i2, j1, j2 in matcher.get_opcodes():
if tag == "equal":
continue
exp, act = b[i1:i2], a[j1:j2]
for ch, label in ((exp, "reference"), (act, "actual")):
for c in ch[:8]:
out.append(f" {label:9s} {c!r} U+{ord(c):04X} "
f"{unicodedata.name(c, '<unnamed>')}")
if len(out) >= limit:
out.append(" ... truncated")
return out
return out


def main() -> int:
ap = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument("--expected", required=True, type=pathlib.Path,
help="LibreOffice reference text file.")
ap.add_argument("--actual", required=True, type=pathlib.Path,
help="Paperless extraction to check.")
ap.add_argument("--fold-spaces", action="store_true",
help="Treat NBSP as a normal space. Off by default: the difference "
"can itself be the bug.")
ap.add_argument("--show-codepoints", action="store_true",
help="List differing characters with code points (finds codepage "
"problems).")
ap.add_argument("--context", type=int, default=3, help="Diff context lines.")
ap.add_argument("--min-similarity", type=float, default=None, metavar="S",
help="Exit non-zero if token similarity falls below S.")
args = ap.parse_args()

for p in (args.expected, args.actual):
if not p.is_file():
print(f"not a file: {p}", file=sys.stderr)
return 3

exp = normalise(load(args.expected), args.fold_spaces)
act = normalise(load(args.actual), args.fold_spaces)

similarity = token_similarity(act, exp)
exp_words, act_words = len(exp.split()), len(act.split())

print(f"reference: {args.expected} ({exp_words} words, {len(exp)} chars)")
print(f"actual: {args.actual} ({act_words} words, {len(act)} chars)")
print(f"token similarity: {similarity:.4f}")

if exp == act:
print("\nIDENTICAL after normalisation.")
return 0

# An extraction that finds MORE than the reference is usually correct: these
# filters drop headers, comments, notes and shape text by design.
if act_words > exp_words * 1.05 and similarity > 0.75:
print("\nNOTE: Paperless extracted more text than the reference. This is often "
"CORRECT -- LibreOffice's text filters drop headers/footers, comments, "
"notes and shape text. Verify the extra content is real before treating "
"it as a defect.")

div = first_divergence(act, exp)
if div:
line, col, detail = div
print(f"\nfirst divergence at line {line}"
+ (f", column {col}" if col else "") + ":")
print(f" {detail}")

print("\nunified diff (reference -> actual):")
diff = difflib.unified_diff(
exp.split("\n"), act.split("\n"),
fromfile="libreoffice-reference", tofile="paperless-actual",
lineterm="", n=args.context)
shown = 0
for row in diff:
print(row)
shown += 1
if shown > 200:
print("... diff truncated at 200 lines")
break

if args.show_codepoints:
details = describe_codepoints(act, exp)
if details:
print("\ndiffering characters:")
print("\n".join(details))
print("\nIf every non-ASCII character is wrong while ASCII is perfect, this "
"is a CODEPAGE mismatch, not a parsing bug.")

if args.min_similarity is not None and similarity < args.min_similarity:
print(f"\nsimilarity {similarity:.4f} below --min-similarity "
f"{args.min_similarity}", file=sys.stderr)
return 1
return 0


if __name__ == "__main__":
sys.exit(main())
Loading
Loading