From 96940951ae6b48c999ca4b260be96c598e2675e7 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Wed, 22 Jan 2020 21:39:16 +0100 Subject: [PATCH] Fix for today's commits --- src/main/java/writer2latex/xhtml/DocumentSeparator.java | 8 ++++++-- src/main/java/writer2latex/xhtml/FrameStyleConverter.java | 2 -- src/main/java/writer2latex/xhtml/TextConverter.java | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/writer2latex/xhtml/DocumentSeparator.java b/src/main/java/writer2latex/xhtml/DocumentSeparator.java index a165732..4938817 100644 --- a/src/main/java/writer2latex/xhtml/DocumentSeparator.java +++ b/src/main/java/writer2latex/xhtml/DocumentSeparator.java @@ -266,6 +266,9 @@ public class DocumentSeparator { } } protected Node closePage(Node hnode){ + if (pageOpened == false) { + return hnode; + } hnode = exitPageContainer(hnode); if (pageSeparation.equals(SECTIONS)){ //If section is empty. In case we are closing section @@ -282,6 +285,9 @@ public class DocumentSeparator { return hnode; } protected Node openPage(Node hnode, Integer pageNum){ + if (pageOpened == true) { + return hnode; + } if (pageSeparation.equals(SECTIONS)){ openPageComment(hnode, pageNum); pageOpened = true; @@ -296,7 +302,6 @@ public class DocumentSeparator { } private Node exitPageContainer(Node hnode) { - String className = ((Element) hnode).getAttribute("class"); if (!className.equals("pageContainer")) { System.out.println("Can't exit not my container!"); @@ -311,7 +316,6 @@ public class DocumentSeparator { } private Node enterPageContainer(Node hnode) { if (hnode == null) { - System.out.println("Enter page container error. hnode is null"); for (StackTraceElement ste : Thread.currentThread().getStackTrace()) { System.out.println(ste); diff --git a/src/main/java/writer2latex/xhtml/FrameStyleConverter.java b/src/main/java/writer2latex/xhtml/FrameStyleConverter.java index f1df9d1..86db334 100644 --- a/src/main/java/writer2latex/xhtml/FrameStyleConverter.java +++ b/src/main/java/writer2latex/xhtml/FrameStyleConverter.java @@ -138,8 +138,6 @@ public class FrameStyleConverter extends StyleWithPropertiesConverterHelper { private void cssColumns(StyleWithProperties style, CSVList props, boolean bInherit) { String columnCount = style.getAbsoluteProperty(XMLString.FO_COLUMN_COUNT); - System.out.println("columnCount " + columnCount); - //System.out.println(style.); } public void cssMargins(StyleWithProperties style, CSVList props, boolean bInherit){ diff --git a/src/main/java/writer2latex/xhtml/TextConverter.java b/src/main/java/writer2latex/xhtml/TextConverter.java index 3bf6205..a5b785d 100644 --- a/src/main/java/writer2latex/xhtml/TextConverter.java +++ b/src/main/java/writer2latex/xhtml/TextConverter.java @@ -272,7 +272,6 @@ public class TextConverter extends ConverterHelper { breakBeforeNextNode = false; while (i < nLen) { Node child = nList.item(i); - if (child.getNodeType() == Node.ELEMENT_NODE) { String nodeName = child.getNodeName(); // Block splitting