Package org.openxmlformats.schemas.wordprocessingml.x2006.main

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTLanguage


     *
     * @param indentation
     */

    public void setIndentationHanging(int indentation) {
        CTInd indent = getCTInd(true);
        BigInteger bi = new BigInteger("" + indentation);
        indent.setHanging(bi);
    }
View Full Code Here


     * firstLine value is ignored.
     *
     * @return indentation or null if indentation is not set
     */
    public int getIndentationHanging() {
        CTInd indentation = getCTInd(false);
        return (indentation != null && indentation.isSetHanging()) ? indentation.getHanging().intValue() : -1;
    }
View Full Code Here

     * assumed to be zero (if needed).
     *
     * @param indentation
     */
    public void setIndentationFirstLine(int indentation) {
        CTInd indent = getCTInd(true);
        BigInteger bi = new BigInteger("" + indentation);
        indent.setFirstLine(bi);
    }
View Full Code Here

     * assumed to be zero (if needed).
     *
     * @return indentation or null if indentation is not set
     */
    public int getIndentationFirstLine() {
        CTInd indentation = getCTInd(false);
        return (indentation != null && indentation.isSetFirstLine()) ? indentation.getFirstLine().intValue()
                : -1;
    }
View Full Code Here

     * Get a <b>copy</b> of the currently used CTPInd, if none is used, return
     * a new instance.
     */
    private CTInd getCTInd(boolean create) {
        CTPPr pr = getCTPPr();
        CTInd ct = pr.getInd() == null ? null : pr.getInd();
        if (create && ct == null)
            ct = pr.addNewInd();
        return ct;
    }
View Full Code Here

        assertEquals(STJc.LEFT.intValue(), p.getAlignment().getValue());

        CTP ctp = p.getCTP();
        CTPPr ppr = ctp.getPPr()== null? ctp.addNewPPr() : ctp.getPPr();

        CTJc align = ppr.addNewJc();
        align.setVal(STJc.CENTER);
        assertEquals(ParagraphAlignment.CENTER, p.getAlignment());

        p.setAlignment(ParagraphAlignment.BOTH);
        assertEquals(STJc.BOTH, ppr.getJc().getVal());
    }
View Full Code Here

     *
     * @param align the paragraph alignment to apply to this paragraph.
     */
    public void setAlignment(ParagraphAlignment align) {
        CTPPr pr = getCTPPr();
        CTJc jc = pr.isSetJc() ? pr.getJc() : pr.addNewJc();
        STJc.Enum en = STJc.Enum.forInt(align.getValue());
        jc.setVal(en);
    }
View Full Code Here

   * @param strSpellingLanguage
   */
  public void setSpellingLanguage(String strSpellingLanguage) {
    CTDocDefaults docDefaults = null;
    CTRPr runProps = null;
    CTLanguage lang = null;

    // Just making sure we use the members that have already been defined
    if(ctStyles.isSetDocDefaults()) {
      docDefaults = ctStyles.getDocDefaults();
      if(docDefaults.isSetRPrDefault()) {
        CTRPrDefault RPrDefault = docDefaults.getRPrDefault();
        if(RPrDefault.isSetRPr()) {
          runProps = RPrDefault.getRPr();
          if(runProps.isSetLang())
            lang = runProps.getLang();
        }
      }
    }

    if(docDefaults == null)
      docDefaults = ctStyles.addNewDocDefaults();
    if(runProps == null)
      runProps = docDefaults.addNewRPrDefault().addNewRPr();
    if(lang == null)
      lang = runProps.addNewLang();

    lang.setVal(strSpellingLanguage);
    lang.setBidi(strSpellingLanguage);
  }
View Full Code Here

   * @param strEastAsia
   */
  public void setEastAsia(String strEastAsia) {
    CTDocDefaults docDefaults = null;
    CTRPr runProps = null;
    CTLanguage lang = null;

    // Just making sure we use the members that have already been defined
    if(ctStyles.isSetDocDefaults()) {
      docDefaults = ctStyles.getDocDefaults();
      if(docDefaults.isSetRPrDefault()) {
        CTRPrDefault RPrDefault = docDefaults.getRPrDefault();
        if(RPrDefault.isSetRPr()) {
          runProps = RPrDefault.getRPr();
          if(runProps.isSetLang())
            lang = runProps.getLang();
        }
      }
    }

    if(docDefaults == null)
      docDefaults = ctStyles.addNewDocDefaults();
    if(runProps == null)
      runProps = docDefaults.addNewRPrDefault().addNewRPr();
    if(lang == null)
      lang = runProps.addNewLang();

    lang.setEastAsia(strEastAsia);
  }
View Full Code Here

   * @param strSpellingLanguage
   */
  public void setSpellingLanguage(String strSpellingLanguage) {
    CTDocDefaults docDefaults = null;
    CTRPr runProps = null;
    CTLanguage lang = null;

    // Just making sure we use the members that have already been defined
    if(ctStyles.isSetDocDefaults()) {
      docDefaults = ctStyles.getDocDefaults();
      if(docDefaults.isSetRPrDefault()) {
        CTRPrDefault RPrDefault = docDefaults.getRPrDefault();
        if(RPrDefault.isSetRPr()) {
          runProps = RPrDefault.getRPr();
          if(runProps.isSetLang())
            lang = runProps.getLang();
        }
      }
    }

    if(docDefaults == null)
      docDefaults = ctStyles.addNewDocDefaults();
    if(runProps == null)
      runProps = docDefaults.addNewRPrDefault().addNewRPr();
    if(lang == null)
      lang = runProps.addNewLang();

    lang.setVal(strSpellingLanguage);
    lang.setBidi(strSpellingLanguage);
  }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTLanguage

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.