test: LibreOffice reads every character effect back

The re-save leg is the only place that proves what we write is what LO
understands. A raised run is stored as a percentage of the font size, so the
fixture picks one that stays whole — LO rounds the percentage on save.
This commit is contained in:
Steffen Becker committed 2026-08-08 10:08:16 +00:00
1 parent b61fadca48
commit f8c818c203
1 file changed
+11
+11
View File
@@ -45,6 +45,17 @@ const fixture: N = {
T(' marked', { type: 'highlight', attrs: { color: '#FFFF00' } }),
T(' arial14', { type: 'textStyle', attrs: { fontFamily: 'Arial', fontSize: '14pt' } }),
),
// Character effects: LibreOffice must read back what we write for each of them.
P(null,
T('caps ', { type: 'textStyle', attrs: { caps: 'uppercase' } }),
T('petite ', { type: 'textStyle', attrs: { caps: 'smallCaps' } }),
T('dotted ', { type: 'underline', attrs: { lineStyle: 'dotted', lineColor: '#FF0000' } }),
T('twice ', { type: 'underline', attrs: { lineStyle: 'double' } }),
T('crossed ', { type: 'strike', attrs: { lineStyle: 'double' } }),
// 4pt at 16pt is a whole 25%, the unit ODF stores it in — LibreOffice rounds
// the percentage when it re-saves, so a fractional one comes back a notch off.
T('raised', { type: 'textStyle', attrs: { fontSize: '16pt', textPosition: 4 } }),
),
P({ textAlign: 'justify', lineHeight: '1.5', spaceBefore: 12, spaceAfter: 18 }, T('spaced')),
P({ indent: 2.5 }, T('indented')),
P(null, T('line one'), { type: 'hardBreak' }, T('line two')),