Package org.odftoolkit.odfdom.type

Examples of org.odftoolkit.odfdom.type.StyleNameRef


    if ((mAutomaticStyle == null)
        || (mAutomaticStyle.getStyleUserCount() > 1)) {
      // we need a new automatic style
      OdfOfficeAutomaticStyles automatic_styles = getAutomaticStyles();
      if (automatic_styles != null) {
        StyleNameRef sParentStyleName = null;
        if (mAutomaticStyle == null) {
          mAutomaticStyle = automatic_styles.newStyle(getStyleFamily());
          sParentStyleName = new StyleNameRef(getStyleName());
        } else {
          String nameAttr = mAutomaticStyle.getStyleParentStyleNameAttribute();
          sParentStyleName = new StyleNameRef(nameAttr == null ? "" : nameAttr);
          mAutomaticStyle.removeStyleUser(this);
          mAutomaticStyle = automatic_styles.makeStyleUnique(mAutomaticStyle);
        }

        mAutomaticStyle.addStyleUser(this);

        if ((sParentStyleName != null)
            && (sParentStyleName.toString().length() != 0)) {
          mAutomaticStyle.setStyleParentStyleNameAttribute(sParentStyleName.toString());
        }
        setStyleName(mAutomaticStyle.getStyleNameAttribute());
      }
    }
    return mAutomaticStyle;
View Full Code Here


    if ((mAutomaticStyle == null)
        || (mAutomaticStyle.getStyleUserCount() > 1)) {
      // we need a new automatic style
      OdfOfficeAutomaticStyles automatic_styles = getAutomaticStyles();
      if (automatic_styles != null) {
        StyleNameRef sParentStyleName = null;
        if (mAutomaticStyle == null) {
          mAutomaticStyle = automatic_styles.newStyle(getStyleFamily());
          sParentStyleName = new StyleNameRef(getStyleName());
        } else {
          String nameAttr = mAutomaticStyle.getStyleParentStyleNameAttribute();
          sParentStyleName = new StyleNameRef(nameAttr == null ? "" : nameAttr);
          mAutomaticStyle.removeStyleUser(this);
          mAutomaticStyle = automatic_styles.makeStyleUnique(mAutomaticStyle);
        }

        mAutomaticStyle.addStyleUser(this);

        if ((sParentStyleName != null)
            && (sParentStyleName.toString().length() != 0)) {
          mAutomaticStyle.setStyleParentStyleNameAttribute(sParentStyleName.toString());
        }
        setStyleName(mAutomaticStyle.getStyleNameAttribute());
      }
    }
    return mAutomaticStyle;
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.type.StyleNameRef

Copyright © 2018 www.massapicom. 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.