protected SectionWrapper(SectPr sectPr, HeaderFooterPolicy previousHF, RelationshipsPart rels, BooleanDefaultTrue evenAndOddHeaders) { // This should work even if sectPr is null this.sectPr = sectPr; if (sectPr==null) { log.warn("No (document level?) sectPr!"); } this.headerFooterPolicy = new HeaderFooterPolicy(sectPr, previousHF, rels, evenAndOddHeaders); page = new PageDimensions(sectPr); }
/** The dummy section wrappers only contains one section with all the document. Therefore * any sections within the document are ignored in the conversion process. As it doesn't * need to check for sections it is faster and the html-Output only uses one section.<br> * It will use the Header/Footer of the body sectPr. This isn't correct, if there are * several Sections in the document, but to find the correct SectPr it would need to check * the document content - and the aim of this method is a low overhead. * * @param wmlPackage * @param dummyPageNumbering * @return */ protected static List<ConversionSectionWrapper> processDummy(WordprocessingMLPackage wmlPackage, Document document, RelationshipsPart rels, BooleanDefaultTrue evenAndOddHeaders, boolean dummyPageNumbering) { log.debug("starting"); List<ConversionSectionWrapper> conversionSections = new ArrayList<ConversionSectionWrapper>(); ConversionSectionWrapper currentSectionWrapper = null; HeaderFooterPolicy previousHF = new HeaderFooterPolicy(document.getBody().getSectPr(), null, rels, evenAndOddHeaders); // SectionWrapper does work where sectPr is null (ie document has no body level sectPr), // so document.getBody().getSectPr() is ok currentSectionWrapper = createSectionWrapper( document.getBody().getSectPr(), previousHF, rels, evenAndOddHeaders, 1, document.getBody().getContent(), dummyPageNumbering); conversionSections.add(currentSectionWrapper); return conversionSections; }
previousHF = new HeaderFooterPolicy(ppr.getSectPr(), previousHF, rels, evenAndOddHeaders);
previousHF= new HeaderFooterPolicy();
protected SectionWrapper(SectPr sectPr, HeaderFooterPolicy previousHF, RelationshipsPart rels, BooleanDefaultTrue evenAndOddHeaders) { // This should work even if sectPr is null this.sectPr = sectPr; if (sectPr==null) { log.warn("No (document level?) sectPr!"); } this.headerFooterPolicy = new HeaderFooterPolicy(sectPr, previousHF, rels, evenAndOddHeaders); page = new PageDimensions(sectPr); }
/** The dummy section wrappers only contains one section with all the document. Therefore * any sections within the document are ignored in the conversion process. As it doesn't * need to check for sections it is faster and the html-Output only uses one section.<br> * It will use the Header/Footer of the body sectPr. This isn't correct, if there are * several Sections in the document, but to find the correct SectPr it would need to check * the document content - and the aim of this method is a low overhead. * * @param wmlPackage * @param dummyPageNumbering * @return */ protected static List<ConversionSectionWrapper> processDummy(WordprocessingMLPackage wmlPackage, Document document, RelationshipsPart rels, BooleanDefaultTrue evenAndOddHeaders, boolean dummyPageNumbering) { log.debug("starting"); List<ConversionSectionWrapper> conversionSections = new ArrayList<ConversionSectionWrapper>(); ConversionSectionWrapper currentSectionWrapper = null; HeaderFooterPolicy previousHF = new HeaderFooterPolicy(document.getBody().getSectPr(), null, rels, evenAndOddHeaders); // SectionWrapper does work where sectPr is null (ie document has no body level sectPr), // so document.getBody().getSectPr() is ok currentSectionWrapper = createSectionWrapper( document.getBody().getSectPr(), previousHF, rels, evenAndOddHeaders, 1, document.getBody().getContent(), dummyPageNumbering); conversionSections.add(currentSectionWrapper); return conversionSections; }
previousHF = new HeaderFooterPolicy(ppr.getSectPr(), previousHF, rels, evenAndOddHeaders);
previousHF= new HeaderFooterPolicy();