From e5e260320397ebae70aee424fab5db470df23c5f Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Mon, 27 Jan 2020 17:43:11 +0100 Subject: [PATCH] Reverted last commit --- .../writer2latex/xhtml/TextConverter.java | 27 ++----------------- .../java/writer2latex/xhtml/XhtmlConfig.java | 11 +------- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/main/java/writer2latex/xhtml/TextConverter.java b/src/main/java/writer2latex/xhtml/TextConverter.java index d07cf3b..6217239 100644 --- a/src/main/java/writer2latex/xhtml/TextConverter.java +++ b/src/main/java/writer2latex/xhtml/TextConverter.java @@ -119,7 +119,6 @@ public class TextConverter extends ConverterHelper { private boolean inFooter = false; private String endnotesContext = null; private String footnotesContext = null; - private int footnotesLevel = 0; public TextConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) { super(ofr,config,converter); @@ -132,7 +131,6 @@ public class TextConverter extends ConverterHelper { endCv = new EndnoteConverter(ofr, config, converter); nSplitAfter = 1000*config.splitAfter(); nPageBreakSplit = config.pageBreakSplit(); - footnotesLevel = config.getFootNotesLevel(); nSplit = config.getXhtmlSplitLevel(); nRepeatLevels = converter.isOPS() ? 0 : config.getXhtmlRepeatLevels(); // never repeat headings in EPUB nFloatMode = ofr.isText() && config.xhtmlFloatObjects() ? @@ -284,7 +282,6 @@ public class TextConverter extends ConverterHelper { getDrawCv().handleDrawElement((Element)child,(Element)hnode,null,nFloatMode); } else if (nodeName.equals(TEXT_P)) { - footnotesBeforeThisOutline(child,hnode); StyleWithProperties style = ofr.getParStyle(Misc.getAttribute(child,TEXT_STYLE_NAME)); hnode = processPageBreaks(child, hnode,style); //hnode = maybeSplit(hnode, style); @@ -333,7 +330,6 @@ public class TextConverter extends ConverterHelper { } else if(nodeName.equals(TEXT_H)) { StyleWithProperties style = ofr.getParStyle(Misc.getAttribute(child,TEXT_STYLE_NAME)); - footnotesBeforeThisOutline(child,hnode); Node rememberNode = hnode; hnode = processPageBreaks(child, hnode, style); //hnode = maybeSplit(hnode,style,nOutlineLevel); @@ -458,20 +454,7 @@ public class TextConverter extends ConverterHelper { return hnode; } - private void footnotesBeforeThisOutline(Node outlineNode, Node hnode) { - if (inEndnote || inFootnote) { - return; - } - int curLevel = getOutlineLevel((Element)outlineNode); - if (curLevel == 0) { - return; - } - if (footnotesAtEndOfChapter() && footnotesLevel >= curLevel) { - insertFootnotes(hnode, false); - } - } - - private boolean getPageBreak(StyleWithProperties style) { + private boolean getPageBreak(StyleWithProperties style) { if (style!=null && nPageBreakSplit>XhtmlConfig.NONE) { // If we don't consider manual page breaks, we may have to consider the parent style if (style.isAutomatic() && nPageBreakSplit