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

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


     * @param border
     * @see Borders for a list of all possible borders
     */
    public void setBorderBetween(Borders border) {
        CTPBdr ct = getCTPBrd(true);
        CTBorder pr = ct.isSetBetween() ? ct.getBetween() : ct.addNewBetween();
        if (border.getValue() == Borders.NONE.getValue())
            ct.unsetBetween();
        else
            pr.setVal(STBorder.Enum.forInt(border.getValue()));
    }
View Full Code Here


     * @see #setBorderBetween(Borders)
     * @see Borders for a list of all possible borders
     */
    public Borders getBorderBetween() {
        CTPBdr border = getCTPBrd(false);
        CTBorder ct = null;
        if (border != null) {
            ct = border.getBetween();
        }
        STBorder.Enum ptrn = ct != null ? ct.getVal() : STBorder.NONE;
        return Borders.valueOf(ptrn.intValue());
    }
View Full Code Here

    public void testAddPageBreak() {
  ctRun.addNewT().setStringValue("TEST STRING");
  ctRun.addNewBr();
  ctRun.addNewT().setStringValue("TEST2 STRING");
  CTBr breac=ctRun.addNewBr();
  breac.setClear(STBrClear.LEFT);
  ctRun.addNewT().setStringValue("TEST3 STRING");
        assertEquals(2, ctRun.sizeOfBrArray());
       
        XWPFRun run = new XWPFRun(CTR.Factory.newInstance(), p);
        run.setText("TEXT1");
View Full Code Here

  /**
   * Sets the default spelling language on ctStyles DocDefaults parameter
   * @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

  /**
   * Sets the default East Asia spelling language on ctStyles DocDefaults parameter
   * @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

  /**
   * Sets the default font on ctStyles DocDefaults parameter
   * @param fonts
   */
  public void setDefaultFonts(CTFonts fonts) {
    CTDocDefaults docDefaults = null;
    CTRPr runProps = 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(docDefaults == null)
      docDefaults = ctStyles.addNewDocDefaults();
    if(runProps == null)
      runProps = docDefaults.addNewRPrDefault().addNewRPr();

    runProps.setRFonts(fonts);
  }
View Full Code Here

  /**
   * Sets the default spelling language on ctStyles DocDefaults parameter
   * @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

  /**
   * Sets the default East Asia spelling language on ctStyles DocDefaults parameter
   * @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

  /**
   * Sets the default font on ctStyles DocDefaults parameter
   * @param fonts
   */
  public void setDefaultFonts(CTFonts fonts) {
    CTDocDefaults docDefaults = null;
    CTRPr runProps = 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(docDefaults == null)
      docDefaults = ctStyles.addNewDocDefaults();
    if(runProps == null)
      runProps = docDefaults.addNewRPrDefault().addNewRPr();

    runProps.setRFonts(fonts);
  }
View Full Code Here

  /**
   * Sets the default spelling language on ctStyles DocDefaults parameter
   * @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.CTDocDefaults

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.