Reopen page container after exit from section as page styles could have changed.
This commit is contained in:
parent
3c10ed4b1c
commit
4c8548fc09
1 changed files with 13 additions and 4 deletions
|
@ -168,10 +168,10 @@ public class TextParser extends Parser {
|
|||
|
||||
if (pagination) {
|
||||
//ODFPageSplitter.splitOfficeText(onode, ofr);
|
||||
//Debug.prettyPrintXml(onode);
|
||||
//Debug.prettyPrintXml(onode.getOwnerDocument());
|
||||
SplitFactory splitters = new SplitFactory(ofr);
|
||||
splitters.split(onode);
|
||||
//Debug.prettyPrintXml(onode);
|
||||
//Debug.prettyPrintXml(onode.getOwnerDocument());
|
||||
}
|
||||
hnode = (Element)traverseBlockText(onode,hnode);
|
||||
|
||||
|
@ -430,10 +430,14 @@ public class TextParser extends Parser {
|
|||
|
||||
if (!displayHiddenText && "none".equals(Misc.getAttribute(onode,TEXT_DISPLAY))) { return hnode; }
|
||||
|
||||
if (pageWasOpened && !inTable) {hnode = docSep.closePage(hnode);}
|
||||
if (pageWasOpened && !inTable) {
|
||||
hnode = docSep.closePage(hnode);
|
||||
}
|
||||
boolean removeStyleAtExit = setSectionStyle(onode);
|
||||
|
||||
if (pageWasOpened && !inTable) {hnode = docSep.openPage(hnode, pageNum);}
|
||||
if (pageWasOpened && !inTable) {
|
||||
hnode = docSep.openPage(hnode, pageNum);
|
||||
}
|
||||
hnode = traverseBlockText(onode, hnode);
|
||||
if (isLast) {
|
||||
insertEndnotes((Element) hnode, sectionName);
|
||||
|
@ -445,6 +449,11 @@ public class TextParser extends Parser {
|
|||
pageContainer.removeStyle();
|
||||
}
|
||||
|
||||
if ( docSep.isPageOpened()) {
|
||||
hnode = docSep.closePage(hnode);
|
||||
hnode = docSep.openPage(hnode, pageNum);
|
||||
}
|
||||
|
||||
return hnode;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue