@Override public List<Object> apply(Object o) { if (firstSectPr==null && (o instanceof P)) { P p = (P)o; if ( p.getPPr()!=null && p.getPPr().getSectPr()!=null ) { // System.out.println("Found sectpr!"); enclosingP = (P)o; // just for sample MergeBlockRangeNViaTraversalUtilsSectPr firstSectPr = p.getPPr().getSectPr(); } } return null; }
@Override public List<Object> apply(Object o) { if (o instanceof org.docx4j.wml.P && ((org.docx4j.wml.P)o).getPPr() != null && ((org.docx4j.wml.P)o).getPPr().getSectPr() != null ) { // this sdt contains a sectPr, so add it // and all its ancestor sdts to the ones we need to delete for (SdtBlock sdt : ll) { if (!sdtBlocks.contains(sdt) ) { sdtBlocks.add((SdtBlock)sdt); } } } return null; }
public static boolean isEmpty(PPr pPr) { return (pPr == null) || (isEmpty((PPrBase)pPr) && isEmpty(pPr.getRPr()) && isEmpty(pPr.getSectPr() ) ); }
public static PPr apply(PPr source, PPr destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createPPr(); apply((PPrBase)source, (PPrBase)destination); destination.setRPr(apply(source.getRPr(), destination.getRPr())); destination.setSectPr(apply(source.getSectPr(), destination.getSectPr())); } return destination; }
if (((org.docx4j.wml.P)o).getPPr() != null ) { org.docx4j.wml.PPr ppr = ((org.docx4j.wml.P)o).getPPr(); if (ppr.getSectPr()!=null) { sectPrs.add(ppr.getSectPr()); if (last instanceof P && ((P) last).getPPr()!=null && ((P) last).getPPr().getSectPr() !=null) { SectPr thisSectPr = ((P) last).getPPr().getSectPr(); document.getBody().setSectPr(thisSectPr); ((P) last).getPPr().setSectPr(null);
if (ppr.getSectPr()!=null) { previousHF = new HeaderFooterPolicy(ppr.getSectPr(), previousHF, rels, evenAndOddHeaders); PgSz pgSzThis = ppr.getSectPr().getPgSz(); PgSz pgSzNext = followingSectPr.getPgSz(); if (insertPageBreak( pgSzThis, pgSzNext)) { ppr.getSectPr(), previousHF, rels, evenAndOddHeaders, ++conversionSectionIndex, sectionContent, dummyPageNumbering); conversionSections.add(currentSectionWrapper);
@Override public List<Object> apply(Object o) { if (firstSectPr==null && (o instanceof P)) { P p = (P)o; if ( p.getPPr()!=null && p.getPPr().getSectPr()!=null ) { // System.out.println("Found sectpr!"); enclosingP = (P)o; // just for sample MergeBlockRangeNViaTraversalUtilsSectPr firstSectPr = p.getPPr().getSectPr(); } } return null; }
@Override public List<Object> apply(Object o) { if (o instanceof org.docx4j.wml.P && ((org.docx4j.wml.P)o).getPPr() != null && ((org.docx4j.wml.P)o).getPPr().getSectPr() != null ) { // this sdt contains a sectPr, so add it // and all its ancestor sdts to the ones we need to delete for (SdtBlock sdt : ll) { if (!sdtBlocks.contains(sdt) ) { sdtBlocks.add((SdtBlock)sdt); } } } return null; }
public static boolean isEmpty(PPr pPr) { return (pPr == null) || (isEmpty((PPrBase)pPr) && isEmpty(pPr.getRPr()) && isEmpty(pPr.getSectPr() ) ); }
public static PPr apply(PPr source, PPr destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createPPr(); apply((PPrBase)source, (PPrBase)destination); destination.setRPr(apply(source.getRPr(), destination.getRPr())); destination.setSectPr(apply(source.getSectPr(), destination.getSectPr())); } return destination; }