Examples of ParagraphProperties


Examples of org.apache.poi.hwpf.usermodel.ParagraphProperties

  protected Paragraph insertBefore(ParagraphProperties props, int styleIndex, String text)
    //throws UnsupportedEncodingException
  {
    initAll();
    StyleSheet ss = _doc.getStyleSheet();
    ParagraphProperties baseStyle = ss.getParagraphStyle(styleIndex);
    CharacterProperties baseChp = ss.getCharacterStyle(styleIndex);

    byte[] grpprl = ParagraphSprmCompressor.compressParagraphProperty(props, baseStyle);
    byte[] withIndex = new byte[grpprl.length + LittleEndian.SHORT_SIZE];
    LittleEndian.putShort(withIndex, (short)styleIndex);
View Full Code Here

Examples of org.odftoolkit.simple.style.ParagraphProperties

   * @return the horizontal alignment; null if there is no horizontal
   *         alignment setting.
   */
  public HorizontalAlignmentType getHorizontalAlignment() {
    HorizontalAlignmentType tempAlign = null;
    ParagraphProperties properties = getParagraphPropertiesForRead();
    if (properties != null) {
      tempAlign = properties.getHorizontalAlignment();
    }
    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);
      tempAlign = parentStyleSetting.getHorizontalAlignment();
      if (tempAlign != null) {
        return tempAlign;
      }
      if (parentStyle instanceof OdfDefaultStyle) {
        isDefault = true;
      } else {
        parentStyle = getParentStyle((OdfStyle) parentStyle);
      }
    }
    // find in default style definition
    if (!isDefault) {
      OdfDefaultStyle defaultStyle = getParagraphDefaultStyle();
      ParagraphProperties defaultStyleSetting = ParagraphProperties.getParagraphProperties(defaultStyle);
      tempAlign = defaultStyleSetting.getHorizontalAlignment();
    }
    // use default
    if (tempAlign == null) {
      return HorizontalAlignmentType.DEFAULT;
    }
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.