Fixed inner table duplicate master page style
This commit is contained in:
parent
62258abbf2
commit
bf765cac21
1 changed files with 14 additions and 1 deletions
|
@ -109,6 +109,7 @@ public class TextConverter extends ConverterHelper {
|
|||
private String headingTags = config.getHeadingTags();
|
||||
private String pageTags = config.getPageTags();
|
||||
private boolean breakBeforeNextNode = false;
|
||||
private boolean inTable = false;
|
||||
|
||||
public TextConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) {
|
||||
super(ofr,config,converter);
|
||||
|
@ -252,7 +253,7 @@ public class TextConverter extends ConverterHelper {
|
|||
String nodeName = child.getNodeName();
|
||||
// Block splitting
|
||||
nDontSplitLevel++;
|
||||
|
||||
|
||||
if (OfficeReader.isDrawElement(child)) {
|
||||
getDrawCv().handleDrawElement((Element)child,(Element)hnode,null,nFloatMode);
|
||||
}
|
||||
|
@ -332,7 +333,9 @@ public class TextConverter extends ConverterHelper {
|
|||
StyleWithProperties style = ofr.getTableStyle(Misc.getAttribute(child, XMLString.TABLE_STYLE_NAME));
|
||||
hnode = processPageBreaks(child, hnode,style);
|
||||
hnode = maybeSplit(hnode,style);
|
||||
inTable = true;
|
||||
getTableCv().handleTable(child,hnode);
|
||||
inTable = false;
|
||||
}
|
||||
else if (nodeName.equals(XMLString.TABLE_SUB_TABLE)) {
|
||||
getTableCv().handleTable(child,hnode);
|
||||
|
@ -1607,6 +1610,16 @@ public class TextConverter extends ConverterHelper {
|
|||
Misc.getPosInteger(node.getAttribute(XMLString.TEXT_LEVEL),1);
|
||||
}
|
||||
private Node processPageBreaks(Node currentNode, Node hnode,StyleWithProperties style){
|
||||
//Check for paragraph in current node in case currentNode is table
|
||||
// If currentNode is table
|
||||
//check for first para inside
|
||||
// Check it's master page, pageNumber, Page break before - if we already set MP - throw it away
|
||||
// And make a note to pass this paragraph next time you'll meet it.
|
||||
if (inTable){
|
||||
return hnode;
|
||||
}
|
||||
|
||||
|
||||
Integer newPageNumber = null;
|
||||
if (style != null) {
|
||||
// If style:paragraph-properties extists and contain
|
||||
|
|
Loading…
Add table
Reference in a new issue