Merge Novel Layouts (#837)
* Merge novel layouts and simplify the Tokenizer class * Fix core tests * Delete auto-layout code * Remove no longer needed item layouts * Remove references to deleted item layouts in test * Make some minor changes to Tokenizer class and update tests * Update test reference files * Update sample project * Fix a few issues with the Tokenizer * Centre some text in the sample documents * Make some minor changes to how new projects are generated * Add support for New Page and VSpace commands to the Tokenizer * Remove Title and Page layouts and add codes for page break and vertical space * Add document layout and fix some issues in index class with new title formats * Update tests and reference files * Bump the project file version and fix a minor issue in items class * Update tests and test coverage * Clean up some warnings and issues in tests
This commit is contained in:
committed by
GitHub
parent
c6973043e6
commit
bb1a778277
+4
-4
@@ -345,13 +345,9 @@ class ToOdt(Tokenizer):
|
||||
|
||||
if tStyle & self.A_PBB:
|
||||
oStyle.setBreakBefore("page")
|
||||
elif tStyle & self.A_PBB_AUT:
|
||||
oStyle.setBreakBefore("auto")
|
||||
|
||||
if tStyle & self.A_PBA:
|
||||
oStyle.setBreakAfter("page")
|
||||
elif tStyle & self.A_PBA_AUT:
|
||||
oStyle.setBreakAfter("auto")
|
||||
|
||||
if tStyle & self.A_Z_BTMMRG:
|
||||
oStyle.setMarginBottom("0.000cm")
|
||||
@@ -384,6 +380,10 @@ class ToOdt(Tokenizer):
|
||||
tHead = tText.replace(r"\\", "\n")
|
||||
self._addTextPar("Title", oStyle, tHead, isHead=True)
|
||||
|
||||
elif tType == self.T_UNNUM:
|
||||
tHead = tText.replace(r"\\", "\n")
|
||||
self._addTextPar("Heading_2", oStyle, tHead, isHead=True, oLevel="2")
|
||||
|
||||
elif tType == self.T_HEAD1:
|
||||
tHead = tText.replace(r"\\", "\n")
|
||||
self._addTextPar("Heading_1", oStyle, tHead, isHead=True, oLevel="1")
|
||||
|
||||
Reference in New Issue
Block a user