Package org.odftoolkit.odfdom.dom.element

Examples of org.odftoolkit.odfdom.dom.element.OdfStyleBase


    if (country != null && country.length() > 0) {
      return country;
    }

    boolean isDefault = isUseDefaultStyle;
    OdfStyleBase parentStyle = null;
    if (!isDefault) {
      parentStyle = getParentStyle((OdfStyle) getCurrentUsedStyle());
    }
    while ((!isDefault) && (parentStyle != null)) {
      TextProperties parentStyleSetting = TextProperties.getTextProperties(parentStyle);
View Full Code Here


        && font.getFontStyle() != null && font.getTextLinePosition() != null) {
      return font;
    }

    boolean isDefault = isUseDefaultStyle;
    OdfStyleBase parentStyle = null;
    if (!isDefault) {
      parentStyle = getParentStyle((OdfStyle) getCurrentUsedStyle());
    }
    while ((!isDefault) && (parentStyle != null)) {
      TextProperties parentStyleSetting = TextProperties.getTextProperties(parentStyle);
View Full Code Here

    }
    if (language != null && language.length() > 0) {
      return language;
    }
    boolean isDefault = isUseDefaultStyle;
    OdfStyleBase parentStyle = null;
    if (!isDefault) {
      parentStyle = getParentStyle((OdfStyle) getCurrentUsedStyle());
    }
    while ((!isDefault) && (parentStyle != null)) {
      TextProperties parentStyleSetting = TextProperties.getTextProperties(parentStyle);
View Full Code Here

    if (tempAlign != null) {
      return tempAlign;
    }
    boolean isDefault = isUseDefaultStyle;
    // find in parent style definition
    OdfStyleBase parentStyle = null;
    if (!isDefault) {
      parentStyle = getParentStyle((OdfStyle) getCurrentUsedStyle());
    }
    while ((!isDefault) && (parentStyle != null)) {
      ParagraphProperties parentStyleSetting = ParagraphProperties.getParagraphProperties(parentStyle);
View Full Code Here

   * Get the style name of this paragraph
   *
   * @return - the style name
   */
  public String getStyleName() {
    OdfStyleBase style = getStyleHandler().getStyleElementForRead();
    if (style == null) {
      return "";
    }
    if (style instanceof OdfStyle)
      return ((OdfStyle) style).getStyleNameAttribute();
View Full Code Here

    } while (styles.getDateStyle(unique_name) != null);
    return unique_name;
  }

  private void setDataDisplayStyleName(String name) {
    OdfStyleBase styleElement = getStyleHandler().getStyleElementForWrite();
    if (styleElement != null) {
      styleElement.setOdfAttributeValue(OdfName.newName(
          OdfDocumentNamespace.STYLE, "data-style-name"), name);
    }
  }
View Full Code Here

   * @deprecated As of Simple version 0.3, replaced by
   *             <code>getHorizontalAlignmentType()</code>
   */
  @Deprecated
  public String getHorizontalAlignment() {
    OdfStyleBase styleElement = getStyleHandler().getStyleElementForRead();
    if (styleElement != null) {
      OdfStyleProperty property = OdfStyleProperty.get(OdfStylePropertiesSet.ParagraphProperties, OdfName
          .newName(OdfDocumentNamespace.FO, "text-align"));
      return styleElement.getProperty(property);
    }
    return null;
  }
View Full Code Here

    }
    if (FoTextAlignAttribute.Value.RIGHT.toString().equalsIgnoreCase(horizontalAlignment)) {
      horizontalAlignment = FoTextAlignAttribute.Value.END.toString();
    }
    splitRepeatedCells();
    OdfStyleBase styleElement = getStyleHandler().getStyleElementForWrite();
    if (styleElement != null) {
      OdfStyleProperty property = OdfStyleProperty.get(OdfStylePropertiesSet.ParagraphProperties, OdfName
          .newName(OdfDocumentNamespace.FO, "text-align"));
      if (horizontalAlignment != null) {
        styleElement.setProperty(property, horizontalAlignment);
      } else {
        styleElement.removeProperty(property);
      }
    }
  }
View Full Code Here

   * @deprecated As of Simple version 0.3, replaced by
   *             <code>getVerticalAlignmentType()</code>
   */
  @Deprecated
  public String getVerticalAlignment() {
    OdfStyleBase styleElement = getStyleHandler().getStyleElementForRead();
    if (styleElement != null) {
      OdfStyleProperty property = OdfStyleProperty.get(OdfStylePropertiesSet.TableCellProperties, OdfName
          .newName(OdfDocumentNamespace.STYLE, "vertical-align"));
      return styleElement.getProperty(property);
    }
    return null;
  }
View Full Code Here

   *             <code>setVerticalAlignment(SimpleVerticalAlignmentType)</code>
   */
  @Deprecated
  public void setVerticalAlignment(String verticalAlignment) {
    splitRepeatedCells();
    OdfStyleBase styleElement = getStyleHandler().getStyleElementForWrite();
    if (styleElement != null) {
      OdfStyleProperty property = OdfStyleProperty.get(OdfStylePropertiesSet.TableCellProperties, OdfName
          .newName(OdfDocumentNamespace.STYLE, "vertical-align"));
      if (verticalAlignment != null) {
        styleElement.setProperty(property, verticalAlignment);
      } else {
        styleElement.removeProperty(property);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.OdfStyleBase

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.