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 headingTags = config.getHeadingTags();
|
||||||
private String pageTags = config.getPageTags();
|
private String pageTags = config.getPageTags();
|
||||||
private boolean breakBeforeNextNode = false;
|
private boolean breakBeforeNextNode = false;
|
||||||
|
private boolean inTable = false;
|
||||||
|
|
||||||
public TextConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) {
|
public TextConverter(OfficeReader ofr, XhtmlConfig config, Converter converter) {
|
||||||
super(ofr,config,converter);
|
super(ofr,config,converter);
|
||||||
|
@ -252,7 +253,7 @@ public class TextConverter extends ConverterHelper {
|
||||||
String nodeName = child.getNodeName();
|
String nodeName = child.getNodeName();
|
||||||
// Block splitting
|
// Block splitting
|
||||||
nDontSplitLevel++;
|
nDontSplitLevel++;
|
||||||
|
|
||||||
if (OfficeReader.isDrawElement(child)) {
|
if (OfficeReader.isDrawElement(child)) {
|
||||||
getDrawCv().handleDrawElement((Element)child,(Element)hnode,null,nFloatMode);
|
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));
|
StyleWithProperties style = ofr.getTableStyle(Misc.getAttribute(child, XMLString.TABLE_STYLE_NAME));
|
||||||
hnode = processPageBreaks(child, hnode,style);
|
hnode = processPageBreaks(child, hnode,style);
|
||||||
hnode = maybeSplit(hnode,style);
|
hnode = maybeSplit(hnode,style);
|
||||||
|
inTable = true;
|
||||||
getTableCv().handleTable(child,hnode);
|
getTableCv().handleTable(child,hnode);
|
||||||
|
inTable = false;
|
||||||
}
|
}
|
||||||
else if (nodeName.equals(XMLString.TABLE_SUB_TABLE)) {
|
else if (nodeName.equals(XMLString.TABLE_SUB_TABLE)) {
|
||||||
getTableCv().handleTable(child,hnode);
|
getTableCv().handleTable(child,hnode);
|
||||||
|
@ -1607,6 +1610,16 @@ public class TextConverter extends ConverterHelper {
|
||||||
Misc.getPosInteger(node.getAttribute(XMLString.TEXT_LEVEL),1);
|
Misc.getPosInteger(node.getAttribute(XMLString.TEXT_LEVEL),1);
|
||||||
}
|
}
|
||||||
private Node processPageBreaks(Node currentNode, Node hnode,StyleWithProperties style){
|
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;
|
Integer newPageNumber = null;
|
||||||
if (style != null) {
|
if (style != null) {
|
||||||
// If style:paragraph-properties extists and contain
|
// If style:paragraph-properties extists and contain
|
||||||
|
|
Loading…
Add table
Reference in a new issue