getOdt().getDocumentStyles().getElementsByTagName(oth.getTextStyleNameAttribute());
} else if (e instanceof OdfTextParagraph) {// text:p
// System.out.println(e.getTextContent());
OdfTextParagraph otp = (OdfTextParagraph) e;
if (hasPageBreak(otp)) {
createNewResource();
}
newElement = getCurrentResource().getDocument().createElement("p");
if (dstElement != null) {
dstElement.add(newElement);
} else {
getCurrentResource().getDocument().getBody().add(newElement);
}
newElement.setClassName(otp.getStyleName().trim());
if (otp.getAutomaticStyle() != null) {// probabile che sia stato
// modificato lo stile
List<OdfStyleBase> classeCSS = new ArrayList<OdfStyleBase>();
OdfStyleBase p = otp.getAutomaticStyle().getParentStyle();
while (p != null) {
classeCSS.add(p);
p = p.getParentStyle();
}
Collections.reverse(classeCSS);
for (OdfStyleBase odfStyleBase : classeCSS) {
stylesPropsToCSS(odfStyleBase.getStyleProperties(), newElement.getClassName());
}
// while(p!=null){
// if(p.getAttribute("style:name")!=null&&p.getAttribute("style:name").trim().length()>0){
// newElement.setClassName(p.getAttribute("style:name").trim()+" "+newElement.getClassName());
// stylesPropsToCSS(p.getStyleProperties(),
// p.getAttribute("style:name"));
// }
// p=p.getParentStyle();
//
// }
// Object
// n=getXpath().evaluate("//style:style[@style:name='Body_20_Text_20_3']",
// getOdt().getDocumentStyles(), XPathConstants.NODE);
// n=getXpath().evaluate("//style:style[@style:name='Standard']",
// getOdt().getDocumentStyles(), XPathConstants.NODE);
// getXpath().evaluate("//style:style[@style:name='P38']",
// getOdt().getDocumentStyles(), XPathConstants.NODE)
stylesPropsToCSS(otp.getAutomaticStyle().getStyleProperties(), otp.getStyleName());
if (isDebugMode()) {
Utils.printStyleProps(otp.getAutomaticStyle().getStyleProperties());
}
}
} else if (e instanceof OdfTextSpan) {// text:span
// System.out.println(e.getTextContent());