split list in sections
This commit is contained in:
parent
a5baa6eda1
commit
b336e22ca1
1 changed files with 12 additions and 1 deletions
|
@ -25,6 +25,7 @@ public class PageSplitter {
|
|||
//Loop through the content nodes and split paragraph nodes with soft page break
|
||||
while (i < nodes.getLength()){
|
||||
Node child = nodes.item(i);
|
||||
//System.out.println("splitSoftPageBreak ");
|
||||
|
||||
//Necessary check if node is an Element
|
||||
if ((child.getNodeType() == Node.ELEMENT_NODE) && containsSPB(child)){
|
||||
|
@ -52,9 +53,12 @@ public class PageSplitter {
|
|||
style = ofr.getTableStyle(Misc.getAttribute(child, XMLString.TEXT_LIST_STYLE));
|
||||
}
|
||||
} else if (nodeName.equals(XMLString.TEXT_SECTION)) {
|
||||
//System.out.println("Get into Section ");
|
||||
|
||||
if (handleSection(childFirstPart, child)){
|
||||
onode.insertBefore(childFirstPart, child);
|
||||
style = ofr.getTableStyle(Misc.getAttribute(child, XMLString.TEXT_SECTION));
|
||||
//System.out.println("Data moved");
|
||||
}
|
||||
} else if (nodeName.equals(XMLString.TEXT_TABLE_OF_CONTENT)){
|
||||
//HACK
|
||||
|
@ -466,7 +470,9 @@ public class PageSplitter {
|
|||
Node sectionChildNode = sectionChildNodes.item(0);
|
||||
if ((sectionChildNode.getNodeType() == Node.ELEMENT_NODE)) {
|
||||
String nodeName = sectionChildNode.getNodeName();
|
||||
// System.out.println("Nodename " + nodeName);
|
||||
if (containsSPB(sectionChildNode)){
|
||||
// System.out.println("Contains spb");
|
||||
Node sectionChildFirstPart = sectionChildNode.cloneNode(false);
|
||||
if (nodeName.equals(XMLString.TEXT_SOFT_PAGE_BREAK)){
|
||||
// remove inner soft page break node
|
||||
|
@ -494,7 +500,12 @@ public class PageSplitter {
|
|||
sectionFirstPart.appendChild(sectionChildFirstPart);
|
||||
dataMoved=true;
|
||||
}
|
||||
}
|
||||
} else if (nodeName.equals(XMLString.TEXT_LIST)) {
|
||||
if (handleList(sectionChildFirstPart, sectionChildNode)){
|
||||
sectionFirstPart.appendChild(sectionChildFirstPart);
|
||||
dataMoved=true;
|
||||
}
|
||||
}
|
||||
//split node with spb and exit
|
||||
break;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue