Update ODT and DocX to work with new chapter headers

This commit is contained in:
Veronica Berglyd Olsen
2025-01-25 16:17:19 +01:00
parent 9ac1692e2a
commit 9f1274f953
7 changed files with 41 additions and 42 deletions
+1 -1
View File
@@ -271,7 +271,7 @@ class ToDocX(Tokenizer):
if tType == BlockTyp.TEXT:
self._processFragments(par, S_NORM, tText, tFormat)
elif tType == BlockTyp.TITLE:
elif tType in (BlockTyp.TITLE, BlockTyp.PART):
self._processFragments(par, S_TITLE, tText, tFormat)
elif tType == BlockTyp.HEAD1:
+1 -1
View File
@@ -363,7 +363,7 @@ class ToOdt(Tokenizer):
else:
self._addTextPar(xText, S_TEXT, oStyle, tText, tFmt=tFormat)
elif tType == BlockTyp.TITLE:
elif tType in (BlockTyp.TITLE, BlockTyp.PART):
# Title must be text:p
self._addTextPar(xText, S_TITLE, oStyle, tText, isHead=False)