New code extracted in separate method
This commit is contained in:
parent
c13cb3abce
commit
bd2a30ce44
1 changed files with 8 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue