Commit Graph
220 Commits
Author SHA1 Message Date
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 7d4a0b256e fix: indent list levels by the step both exporters write
Lists were padded 1.5rem per level on screen while the DOCX and ODT
exports place item text at LIST_LEFT_STEP_CM (1.27cm) per level, so the
editor disagreed with its own output and with Word and LibreOffice by
6.4mm on the first level, doubling with each nesting level.
2026-08-06 20:01:23 +00:00
Steffen Becker c014a73da2 feat: support first-line and hanging indents
Only the block's left margin was read, so w:firstLine, w:hanging and
fo:text-indent were dropped: every hanging-indent paragraph rendered with
its first line flush with the rest instead of outdented.

Stored as the signed indentFirst attr in cm (negative = hanging) and
rendered as CSS text-indent. Word splits it into two exclusive
attributes by sign, ODF keeps one signed value.
2026-08-06 19:58:33 +00:00
Steffen Becker 3a68a144cb fix: read OOXML toggles as ST_OnOff, not as element presence
w:evenAndOddHeaders, w:titlePg and w:pageBreakBefore were treated as on
whenever the element existed, but w:val="false"/"0"/"off" turns them off
and both Word and the docx lib write that explicit form.

A file with <w:evenAndOddHeaders w:val="false"/> therefore took the
even-page header variant on every second page, which is empty — the
header and footer vanished from page 2 onwards.
2026-08-06 19:53:47 +00:00
Steffen Becker f48e5508a8 feat: honour the document's widow-orphan setting
Widow-orphan control was hardcoded on. It is a per-paragraph property in
both formats, so a file that turns it off paginated differently from
Word and LibreOffice.

Stored as the widowControl attr next to breakBefore. DOCX resolves
w:widowControl direct-then-style-chain-then-docDefaults; ODF reads
fo:widows/fo:orphans, where only an explicit 0 means off (absent is the
XSL-FO default of 2). Export rides the existing PBX sentinel rather than
adding a pass.
2026-08-06 19:45:08 +00:00
Steffen Becker 275a77564e fix: use Word's asymmetric cell padding for tables
Cells padded 0.1cm on all sides; Word and LibreOffice use 0.19cm left and
right and none top or bottom. Text sat 0.7mm too far left and every row
was 2mm too tall, so the offset accumulated down a table.

odf-kit only writes the fo:padding shorthand, which ODF defines as a
single length — LibreOffice drops a two-value form — so the export
expands it per side.
2026-08-06 19:26:56 +00:00
Steffen Becker 52cf5ac702 fix: derive single line spacing from the font, not a fixed 1.15
Single spacing is the font's natural line height. The hardcoded 1.15 is
Liberation Serif's (and Liberation Sans' and Caladea's), but Carlito
needs 1.2208 and Liberation Mono 1.1333 — measured against LibreOffice
at 12pt. A Calibri body ran 6% too tight, drifting a line per page.

