Disabled pagebreaks while inserting footnotes

This commit is contained in:
George Litvinov 2017-03-13 18:10:17 +03:00 committed by Georgy Litvinov
parent 4b15993e1f
commit b55e16ff87

View file

@ -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