Refactored span splitter

This commit is contained in:
Georgy Litvinov 2020-07-24 15:28:32 +02:00
parent f3e6f8efa0
commit 70fc8b4307

View file

@ -671,14 +671,16 @@ public class ODFPageSplitter {
int i = 0;
while (childs.getLength() > i) {
Node child = childs.item(i);
String childName = child.getNodeName();
if (child.getNodeType() == Node.ELEMENT_NODE) {
if (containsSPB(child)) {
if (child.getNodeName().equals(TEXT_NOTE)) {
if (childName.equals(TEXT_NOTE)) {
splitText(((Element)child).getElementsByTagName(TEXT_NOTE_BODY).item(0), officeReader);
} else if (child.getNodeName().equals(TEXT_SPAN)){
} else if (childName.equals(TEXT_SPAN)){
handleSpan(child);
} else {
System.out.println("SPB INSIDE SPAN! HELP!");
System.out.println("Error. SPB in unknown element " + childName);
System.exit(1);
}
}
}