incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <ben...@basistech.com>
Subject Looking for help upgrading from older toolkit
Date Tue, 15 Oct 2013 19:22:24 GMT
 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);
        }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message