Emitted next to font-family, so an explicit line spacing still wins.
2026-08-06 19:19:06 +00:00
Steffen Becker b1c515fd2f fix: adopt the DOCX document default font into the Standard style
Body paragraphs carry no w:pStyle, so the default style never reached
usedStyles and Standard kept the editor's Liberation Serif 12pt. Run
suppression meanwhile resolves against w:docDefaults, so the file's body
font was dropped with no run mark left to render it: a Calibri 11pt Word
document rendered as Liberation Serif 12pt.
2026-08-06 19:18:58 +00:00
Steffen Becker 328aff97dd fix: add widow-orphan control to prevent single paragraph lines 2026-08-06 20:59:33 +02:00
Steffen Becker 6c256c6533 fix: add pre-wrap for line-end space 2026-08-06 20:46:17 +02:00
Steffen Becker d608771105 feat: add table options 2026-08-06 20:01:44 +02:00
Steffen Becker 1ed9f3d172 feat: table-styles 2026-08-05 19:01:25 +02:00
Steffen Becker 82699e653b feat: add table header column 2026-08-03 22:47:44 +02:00
Steffen Becker 359915d6b2 fix: toolbar issues 2026-08-03 22:38:04 +02:00
Steffen Becker 308a80867c feat: add increase/decrease text size buttons 2026-08-03 16:41:17 +02:00
Steffen Becker 5b11cdf3f6 fix: styles manager 2026-08-03 09:42:07 +02:00
Steffen Becker 51584a98ea fix: color picker in style manager 2026-08-03 08:55:13 +02:00
Steffen Becker 24621b1450 feat: add rgb and hsl to colorpicker 2026-08-03 00:00:27 +02:00
Steffen Becker 8cdd487172 feat: right-click context-menu 2026-08-02 23:06:18 +02:00
Steffen Becker 9483d598fc feat: keyboard shortcuts 2026-07-31 20:43:48 +02:00
Steffen Becker 445d1c505f feat: editable font field 2026-07-31 18:59:38 +02:00
Steffen Becker 7cc9a36d18 feat: touchpad and keyboard scale document instad of browser ui 2026-07-31 18:37:17 +02:00
Steffen Becker ca4fbd422b feat: table margin edge resize 2026-07-31 17:46:26 +02:00
Steffen Becker f7c0e1ed1e fix: scroll bounce 2026-07-31 00:00:00 +02:00
Steffen Becker ec0cfb76fd feat: add character style editor 2026-07-30 23:34:36 +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 ebb76a5104 feat: docx import/export of named paragraph styles 2026-07-29 11:35:07 +02:00
Steffen Becker d79287c10a feat: odf import/export of named paragraph styles 2026-07-29 10:53:54 +02:00
Steffen Becker ac9d6cdcff feat: named paragraph styles with inheritance 2026-07-28 23:53:00 +02:00
Steffen Becker d461ce09a6 fix: align styles and headings to libreoffice 2026-07-28 22:45:24 +02:00
Steffen Becker f4973caade test: add unit test for display of font size 2026-07-27 20:38:13 +02:00
Steffen Becker 56f884a412 feat: dropdown for text styles 2026-07-27 20:35:55 +02:00
Steffen Becker 18a8609926 fix: resetHistory after loading new document 2026-07-27 18:55:50 +02:00
Steffen Becker 2cbc69bfd1 feat: add autocorrect for horizontal lines 2026-07-19 16:35:54 +02:00
Steffen Becker f1ba14c948 feat: add paragraph frames and background 2026-07-19 16:34:23 +02:00
Steffen Becker 2a7abed917 feat: odd/even variants for footer/header 2026-07-18 16:42:23 +02:00
Steffen Becker da1bcd8794 feat: images in header/footer 2026-07-18 15:50:26 +02:00
Steffen Becker dce22ab3f4 fix: header and footer editor 2026-07-18 11:49:49 +02:00
Steffen Becker cf665e25a0 fix: stop formatting marks from moving text 2026-07-17 07:51:58 +02:00
Steffen Becker 6535d4c58d fix: page breaks, empty lines, ... 2026-07-15 22:19:49 +02:00
Steffen Becker 40c139dd2c feat: add embedded font loading 2026-07-11 14:07:36 +02:00
Steffen Becker b8233e894e feat: add unkown font warning 2026-07-11 13:20:53 +02:00
Steffen Becker 1abdb428ba feat: ott support 2026-07-11 12:57:55 +02:00
Steffen Becker a535738301 fix ellipse text field 2026-07-11 12:36:17 +02:00
Steffen Becker 0526579f2b fix: text field frame 2026-07-10 16:25:20 +02:00
Steffen Becker 74ee5b7d23 style: improve document name field 2026-07-10 14:58:47 +02:00
Steffen Becker 8e6c4817d8 feat: add lazy tiff to png decoding 2026-07-10 13:02:27 +02:00
Steffen Becker edf51d9a68 fix: show linked images 2026-07-10 00:11:14 +02:00
Steffen Becker efaa9439b5 fix: import misses page break 2026-07-09 23:13:43 +02:00