Examples of TextProperties


Examples of org.odftoolkit.simple.style.TextProperties

   *            - script type
   * @return the language information for a specific script type
   */
  public String getLanguage(ScriptType type) {
    String language = null;
    TextProperties textProperties = getTextPropertiesForRead();
    if (textProperties != null)
      language = textProperties.getLanguage(type);
    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);
      language = parentStyleSetting.getLanguage(type);
      if (language != null && language.length() > 0)
        return language;

      if (parentStyle instanceof OdfDefaultStyle)
        isDefault = true;
      else
        parentStyle = getParentStyle((OdfStyle) parentStyle);
    }
    if (!isDefault) {
      OdfDefaultStyle defaultStyle = getCellDefaultStyle();
      TextProperties defaultStyleSetting = TextProperties.getTextProperties(defaultStyle);
      language = defaultStyleSetting.getLanguage(type);
    }
    return language;
  }
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.