Examples of OdfOfficeAutomaticStyles


Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles

      // Add frame and image element
      TextPElement paraLast = (TextPElement) xpath.evaluate("//text:p[last()]", contentDom, XPathConstants.NODE);
      addImageToDocument(contentDom, paraLast);

      // Access/Update automatic styles
      OdfOfficeAutomaticStyles autoStyles = embDoc.getContentDom().getAutomaticStyles();
      OdfStyle autoStyle = autoStyles.getStyle("P1", OdfStyleFamily.Paragraph);
      Assert.assertEquals(autoStyle.getStyleNameAttribute(), "P1");
      Assert.assertEquals(autoStyle.getFamilyName(), "paragraph");

      // Access/Update styles.xml
      OdfStyle documentStyle = embDoc.getDocumentStyles().getStyle("myStyle", OdfStyleFamily.Paragraph);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.