From b55e16ff87ea296a808a464790a942a21b9b6bc0 Mon Sep 17 00:00:00 2001 From: George Litvinov Date: Mon, 13 Mar 2017 18:10:17 +0300 Subject: [PATCH] Disabled pagebreaks while inserting footnotes --- source/java/writer2latex/xhtml/TextConverter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/java/writer2latex/xhtml/TextConverter.java b/source/java/writer2latex/xhtml/TextConverter.java index 6d56864..f3dfebe 100644 --- a/source/java/writer2latex/xhtml/TextConverter.java +++ b/source/java/writer2latex/xhtml/TextConverter.java @@ -109,6 +109,7 @@ public class TextConverter extends ConverterHelper { private boolean breakBeforeNextNode = false; private boolean inTable = false; private boolean inList = false; + private boolean inFootnote = false; public TextConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) { super(ofr,config,converter); @@ -1666,6 +1667,9 @@ public class TextConverter extends ConverterHelper { if (inList){ return hnode; } + if (inFootnote){ + return hnode; + } Integer newPageNumber = null; if (style != null) { // If style:paragraph-properties extists and contain @@ -1685,7 +1689,9 @@ public class TextConverter extends ConverterHelper { hnode = StartMasterPage(hnode, style, newPageNumber); } else if (checkMasterPageBreak(style) || checkHardBreakBefore(style) || breakBeforeNextNode) { // Insert footnotes + inFootnote = true; footCv.insertFootnotes(hnode, true); + inFootnote = false; // Add previous MP footer addFooter(hnode); // Update MP