New code extracted in separate method

This commit is contained in:
Georgy Litvinov 2020-01-10 11:39:42 +01:00
parent c13cb3abce
commit bd2a30ce44

View file

@ -607,21 +607,19 @@ public class PageSplitter {
}
}
//StyleWithProperties style = officeReader.getParStyle(Misc.getAttribute(paraAfter, XMLString.TEXT_STYLE_NAME));
String newStyleName = officeReader.cloneParStyle(Misc.getAttribute(paraAfter, XMLString.TEXT_STYLE_NAME));
removeIndent(paraAfter);
return dataMoved;
}
private static void removeIndent(Node paraAfter) {
String baseStyleName = Misc.getAttribute(paraAfter, XMLString.TEXT_STYLE_NAME);
String newStyleName = officeReader.cloneParStyle(baseStyleName);
Node styleAttr = paraAfter.getAttributes().getNamedItem(XMLString.TEXT_STYLE_NAME);
styleAttr.setTextContent(newStyleName);
StyleWithProperties newStyle = officeReader.getParStyle(Misc.getAttribute(paraAfter, XMLString.TEXT_STYLE_NAME));
//String propVal = style.getParProperty(XMLString.FO_TEXT_INDENT, true);
//System.out.println(propVal);
newStyle.setParProperty(XMLString.FO_TEXT_INDENT, "0");
//propVal = newStyle.getParProperty(XMLString.FO_TEXT_INDENT, true);
//System.out.println(propVal);
//System.out.println(Misc.getAttribute(paraAfter, XMLString.TEXT_STYLE_NAME));
return dataMoved;
}
// Returns true if soft-page-break found. Removes it if removeFound = true
private static void removeSPB(Node node) {