From 61b94b2886b62b359a5d58d843f8284e7088e9c7 Mon Sep 17 00:00:00 2001 From: George Litvinov Date: Fri, 2 Nov 2018 14:18:06 +0300 Subject: [PATCH] Remove page slicing, headers and footers on page_tags=none configuration --- .../java/writer2latex/xhtml/TextConverter.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/writer2latex/xhtml/TextConverter.java b/src/main/java/writer2latex/xhtml/TextConverter.java index e22d84f..aadfd88 100644 --- a/src/main/java/writer2latex/xhtml/TextConverter.java +++ b/src/main/java/writer2latex/xhtml/TextConverter.java @@ -153,7 +153,10 @@ public class TextConverter extends ConverterHelper { extractRealTOC(onode); } //Split pages - onode = (Element) PageSplitter.splitSoftPageBreak(onode,ofr); + if (!pageTags.equals("none")) { + onode = (Element) PageSplitter.splitSoftPageBreak(onode,ofr); + } + //Debug.printNode(onode); // Convert content hnode = (Element)traverseBlockText(onode,hnode); @@ -162,7 +165,9 @@ public class TextConverter extends ConverterHelper { // Add footnotes and endnotes footCv.insertFootnotes(hnode,true); - addFooter(hnode); + if (!pageTags.equals("none")) { + addFooter(hnode); + } endCv.insertEndnotes(hnode); hnode = (Element) GreenstoneTags.endDocument(hnode); // Generate all indexes @@ -1670,6 +1675,9 @@ public class TextConverter extends ConverterHelper { if (inFootnote){ return hnode; } + if (pageTags.equals("none")) { + return hnode; + } Integer newPageNumber = null; if (style != null) { // If style:paragraph-properties extists and contain @@ -1756,7 +1764,9 @@ public class TextConverter extends ConverterHelper { hnode = GreenstoneTags.StartDocument(hnode, sTitle,headingTags,pageTags, pageNum); //Print header - addHeader(hnode); + if (!pageTags.equals("none")) { + addHeader(hnode); + } return hnode; }