Package org.docx4j.wml

Examples of org.docx4j.wml.CTSettings


 
  public CTSettings createSettings() {

    org.docx4j.wml.ObjectFactory wmlObjectFactory = new org.docx4j.wml.ObjectFactory();

    CTSettings settings = wmlObjectFactory.createCTSettings();
//    JAXBElement<org.docx4j.wml.CTSettings> settingsWrapped = wmlObjectFactory.createSettings(settings);


             
      // Create object for themeFontLang
      CTLanguage language = wmlObjectFactory.createCTLanguage();
      settings.setThemeFontLang(language);
          language.setVal( "ru-RU");
          language.setEastAsia( "ko-KR");


    return settings;
View Full Code Here


 
  public CTSettings createSettings() {

    org.docx4j.wml.ObjectFactory wmlObjectFactory = new org.docx4j.wml.ObjectFactory();

    CTSettings settings = wmlObjectFactory.createCTSettings();
//    JAXBElement<org.docx4j.wml.CTSettings> settingsWrapped = wmlObjectFactory.createSettings(settings);

    // Create object for characterSpacingControl
      CTCharacterSpacing characterspacing = wmlObjectFactory.createCTCharacterSpacing();
      settings.setCharacterSpacingControl(characterspacing);
          characterspacing.setVal(org.docx4j.wml.STCharacterSpacing.COMPRESS_PUNCTUATION);
      // Create object for noLineBreaksAfter
      CTKinsoku kinsoku = wmlObjectFactory.createCTKinsoku();
      settings.setNoLineBreaksAfter(kinsoku);
          kinsoku.setVal( "$([\\{£¥‘“〈《「『【〔$([{「£¥");
          kinsoku.setLang( "ja-JP");
      // Create object for noLineBreaksBefore
      CTKinsoku kinsoku2 = wmlObjectFactory.createCTKinsoku();
      settings.setNoLineBreaksBefore(kinsoku2);
          kinsoku2.setVal( " !%),-.:;?]}¢°’”‰′″℃、。々〉》」』】〕゛゜ゝゞ・ヽヾ!%),.:;?]}。」、・゙゚¢");
          kinsoku2.setLang( "ja-JP");
             
      // Create object for themeFontLang
      CTLanguage language = wmlObjectFactory.createCTLanguage();
      settings.setThemeFontLang(language);
          language.setVal( "en-US");
          language.setBidi( "km-KH");
          language.setEastAsia( "ja-JP");

View Full Code Here

 
  public CTSettings createSettings() {

    org.docx4j.wml.ObjectFactory wmlObjectFactory = new org.docx4j.wml.ObjectFactory();

    CTSettings settings = wmlObjectFactory.createCTSettings();
//    JAXBElement<org.docx4j.wml.CTSettings> settingsWrapped = wmlObjectFactory.createSettings(settings);


             
      // Create object for themeFontLang
      CTLanguage language = wmlObjectFactory.createCTLanguage();
      settings.setThemeFontLang(language);
          language.setVal( "ru-RU");
          language.setEastAsia( "ko-KR");


    return settings;
View Full Code Here

 
  public CTSettings createSettings() {

    org.docx4j.wml.ObjectFactory wmlObjectFactory = new org.docx4j.wml.ObjectFactory();

    CTSettings settings = wmlObjectFactory.createCTSettings();
//    JAXBElement<org.docx4j.wml.CTSettings> settingsWrapped = wmlObjectFactory.createSettings(settings);
        settings.setIgnorable( "w14");
        // Create object for characterSpacingControl
        CTCharacterSpacing characterspacing = wmlObjectFactory.createCTCharacterSpacing();
        settings.setCharacterSpacingControl(characterspacing);
            characterspacing.setVal(org.docx4j.wml.STCharacterSpacing.COMPRESS_PUNCTUATION);
        // Create object for compat
        CTCompat compat = wmlObjectFactory.createCTCompat();
        settings.setCompat(compat);
            // Create object for balanceSingleByteDoubleByteWidth
            BooleanDefaultTrue booleandefaulttrue = wmlObjectFactory.createBooleanDefaultTrue();
            compat.setBalanceSingleByteDoubleByteWidth(booleandefaulttrue);
           
        // <w:themeFontLang w:val="en-US" w:eastAsia="zh-CN"/>
        // Create object for themeFontLang
        CTLanguage language = wmlObjectFactory.createCTLanguage();
        settings.setThemeFontLang(language);
            language.setVal( "en-US");
            language.setEastAsia( "zh-CN");

    return settings;
   
View Full Code Here

   
   
    if (attachTemplate) {
      // Create settings part, and init content
      DocumentSettingsPart dsp = new DocumentSettingsPart();
      CTSettings settings = Context.getWmlObjectFactory().createCTSettings();
      dsp.setJaxbElement(settings);
      wordMLPackage.getMainDocumentPart().addTargetPart(dsp);
     
      // Create external rel
      RelationshipsPart rp = RelationshipsPart.createRelationshipsPartForPart(dsp);    
      org.docx4j.relationships.Relationship rel = new org.docx4j.relationships.ObjectFactory().createRelationship();
      rel.setType( Namespaces.ATTACHED_TEMPLATE  );
      rel.setTarget(templatePath);
      rel.setTargetMode("External");     
      rp.addRelationship(rel); // addRelationship sets the rel's @Id
     
      settings.setAttachedTemplate(
          (CTRel)XmlUtils.unmarshalString("<w:attachedTemplate xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:id=\"" + rel.getId() + "\"/>", Context.jc, CTRel.class)
          );
      
      // or (yuck)...
  //    CTRel id = new CTRel();
View Full Code Here

TOP

Related Classes of org.docx4j.wml.CTSettings

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.