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

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


   * @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

   * @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

   * @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

        XWPFParagraph p = doc.createParagraph();

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

        CTOnOff wordWrap = ppr.addNewWordWrap();
        wordWrap.setVal(STOnOff.FALSE);
        assertEquals(false, p.isWordWrap());

        p.setWordWrap(true);
        assertEquals(STOnOff.TRUE, ppr.getWordWrap().getVal());
    }
View Full Code Here

        XWPFParagraph p = doc.createParagraph();

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

        CTOnOff pageBreak = ppr.addNewPageBreakBefore();
        pageBreak.setVal(STOnOff.FALSE);
        assertEquals(false, p.isPageBreak());

        p.setPageBreak(true);
        assertEquals(STOnOff.TRUE, ppr.getPageBreakBefore().getVal());
    }
View Full Code Here

     * @param pageBreak -
     *                  boolean value
     */
    public void setPageBreak(boolean pageBreak) {
        CTPPr ppr = getCTPPr();
        CTOnOff ct_pageBreak = ppr.isSetPageBreakBefore() ? ppr
                .getPageBreakBefore() : ppr.addNewPageBreakBefore();
        if (pageBreak)
            ct_pageBreak.setVal(STOnOff.TRUE);
        else
            ct_pageBreak.setVal(STOnOff.FALSE);
    }
View Full Code Here

     *
     * @return boolean - if page break is set
     */
    public boolean isPageBreak() {
        CTPPr ppr = getCTPPr();
        CTOnOff ct_pageBreak = ppr.isSetPageBreakBefore() ? ppr
                .getPageBreakBefore() : null;
        if (ct_pageBreak != null
                && ct_pageBreak.getVal().intValue() == STOnOff.INT_TRUE) {
            return true;
        }
        return false;
    }
View Full Code Here

     * line (breaking on the word level).
     *
     * @param wrap - boolean
     */
    public void setWordWrap(boolean wrap) {
        CTOnOff wordWrap = getCTPPr().isSetWordWrap() ? getCTPPr()
                .getWordWrap() : getCTPPr().addNewWordWrap();
        if (wrap)
            wordWrap.setVal(STOnOff.TRUE);
        else
            wordWrap.unsetVal();
    }
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.