private static void pasteSectPr(List<Object> contentList, SectPr sectPr) { P p = new P(); PPr ppr = Context.getWmlObjectFactory().createPPr(); p.setPPr(ppr); ppr.setSectPr(sectPr); contentList.add(1, p); }
private static SectPr cutSectPr(P p) { if (p.getPPr()!=null && p.getPPr().getSectPr()!=null) { SectPr sectPr = p.getPPr().getSectPr(); p.getPPr().setSectPr(null); return sectPr; } return null; }
((P) last).getPPr().setSectPr(null); sectPrs.remove(thisSectPr);
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; }
lastP.getPPr().setSectPr(thisSection);
dest.setPStyle(src.getPStyle()); if (src.getSectPr() != null) dest.setSectPr(src.getSectPr()); if (src.getShd() != null) dest.setShd(src.getShd());
private static void pasteSectPr(List<Object> contentList, SectPr sectPr) { P p = new P(); PPr ppr = Context.getWmlObjectFactory().createPPr(); p.setPPr(ppr); ppr.setSectPr(sectPr); contentList.add(1, p); }
private static SectPr cutSectPr(P p) { if (p.getPPr()!=null && p.getPPr().getSectPr()!=null) { SectPr sectPr = p.getPPr().getSectPr(); p.getPPr().setSectPr(null); return sectPr; } return null; }
private static int countHeader = 0; public static void createHeaderForSection(WordprocessingMLPackage wordprocessingMLPackage, String headerString) throws Exception { MainDocumentPart documentPart = wordprocessingMLPackage.getMainDocumentPart(); HeaderPart headerPart = new HeaderPart(new PartName("/word/header"+ (++countHeader) +".xml")); headerPart.setPackage(wordprocessingMLPackage); headerPart.addAltChunk(AltChunkType.Html, headerString.getBytes("UTF-8")); headerPart.setRelationshipType(Namespaces.HEADER); Relationship relationship = documentPart.addTargetPart(headerPart); SectPr sectPr = objectFactory.createSectPr(); HeaderReference headerReference = factory.createHeaderReference(); headerReference.setId(relationship.getId()); headerReference.setType(HdrFtrRef.DEFAULT); sectPr.getEGHdrFtrReferences().add(headerReference); P p = objectFactory.createP(); PPr ppr = objectFactory.createPPr(); p.setPPr(ppr); ppr.setSectPr(sectPr); wordprocessingMLPackage.getMainDocumentPart().getContent().add(p); }
((P) last).getPPr().setSectPr(null); sectPrs.remove(thisSectPr);
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; }
lastP.getPPr().setSectPr(thisSection);
dest.setPStyle(src.getPStyle()); if (src.getSectPr() != null) dest.setSectPr(src.getSectPr()); if (src.getShd() != null) dest.setShd(src.getShd());