/** * Create child element {@odf.element style:ruby-properties}. * * @return the element {@odf.element style:ruby-properties} */ public StyleRubyPropertiesElement newStyleRubyPropertiesElement() { StyleRubyPropertiesElement styleRubyProperties = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleRubyPropertiesElement.class); this.appendChild(styleRubyProperties); return styleRubyProperties; }
/** * Receives the value of the ODFDOM attribute representation <code>StyleAutoUpdateAttribute</code> , See {@odf.attribute style:auto-update} * * @return - the <code>Boolean</code> , the value or <code>null</code>, if the attribute is not set and no default value defined. */ public Boolean getStyleAutoUpdateAttribute() { StyleAutoUpdateAttribute attr = (StyleAutoUpdateAttribute) getOdfAttribute(OdfDocumentNamespace.STYLE, "auto-update"); if (attr != null) { return Boolean.valueOf(attr.booleanValue()); } return Boolean.valueOf(StyleAutoUpdateAttribute.DEFAULT_VALUE); }
/** * Set ODF style property with value * * @param property * @param value */ public void setProperty(OdfStyleProperty property, String value) { getOrCreateUnqiueAutomaticStyle().setProperty(property, value); }
/** * Create child element {@odf.element style:style}. * * @param styleFamilyValue the <code>String</code> value of <code>StyleFamilyAttribute</code>, see {@odf.attribute style:family} at specification * @param styleNameValue the <code>String</code> value of <code>StyleNameAttribute</code>, see {@odf.attribute style:name} at specification * @return the element {@odf.element style:style} */ public StyleStyleElement newStyleStyleElement(String styleFamilyValue, String styleNameValue) { StyleStyleElement styleStyle = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleStyleElement.class); styleStyle.setStyleFamilyAttribute(styleFamilyValue); styleStyle.setStyleNameAttribute(styleNameValue); this.appendChild(styleStyle); return styleStyle; }
if (styleBase instanceof StyleStyleElement) { StyleStyleElement styleElement = (StyleStyleElement) styleBase; styleName = styleElement.getStyleNameAttribute(); masterPageName = styleElement.getStyleMasterPageNameAttribute(); } else if (styleBase instanceof StylePageLayoutElement) { styleName = ((StylePageLayoutElement) styleBase)
/** * Sets the value of ODFDOM attribute representation <code>StyleListLevelAttribute</code> , See {@odf.attribute style:list-level} * * @param styleListLevelValue The type is <code>Integer</code> */ public void setStyleListLevelAttribute(Integer styleListLevelValue) { StyleListLevelAttribute attr = new StyleListLevelAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setIntValue(styleListLevelValue.intValue()); }
@Override public void visit( StyleStyleElement ele ) { if ( generateCSSComments ) { cssStyleSheet.setComment( "style:style @style:name= " + ele.getStyleNameAttribute() + ", @style:family=" + ele.getFamilyName() + " begin" ); } cssStyleSheet.startCSSStyleDeclaration( computeCSSClassName( ele ) ); super.visit( ele ); cssStyleSheet.endCSSStyleDeclaration(); if ( generateCSSComments ) { cssStyleSheet.setComment( "style:style @style:name= " + ele.getStyleNameAttribute() + ", @style:family=" + ele.getFamilyName() + " end" ); } }
private String compute(OdfStyleBase style, StringBuilder classNames, boolean first, String prefix) { if (style == null) { return null; } String familyName = style.getFamilyName(); String styleName = null; if (style instanceof StyleStyleElement) { styleName = ((StyleStyleElement) style).getStyleNameAttribute(); } else if (style instanceof StylePageLayoutElement) { styleName = ((StylePageLayoutElement) style) .getStyleNameAttribute(); } String className = getClassName(familyName, styleName); if (prefix != null) { className = className + prefix; } if (first) { classNames.append(className); } else { classNames.insert(0, ' '); classNames.insert(0, className); } style = style.getParentStyle(); if (style != null) { compute(style, classNames, false, prefix); } return className; }
/** * Retrieve ODF style property * * @param property * The style property * @return string for a property. */ public String getProperty(OdfStyleProperty property) { // first try automatic style StyleStyleElement style = mAutomaticStyle; if (style == null) { style = getOfficeStyle(); } if (style != null) { return style.getProperty(property); } return null; }
styleName = styleElement.getStyleNameAttribute(); masterPageName = styleElement.getStyleMasterPageNameAttribute();
/** * Sets the value of ODFDOM attribute representation <code>StyleDefaultOutlineLevelAttribute</code> , See {@odf.attribute style:default-outline-level} * * @param styleDefaultOutlineLevelValue The type is <code>Integer</code> */ public void setStyleDefaultOutlineLevelAttribute(Integer styleDefaultOutlineLevelValue) { StyleDefaultOutlineLevelAttribute attr = new StyleDefaultOutlineLevelAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setIntValue(styleDefaultOutlineLevelValue.intValue()); }
/** * Create child element {@odf.element style:style}. * * @param styleFamilyValue the <code>String</code> value of <code>StyleFamilyAttribute</code>, see {@odf.attribute style:family} at specification * @param styleNameValue the <code>String</code> value of <code>StyleNameAttribute</code>, see {@odf.attribute style:name} at specification * @return the element {@odf.element style:style} */ public StyleStyleElement newStyleStyleElement(String styleFamilyValue, String styleNameValue) { StyleStyleElement styleStyle = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleStyleElement.class); styleStyle.setStyleFamilyAttribute(styleFamilyValue); styleStyle.setStyleNameAttribute(styleNameValue); this.appendChild(styleStyle); return styleStyle; }
@Override public void visit(StyleStyleElement ele) { if (generateCSSComments) { cssStyleSheet.setComment("style:style @style:name= " + ele.getStyleNameAttribute() + ", @style:family=" + ele.getFamilyName() + " begin"); } cssStyleSheet.startCSSStyleDeclaration(computeCSSClassName(ele)); super.visit(ele); cssStyleSheet.endCSSStyleDeclaration(); if (generateCSSComments) { cssStyleSheet.setComment("style:style @style:name= " + ele.getStyleNameAttribute() + ", @style:family=" + ele.getFamilyName() + " end"); } }
if ( style instanceof StyleStyleElement ) styleName = ( (StyleStyleElement) style ).getStyleNameAttribute();
/** * Retrieve ODF style property * * @param property * The style property * @return string for a property. */ public String getProperty(OdfStyleProperty property) { // first try automatic style StyleStyleElement style = mAutomaticStyle; if (style == null) { style = getOfficeStyle(); } if (style != null) { return style.getProperty(property); } return null; }
styleName = styleElement.getStyleNameAttribute(); masterPageName = styleElement.getStyleMasterPageNameAttribute();
/** * Receives the value of the ODFDOM attribute representation <code>StyleNextStyleNameAttribute</code> , See {@odf.attribute style:next-style-name} * * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set and no default value defined. */ public String getStyleNextStyleNameAttribute() { StyleNextStyleNameAttribute attr = (StyleNextStyleNameAttribute) getOdfAttribute(OdfDocumentNamespace.STYLE, "next-style-name"); if (attr != null) { return String.valueOf(attr.getValue()); } return null; }
/** * Sets the value of ODFDOM attribute representation <code>StyleDefaultOutlineLevelAttribute</code> , See {@odf.attribute style:default-outline-level} * * @param styleDefaultOutlineLevelValue The type is <code>Integer</code> */ public void setStyleDefaultOutlineLevelAttribute(Integer styleDefaultOutlineLevelValue) { StyleDefaultOutlineLevelAttribute attr = new StyleDefaultOutlineLevelAttribute((OdfFileDom) this.ownerDocument); setOdfAttribute(attr); attr.setIntValue(styleDefaultOutlineLevelValue.intValue()); }
/** * Create child element {@odf.element style:table-column-properties}. * * @return the element {@odf.element style:table-column-properties} */ public StyleTableColumnPropertiesElement newStyleTableColumnPropertiesElement() { StyleTableColumnPropertiesElement styleTableColumnProperties = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleTableColumnPropertiesElement.class); this.appendChild(styleTableColumnProperties); return styleTableColumnProperties; }
/** * Create child element {@odf.element style:style}. * * @param styleFamilyValue the <code>String</code> value of <code>StyleFamilyAttribute</code>, see {@odf.attribute style:family} at specification * @param styleNameValue the <code>String</code> value of <code>StyleNameAttribute</code>, see {@odf.attribute style:name} at specification * @return the element {@odf.element style:style} */ public StyleStyleElement newStyleStyleElement(String styleFamilyValue, String styleNameValue) { StyleStyleElement styleStyle = ((OdfFileDom) this.ownerDocument).newOdfElement(StyleStyleElement.class); styleStyle.setStyleFamilyAttribute(styleFamilyValue); styleStyle.setStyleNameAttribute(styleNameValue); this.appendChild(styleStyle); return styleStyle; }