diff --git a/src/main/java/writer2latex/xhtml/PageSplitter.java b/src/main/java/writer2latex/xhtml/PageSplitter.java index 576455b..7d3b375 100644 --- a/src/main/java/writer2latex/xhtml/PageSplitter.java +++ b/src/main/java/writer2latex/xhtml/PageSplitter.java @@ -457,10 +457,10 @@ public class PageSplitter { boolean dataMoved = false; // Node counter int i = 0; - NodeList sectionChilds = section.getChildNodes(); - while (sectionChilds.getLength() > i) { + NodeList childs = section.getChildNodes(); + while (childs.getLength() > i) { - Node child = sectionChilds.item(0); + Node child = childs.item(0); if ((child.getNodeType() == Node.ELEMENT_NODE)) { String nodeName = child.getNodeName(); if (containsSPB(child)){ @@ -616,7 +616,7 @@ public class PageSplitter { StyleWithProperties newStyle = officeReader.getParStyle(Misc.getAttribute(paraAfter, TEXT_STYLE_NAME)); newStyle.setParProperty(FO_TEXT_INDENT, "0"); } - // Returns true if soft-page-break found. Removes it if removeFound = true + private static void removeSPB(Node node) { if (node.getNodeType() == Node.ELEMENT_NODE) { if (node.getNodeName().equals(TEXT_SOFT_PAGE_BREAK)) {