Uncertain what's the problem. Is it some deprecation?
In this case it is due to the Simple API, introduced by the IBM team.
I still work with the deprecated parts as I am free to change/refactor
more radical.
Name the problem and I will try to help.
Best regards,
Svante
Am 15.10.2013 21:22, schrieb Benson Margulies:
> Can someone help me out with the modern equivalent of the following?
>
>
> OdfTextProperties defaultTp =
> (OdfTextProperties)
> xpath.
>
> evaluate("/office:document-styles/office:styles/style:default-style/style:text-properties",
> stylesDom,
> XPathConstants.NODE);
> if (language == LanguageCode.ARABIC || language ==
> LanguageCode.PERSIAN || language == LanguageCode.PUSHTO) {
> defaultTp.setAttributeNS(OdfDocumentNamespace.STYLE.getUri(),
> "language-complex", language.ISO639_1());
> defaultTp.setAttributeNS(OdfDocumentNamespace.STYLE.getUri(),
> "font-name-complex", ARABIC_FONT_NAME);
> OdfFontFaceDecls fontFaceDecls = (OdfFontFaceDecls)
>
> xpath.evaluate("/office:document-content/office:font-face-decls",
> contentDom,
> XPathConstants.NODE);
> OdfFontFace face = new OdfFontFace(contentDom);
> face.setName(ARABIC_FONT_NAME);
> face.setFontFamily(ARABIC_FONT_NAME);
> face.setFontPitch(OdfFontPitchType.VARIABLE);
> face.setFontSize("20");
> fontFaceDecls.appendChild(face);
> }
>