private CTDocProtect safeGetDocumentProtection() { if (this.getJaxbElement()==null) { this.jaxbElement=new CTSettings(); } CTDocProtect documentProtection = this.jaxbElement.getDocumentProtection(); if (documentProtection == null) { documentProtection = Context.getWmlObjectFactory().createCTDocProtect(); this.jaxbElement.setDocumentProtection(documentProtection); } return this.jaxbElement.getDocumentProtection(); }
if (this.jaxbElement.getAutoFormatOverride()==null) { this.jaxbElement.setAutoFormatOverride(new BooleanDefaultTrue()); if (this.jaxbElement.getStyleLockTheme()==null) { this.jaxbElement.setStyleLockTheme(new BooleanDefaultTrue()); if (this.jaxbElement.getStyleLockQFSet()==null) { this.jaxbElement.setStyleLockQFSet(new BooleanDefaultTrue());
if (this.jaxbElement.getDocId14()!=null) { needW14 = true; } else if (this.jaxbElement.getConflictMode() !=null) { needW14 = true; } else if (this.jaxbElement.getDiscardImageEditingData() !=null) { needW14 = true; } else if (this.jaxbElement.getDefaultImageDpi() !=null) { needW14 = true; if (this.jaxbElement.getChartTrackingRefBased()!=null) { needW15 = true; } else if (this.jaxbElement.getDocId15() !=null) { needW15 = true; this.jaxbElement.setIgnorable(mceIgnorableVal);
this.jaxbElement=new CTSettings(); CTRel relId = getJaxbElement().getAttachedTemplate(); if (relId==null) { relId = Context.getWmlObjectFactory().createCTRel(); new QName("http://schemas.openxmlformats.org/wordprocessingml/2006/main", "attachedTemplate"), CTRel.class, null, relId); this.getJaxbElement().setAttachedTemplate(je.getValue());
public void setWordCompatSetting(String name, String val) { CTCompat compat = this.getJaxbElement().getCompat(); if (compat==null) { log.debug("No w:settings/w:compat element; creating.."); } compat = Context.getWmlObjectFactory().createCTCompat(); this.getJaxbElement().setCompat(compat); CTCompatSetting theSetting = null; for (CTCompatSetting setting : compat.getCompatSetting() ) { if (setting.getUri().equals("http://schemas.microsoft.com/office/word") && setting.getName().equals(name)) { theSetting = setting; break; } } if (theSetting==null) { theSetting = Context.getWmlObjectFactory().createCTCompatSetting(); theSetting.setUri("http://schemas.microsoft.com/office/word"); theSetting.setName(name); compat.getCompatSetting().add(theSetting); } theSetting.setVal(val); }
/** * Create an instance of {@link CTSettings } * */ public CTSettings createCTSettings() { return new CTSettings(); }
/** * Get a compatibility setting in the Word namespace, by name * @param name * @return * @throws Docx4JException */ public CTCompatSetting getWordCompatSetting(String name) { CTCompat compat = this.getJaxbElement().getCompat(); if (compat==null) { log.warn("No w:settings/w:compat element"); return null; } /* w:name="overrideTableStyleFontSizeAndJustification" * w:uri="http://schemas.microsoft.com/office/word" * w:val="1" */ CTCompatSetting theSetting = null; for (CTCompatSetting setting : compat.getCompatSetting() ) { if (setting.getUri().equals("http://schemas.microsoft.com/office/word") && setting.getName().equals(name)) { theSetting = setting; break; } } return theSetting; }
if (docSettingsPart.getJaxbElement().getDecimalSymbol()!=null) { decimalSymbol = docSettingsPart.getJaxbElement().getDecimalSymbol().getVal();
this.jaxbElement=new CTSettings(); CTRel relId = getJaxbElement().getAttachedTemplate(); if (relId==null) { relId = Context.getWmlObjectFactory().createCTRel(); new QName("http://schemas.openxmlformats.org/wordprocessingml/2006/main", "attachedTemplate"), CTRel.class, null, relId); this.getJaxbElement().setAttachedTemplate(je.getValue());
public void setWordCompatSetting(String name, String val) { CTCompat compat = this.getJaxbElement().getCompat(); if (compat==null) { log.debug("No w:settings/w:compat element; creating.."); } compat = Context.getWmlObjectFactory().createCTCompat(); this.getJaxbElement().setCompat(compat); CTCompatSetting theSetting = null; for (CTCompatSetting setting : compat.getCompatSetting() ) { if (setting.getUri().equals("http://schemas.microsoft.com/office/word") && setting.getName().equals(name)) { theSetting = setting; break; } } if (theSetting==null) { theSetting = Context.getWmlObjectFactory().createCTCompatSetting(); theSetting.setUri("http://schemas.microsoft.com/office/word"); theSetting.setName(name); compat.getCompatSetting().add(theSetting); } theSetting.setVal(val); }
/** * @param createIfAbsent * @return * @throws InvalidFormatException * @since 3.3.0 */ public DocumentSettingsPart getDocumentSettingsPart(boolean createIfAbsent) throws InvalidFormatException { if (documentSettingsPart==null) { if (createIfAbsent) { documentSettingsPart = new DocumentSettingsPart(); this.addTargetPart(documentSettingsPart); documentSettingsPart.setContents(new CTSettings()); } else { return null; } } return documentSettingsPart; }
/** * Get a compatibility setting in the Word namespace, by name * @param name * @return * @throws Docx4JException */ public CTCompatSetting getWordCompatSetting(String name) { CTCompat compat = this.getJaxbElement().getCompat(); if (compat==null) { log.warn("No w:settings/w:compat element"); return null; } /* w:name="overrideTableStyleFontSizeAndJustification" * w:uri="http://schemas.microsoft.com/office/word" * w:val="1" */ CTCompatSetting theSetting = null; for (CTCompatSetting setting : compat.getCompatSetting() ) { if (setting.getUri().equals("http://schemas.microsoft.com/office/word") && setting.getName().equals(name)) { theSetting = setting; break; } } return theSetting; }
if (docSettingsPart.getJaxbElement().getDecimalSymbol()!=null) { decimalSymbol = docSettingsPart.getJaxbElement().getDecimalSymbol().getVal();
if (this.jaxbElement.getDocId14()!=null) { needW14 = true; } else if (this.jaxbElement.getConflictMode() !=null) { needW14 = true; } else if (this.jaxbElement.getDiscardImageEditingData() !=null) { needW14 = true; } else if (this.jaxbElement.getDefaultImageDpi() !=null) { needW14 = true; if (this.jaxbElement.getChartTrackingRefBased()!=null) { needW15 = true; } else if (this.jaxbElement.getDocId15() !=null) { needW15 = true; this.jaxbElement.setIgnorable(mceIgnorableVal);
if (this.jaxbElement.getAutoFormatOverride()==null) { this.jaxbElement.setAutoFormatOverride(new BooleanDefaultTrue()); if (this.jaxbElement.getStyleLockTheme()==null) { this.jaxbElement.setStyleLockTheme(new BooleanDefaultTrue()); if (this.jaxbElement.getStyleLockQFSet()==null) { this.jaxbElement.setStyleLockQFSet(new BooleanDefaultTrue());
private CTDocProtect safeGetDocumentProtection() { if (this.getJaxbElement()==null) { this.jaxbElement=new CTSettings(); } CTDocProtect documentProtection = this.jaxbElement.getDocumentProtection(); if (documentProtection == null) { documentProtection = Context.getWmlObjectFactory().createCTDocProtect(); this.jaxbElement.setDocumentProtection(documentProtection); } return this.jaxbElement.getDocumentProtection(); }
dsp.setJaxbElement(new CTSettings()); dsp.setOverrideTableStyleFontSizeAndJustification(true);
/** * Create an instance of {@link CTSettings } * */ public CTSettings createCTSettings() { return new CTSettings(); }
/** * @param createIfAbsent * @return * @throws InvalidFormatException * @since 3.3.0 */ public DocumentSettingsPart getDocumentSettingsPart(boolean createIfAbsent) throws InvalidFormatException { if (documentSettingsPart==null) { if (createIfAbsent) { documentSettingsPart = new DocumentSettingsPart(); this.addTargetPart(documentSettingsPart); documentSettingsPart.setContents(new CTSettings()); } else { return null; } } return documentSettingsPart; }
dsp.setJaxbElement(new CTSettings()); dsp.setOverrideTableStyleFontSizeAndJustification(true);