/** * Create an instance of {@link BooleanDefaultTrue } * */ public BooleanDefaultTrue createBooleanDefaultTrue() { return new BooleanDefaultTrue(); }
public TrCantSplit() { JAXBElement<BooleanDefaultTrue> cantSplit = Context.getWmlObjectFactory().createCTTrPrBaseCantSplit(new BooleanDefaultTrue()); setObject(cantSplit); }
plcHdr = Context.getWmlObjectFactory().createSdtPrShowingPlcHdr(new BooleanDefaultTrue() ); getRPrOrAliasOrLock().add(plcHdr); plcHdr.setValue(new BooleanDefaultTrue() );
public static void process(WordprocessingMLPackage wmlPackage) { Body body = wmlPackage.getMainDocumentPart().getJaxbElement().getBody(); if (body==null || body.getContent().size()==0) { log.warn("w:document/w:body null or empty"); return; } Object o = body.getContent().get(0); if (o instanceof P && ((P)o).getPPr()!=null) { PPr pPr = ((P)o).getPPr(); BooleanDefaultTrue val = new BooleanDefaultTrue(); val.setVal(Boolean.FALSE); pPr.setPageBreakBefore(val); } } }
this.jaxbElement.setAutoFormatOverride(new BooleanDefaultTrue()); this.jaxbElement.setStyleLockTheme(new BooleanDefaultTrue()); this.jaxbElement.setStyleLockQFSet(new BooleanDefaultTrue());
private static void updateParagraph(P paragraph) { boolean containsPageBreak = checkPageBreak(paragraph.getContent()); if (containsPageBreak) { if (paragraph.getPPr() == null) { paragraph.setPPr(new PPr()); } paragraph.getPPr().setPageBreakBefore(new BooleanDefaultTrue()); } }
newP.getPPr().setPageBreakBefore(new BooleanDefaultTrue()); newContent.add(newP); p.setPPr(pPr); BooleanDefaultTrue val = new BooleanDefaultTrue(); val.setVal(Boolean.FALSE); pPr.setPageBreakBefore(val);
rPr.setI( new BooleanDefaultTrue() ); rPr.setB( new BooleanDefaultTrue() );
/** * Enforces the protection with the option specified by passed editValue, password, and * HashAlgorithm for the password. * * @param editValue the protection type * @param password the plaintext password, if null no password will be applied * @param hashAlgo the hash algorithm - only md2, m5, sha1, sha256, sha384 and sha512 are supported. * if null, it will default default to sha512 (like Word 2013) * @since 3.3.0 */ public void protectRestrictEditing(org.docx4j.wml.STDocProtect editValue, String password, HashAlgorithm hashAlgo) { safeGetDocumentProtection().setEnforcement(true); safeGetDocumentProtection().setEdit(editValue); // Word 2010 doesn't enforce TRACKED_CHANGES, // unless <w:trackRevisions/> is also set! if (editValue==STDocProtect.TRACKED_CHANGES) { if (this.jaxbElement.getTrackRevisions()==null) { this.jaxbElement.setTrackRevisions(new BooleanDefaultTrue()); } } setProtectionPassword(password, hashAlgo); }
s.setLocked(new BooleanDefaultTrue());
if (insertPageBreak( pgSzThis, pgSzNext)) { ppr.setPageBreakBefore(new BooleanDefaultTrue());
/** * Create an instance of {@link BooleanDefaultTrue } * */ public BooleanDefaultTrue createBooleanDefaultTrue() { return new BooleanDefaultTrue(); }
wordMLPackage.getMainDocumentPart() .getDocumentSettingsPart().getJaxbElement() .setUpdateFields(new BooleanDefaultTrue());
public TrCantSplit() { JAXBElement<BooleanDefaultTrue> cantSplit = Context.getWmlObjectFactory().createCTTrPrBaseCantSplit(new BooleanDefaultTrue()); setObject(cantSplit); }
plcHdr = Context.getWmlObjectFactory().createSdtPrShowingPlcHdr(new BooleanDefaultTrue() ); getRPrOrAliasOrLock().add(plcHdr); plcHdr.setValue(new BooleanDefaultTrue() );
public static void process(WordprocessingMLPackage wmlPackage) { Body body = wmlPackage.getMainDocumentPart().getJaxbElement().getBody(); if (body==null || body.getContent().size()==0) { log.warn("w:document/w:body null or empty"); return; } Object o = body.getContent().get(0); if (o instanceof P && ((P)o).getPPr()!=null) { PPr pPr = ((P)o).getPPr(); BooleanDefaultTrue val = new BooleanDefaultTrue(); val.setVal(Boolean.FALSE); pPr.setPageBreakBefore(val); } } }
private void addRun( String cssClass, Map<String, CSSValue> cssMap, String theText, boolean isRTL) { R run = Context.getWmlObjectFactory().createR(); Text text = Context.getWmlObjectFactory().createText(); text.setValue( theText ); if (theText.startsWith(" ") || theText.endsWith(" ") ) { text.setSpace("preserve"); } run.getContent().add(text); getListForRun().getContent().add(run); // Run level styling RPr rPr = Context.getWmlObjectFactory().createRPr(); run.setRPr(rPr); formatRPr(rPr, cssClass, cssMap); if (isRTL) { rPr.setRtl(new BooleanDefaultTrue()); } }
private static void updateParagraph(P paragraph) { boolean containsPageBreak = checkPageBreak(paragraph.getContent()); if (containsPageBreak) { if (paragraph.getPPr() == null) { paragraph.setPPr(new PPr()); } paragraph.getPPr().setPageBreakBefore(new BooleanDefaultTrue()); } }
/** * Enforces the protection with the option specified by passed editValue, password, and * HashAlgorithm for the password. * * @param editValue the protection type * @param password the plaintext password, if null no password will be applied * @param hashAlgo the hash algorithm - only md2, m5, sha1, sha256, sha384 and sha512 are supported. * if null, it will default default to sha512 (like Word 2013) * @since 3.3.0 */ public void protectRestrictEditing(org.docx4j.wml.STDocProtect editValue, String password, HashAlgorithm hashAlgo) { safeGetDocumentProtection().setEnforcement(true); safeGetDocumentProtection().setEdit(editValue); // Word 2010 doesn't enforce TRACKED_CHANGES, // unless <w:trackRevisions/> is also set! if (editValue==STDocProtect.TRACKED_CHANGES) { if (this.jaxbElement.getTrackRevisions()==null) { this.jaxbElement.setTrackRevisions(new BooleanDefaultTrue()); } } setProtectionPassword(password, hashAlgo); }
ObjectFactory factory = Context.getWmlObjectFactory(); CTSimpleField ctSimple = factory.createCTSimpleField(); ctSimple.setInstr(" MergeField fieldValue \\* MERGEFORMAT "); RPr RPr = factory.createRPr(); RPr.setNoProof(new BooleanDefaultTrue()); Text t = factory.createText(); t.setValue("fieldValue"); R run = factory.createR(); run.getRunContent().add(RPr); run.getRunContent().add(t); ctSimple.getParagraphContent().add(run); JAXBElement<CTSimpleField> fldSimple = factory .createPFldSimple(ctSimple); // P P para = factory.createP(); para.getParagraphContent().add(fldSimple); Body body = factory.createBody(); body.getEGBlockLevelElts().add(para); wordMLPackage.getMainDocumentPart().addObject(body);