Examples of newStyle()


Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeAutomaticStyles.newStyle()

    //3.0 create 4 kinds of styles
    OdfStyle lefttopStyle=null,leftbottomStyle=null,righttopStyle=null,rightbottomStyle=null;

    OdfPackageDocument document = dom.getDocument();
    if (!document.getMediaTypeString().equals(OdfMediaType.SPREADSHEET.getMediaTypeString())) {
      lefttopStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setLeftTopBorderStyleProperties(lefttopStyle);
 
      leftbottomStyle = styles.newStyle(OdfStyleFamily.TableCell);
      setLeftBottomBorderStylesProperties(leftbottomStyle);
 
View Full Code Here

Examples of org.odftoolkit.odfdom.incubator.doc.office.OdfOfficeStyles.newStyle()

    public void testCloneNode() {
        try {
            OdfDocument doc = OdfTextDocument.newTextDocument();
            OdfOfficeStyles styles = doc.getOrCreateDocumentStyles();

            OdfStyle p1 = styles.newStyle("P1", OdfStyleFamily.Paragraph);
            p1.setProperty(StyleTextPropertiesElement.FontSize, "42pt");

            OdfStyle clone = (OdfStyle) p1.cloneNode(true);
            clone.setStyleNameAttribute("p1-clone");
            styles.appendChild(clone);
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.