Fix for prev commit
This commit is contained in:
parent
759d3302e7
commit
ce0a5d5df9
2 changed files with 28 additions and 26 deletions
|
@ -10,6 +10,7 @@ import org.w3c.dom.Element;
|
|||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import pro.litvinovg.xml.Debug;
|
||||
import w2phtml.office.OfficeReader;
|
||||
|
||||
public class ListSplitter extends BasicSplitter implements ISplitter {
|
||||
|
@ -56,10 +57,8 @@ public class ListSplitter extends BasicSplitter implements ISplitter {
|
|||
list.removeChild(child);
|
||||
}
|
||||
}
|
||||
//Add text:continue-numbering="true"
|
||||
if (dataMoved){
|
||||
((Element) list).setAttribute(TEXT_CONTINUE_NUMBERING, "true");
|
||||
}
|
||||
// Debug.printNode(child);
|
||||
|
||||
break;
|
||||
} else {
|
||||
// Not with SPB yet, move node, set dataMoved=true
|
||||
|
@ -73,6 +72,7 @@ public class ListSplitter extends BasicSplitter implements ISplitter {
|
|||
}
|
||||
}
|
||||
if (dataMoved) {
|
||||
((Element) list).setAttribute(TEXT_CONTINUE_NUMBERING, "true");
|
||||
parent.insertBefore(listFirstPart, list);
|
||||
parent.insertBefore(softPageBreak, list);
|
||||
if (hangingItem != null) {
|
||||
|
@ -85,6 +85,9 @@ public class ListSplitter extends BasicSplitter implements ISplitter {
|
|||
list.removeChild(hangingItem);
|
||||
}
|
||||
|
||||
} else {
|
||||
//If SPB right before list items
|
||||
parent.insertBefore(softPageBreak, list);
|
||||
}
|
||||
|
||||
return dataMoved;
|
||||
|
|
|
@ -17,7 +17,6 @@ public class SplitFactory {
|
|||
System.exit(1);
|
||||
}
|
||||
String nodeName = node.getNodeName();
|
||||
System.out.println(nodeName);
|
||||
ISplitter splitter = null;
|
||||
if (nodeName.contentEquals(TEXT_SPAN)) {
|
||||
splitter = new SpanSplitter(officeReader, this);
|
||||
|
|
Loading…
Add table
Reference in a new issue