Commit Graph
55 Commits
Author SHA1 Message Date
Steffen Becker a021bc42aa feat: a cell's content sits where its style puts it
ODF style:vertical-align (middle/bottom) on a table cell, which every
LibreOffice callout table uses for its Tip/Note label. Import and render
only: odf-kit dedupes cell styles by property, so writing it back needs a
pass of its own — noted in docs/architecture/tables.md.
2026-08-10 11:03:34 +00:00
Steffen Becker 78e35cef2c feat: a reference finds the text it points at, and follows it
Bookmarks are a mark, not a point: both formats store a range, and only a
range lets a REF recompute its text. A cross-reference caches its display
like a Word field and resolves live on each pagination settle — the
bookmark's text, or the page it renders on — keeping the cached value when
the target is gone. Ctrl+click jumps to it, internal #name links too.

ODF splices its sentinels into the run text so cells and custom paragraphs
need no separate emitter; DOCX needs no post-pass at all.
2026-08-09 13:56:22 +00:00
Steffen Becker ee56a348ee feat: formulas can be inserted and edited, and survive both formats
A formula node stores only its LaTeX source; the MathML on screen, the ODF
formula object and Word's OMML are derived from it, and both importers parse
foreign markup back into that source, so an imported formula stays editable.

Word documents were losing their formulas outright: m:oMath sits beside the w:r
runs in its own namespace, past convertInline's `namespaceURI !== W` guard.
2026-08-08 21:50:36 +00:00
Steffen Becker db0fe71cdb feat: a table keeps the cell margins its file gave it
The cell padding was a constant in three places that disagreed with each
other, so a narrow column lost 0.38cm it did not have: a bibliography
marker column of 0.71cm wrapped "[2] " onto three lines and every entry
grew with it, costing a fixture a whole page.

The table now carries its own margins (w:tblCellMar, direct or from the
table style; fo:padding on the ODF cell style) and both exports write
them back. A side within a twentieth of a millimetre of the default is
the default, or Word's 108 twips would tag every table.
2026-08-08 12:18:16 +00:00
Steffen Becker b61fadca48 feat: the character effects Word and LO carry beyond bold and italic
Letter case, the underline's shape and colour, a double strikethrough and a
freely raised run all had no home in the model, so every one of them was
dropped on import. They ride the marks now, render in CSS, and round-trip.

odf-kit's run formatting has a field for none of them, so a sentinel folds
them into the run's own automatic style — the route the character styles
already take, and it reaches every path odf-kit serializes.
2026-08-08 10:06:31 +00:00
Steffen Becker be96ee626c docs: apply rules for comments 2026-08-08 08:28:55 +00:00
Steffen Becker a8a4a4c32f feat: let a character style on the item's first portion reach the marker
The charStyle mark carries only a name, so resolving it needs the registry: the
plugin takes it as a `sheet` option (like ParagraphStyle), the exporters read
their own exportSheet. The style is the base, the portion's own marks stay on
top. The decoration pass now also re-runs on FORCE_PAGE_RECALC, so editing a
style repaints the markers.

The ODF marker style moves to styles.xml as a named style — LibreOffice ignores
a level's text:style-name when it resolves to an automatic style, which made the
whole ODF leg a no-op (probed both ways).
2026-08-07 20:27:07 +00:00
Steffen Becker 0b54f6cc44 feat: render a list marker bold when the item starts bold
A bold mark sits inside the item's paragraph and never reaches ::marker, so the
roman numerals of a numbered heading stayed light while their text was bold.
A plugin tags such items and editor.css weights the marker. The trigger is the
first text portion, which is the rule LibreOffice numbering itself uses.
2026-08-07 17:41:09 +00:00
Steffen Becker 7c09727cda docs: remove word as placeholder for general text editor 2026-08-07 18:08:20 +02:00
Steffen Becker 92d641f72f feat: honour a paragraph's own tab stops
CSS only has the fixed tab-size grid, so a tab that resolves to one of the
paragraph's stops is measured and given the exact advance as an inline margin.
A hanging indent implies a stop at the text position, as in Word.
2026-08-06 21:45:47 +00:00
Steffen Becker 1ed9f3d172 feat: table-styles 2026-08-05 19:01:25 +02:00
Steffen Becker 9483d598fc feat: keyboard shortcuts 2026-07-31 20:43:48 +02:00
Steffen Becker 3dcae6f640 feat: named character styles 2026-07-30 23:34:23 +02:00
Steffen Becker 603f4df905 feat: paragraph style manager ui 2026-07-30 19:58:47 +02:00
Steffen Becker ac9d6cdcff feat: named paragraph styles with inheritance 2026-07-28 23:53:00 +02:00
Steffen Becker 56f884a412 feat: dropdown for text styles 2026-07-27 20:35:55 +02:00
Steffen Becker f1ba14c948 feat: add paragraph frames and background 2026-07-19 16:34:23 +02:00
Steffen Becker 1fb81c389f feat: insert date/time 2026-07-08 23:21:07 +02:00
Steffen Becker de283adab5 feat: introduce columns 2026-07-08 19:17:16 +00:00
Steffen Becker 3b7e7606bb feat: bullet symbols 2026-07-04 17:14:54 +02:00
Steffen Becker 15b9386eb7 feat: add table frame menue 2026-07-04 00:00:44 +02:00
Steffen Becker 0aa9399f93 feat: textbox and shapes 2026-07-03 22:53:38 +02:00
Steffen Becker 86376ca7e3 fix: import correct font size of empty lines 2026-07-02 23:10:02 +02:00
Steffen Becker a5bb2deaa2 feat: table of content 2026-07-01 21:17:44 +02:00
Steffen Becker 418f152d4b feat: header row toggle 2026-06-28 12:23:41 +02:00
Steffen Becker 3cc2e65423 feat: table cells background/shading 2026-06-28 10:59:22 +02:00
Steffen Becker ec678ed495 feat: table cell splitting/merging 2026-06-28 10:30:00 +02:00
Steffen Becker 3b299809e1 feat: search and replace 2026-06-28 00:05:37 +02:00
Steffen Becker 98e7ee2458 feat: add hyperlinks 2026-06-27 19:55:56 +02:00
Steffen Becker f6d1348a43 feat: manual pagebreaks 2026-06-25 20:49:07 +02:00
Steffen Becker 8acae13b9a refactor: organize lib/editor 2026-06-24 23:34:24 +02:00
Steffen Becker 64ae976ecf feat: insert images 2026-06-21 12:14:10 +02:00
Steffen Becker 0a35a65c83 feat: add spell-check 2026-06-18 23:34:45 +02:00
Steffen Becker b8ed2aa14e feat: add increase and decrease indent 2026-06-16 23:16:28 +02:00
Steffen Becker 3088da0ac9 feat: import odt 2026-06-12 21:17:29 +02:00
Steffen Becker 69407726a9 fix: curser after table at the end of the document 2026-06-12 15:32:58 +02:00
Steffen Becker 6dbacf8899 docs: shorten code comments for readability 2026-06-12 14:50:18 +02:00
Steffen Becker 69cb74c824 feat: different types of ordered list 2026-06-10 23:42:08 +02:00
Steffen Becker 872414ef23 feat: add buttons for superscript and subscript 2026-06-10 02:19:03 +02:00
Steffen Becker b28a33b104 feat: add strikethrough 2026-06-09 23:29:15 +02:00
Steffen Becker bb281c60c1 feat: move table row bars by mouse 2026-06-08 20:35:57 +02:00
Steffen Becker dafca8de2b feat: move table column bars by mouse 2026-06-07 16:42:16 +02:00
Steffen Becker e2f522854f feat: tables 2026-06-06 12:22:45 +02:00
Steffen Becker 355f12afd7 feat: text highlighting 2026-06-06 12:19:05 +02:00
Steffen Becker e9c153b874 feat: add paragraph spacing 2026-06-02 23:03:10 +02:00
Steffen Becker 3d8366c73f feat: add font color 2026-05-29 10:41:12 +02:00
Steffen Becker e03b1d04ec feat: introduce formatting marks 2026-05-28 17:39:34 +02:00
Steffen Becker 416a405d0f feat: introduce text alignment 2026-05-28 00:17:51 +02:00
Steffen Becker e5b7528c24 fix: heading and boldness inconsistencies 2026-05-27 21:08:16 +02:00
Steffen Becker 4ba16c62af feat: add line spacing button to extended toolbar 2026-05-26 19:00:02 +02:00