@Override public String getMceIgnorable() { return this.getJaxbElement().getIgnorable(); }
@Override protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper) { // NB if you add ignorable content, it is up to you to jaxbElement.setIgnorable correctly; see further McIgnorableNamespaceDeclarator // You don't need to worry about this if you are merely loading an existing part. namespacePrefixMapper.setMcIgnorable( this.getJaxbElement().getIgnorable() ); }
/** * Convenience method to getJaxbElement().getBody().getContent() * @since 2.7 */ public List<Object> getContent() { if (this.getJaxbElement()==null) { this.setJaxbElement( Context.getWmlObjectFactory().createFtr() ); } return this.getJaxbElement().getContent(); }
public static Node getEvenFooter(AbstractWmlConversionContext context) { ConversionSectionWrapper currentSection = context.getSections().getCurrentSection(); Ftr ftr = (Ftr)currentSection.getHeaderFooterPolicy().getEvenFooter().getJaxbElement(); return XmlUtils.marshaltoW3CDomDocument(ftr); }
public static Node getFirstFooter(AbstractWmlConversionContext context) { ConversionSectionWrapper currentSection = context.getSections().getCurrentSection(); Ftr ftr = (Ftr)currentSection.getHeaderFooterPolicy().getFirstFooter().getJaxbElement(); return XmlUtils.marshaltoW3CDomDocument(ftr); }
public static Node getDefaultFooter(AbstractWmlConversionContext context) { ConversionSectionWrapper currentSection = context.getSections().getCurrentSection(); Ftr ftr = (Ftr)currentSection.getHeaderFooterPolicy().getDefaultFooter().getJaxbElement(); return XmlUtils.marshaltoW3CDomDocument(ftr); }
@Override protected void appendSectionFooter(HTMLConversionContext conversionContext, Document document, ConversionSectionWrapper sectionWrapper, Element currentParent) throws Docx4JException { if (XsltCommonFunctions.hasDefaultFooter(conversionContext)) { appendPartContent( conversionContext, document, sectionWrapper, currentParent, "footer", sectionWrapper.getHeaderFooterPolicy().getDefaultFooter(), sectionWrapper.getHeaderFooterPolicy().getDefaultFooter().getJaxbElement().getContent()); } }
} else if (Namespaces.FOOTER.equals(rs.getType())) { elementList = ((FooterPart) relPart.getPart(rs)) .getJaxbElement().getContent(); } else if (Namespaces.ENDNOTES.equals(rs.getType())) {
} else if (Namespaces.FOOTER.equals(rs.getType())) { elementList = ((FooterPart) relPart.getPart(rs)) .getJaxbElement().getContent(); } else if (Namespaces.ENDNOTES.equals(rs.getType())) {
private void createDummyHeaderFooter() { synchronized (dummyHeaderFooterMutex) { if (dummyHeader == null) { ObjectFactory factory = new ObjectFactory(); try { dummyHeader = new HeaderPart(new PartName("/word/dummyheader.xml")); dummyFooter = new FooterPart(new PartName("/word/dummyfooter.xml")); } catch (InvalidFormatException e) { //should not happen } dummyHeader.setJaxbElement(factory.createHdr()); dummyHeader.getJaxbElement().getContent().add(factory.createP()); dummyFooter.setJaxbElement(factory.createFtr()); dummyFooter.getJaxbElement().getContent().add(factory.createP()); } } }
if ( part instanceof FooterPart ) { Ftr ftr = ((FooterPart)part).getJaxbElement(); finder.walkJAXBElements(ftr);
if ( part instanceof FooterPart ) { Ftr ftr = ((FooterPart)part).getJaxbElement(); finder.walkJAXBElements(ftr);
@Override public String getMceIgnorable() { return this.getJaxbElement().getIgnorable(); }
@Override protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper) { // NB if you add ignorable content, it is up to you to jaxbElement.setIgnorable correctly; see further McIgnorableNamespaceDeclarator // You don't need to worry about this if you are merely loading an existing part. namespacePrefixMapper.setMcIgnorable( this.getJaxbElement().getIgnorable() ); }
/** * Convenience method to getJaxbElement().getBody().getContent() * @since 2.7 */ public List<Object> getContent() { if (this.getJaxbElement()==null) { this.setJaxbElement( Context.getWmlObjectFactory().createFtr() ); } return this.getJaxbElement().getContent(); }
public static Node getEvenFooter(AbstractWmlConversionContext context) { ConversionSectionWrapper currentSection = context.getSections().getCurrentSection(); Ftr ftr = (Ftr)currentSection.getHeaderFooterPolicy().getEvenFooter().getJaxbElement(); return XmlUtils.marshaltoW3CDomDocument(ftr); }
public static Node getDefaultFooter(AbstractWmlConversionContext context) { ConversionSectionWrapper currentSection = context.getSections().getCurrentSection(); Ftr ftr = (Ftr)currentSection.getHeaderFooterPolicy().getDefaultFooter().getJaxbElement(); return XmlUtils.marshaltoW3CDomDocument(ftr); }
public static Node getFirstFooter(AbstractWmlConversionContext context) { ConversionSectionWrapper currentSection = context.getSections().getCurrentSection(); Ftr ftr = (Ftr)currentSection.getHeaderFooterPolicy().getFirstFooter().getJaxbElement(); return XmlUtils.marshaltoW3CDomDocument(ftr); }
@Override protected void appendSectionFooter(HTMLConversionContext conversionContext, Document document, ConversionSectionWrapper sectionWrapper, Element currentParent) throws Docx4JException { if (XsltCommonFunctions.hasDefaultFooter(conversionContext)) { appendPartContent( conversionContext, document, sectionWrapper, currentParent, "footer", sectionWrapper.getHeaderFooterPolicy().getDefaultFooter(), sectionWrapper.getHeaderFooterPolicy().getDefaultFooter().getJaxbElement().getContent()); } }
private void createDummyHeaderFooter() { synchronized (dummyHeaderFooterMutex) { if (dummyHeader == null) { ObjectFactory factory = new ObjectFactory(); try { dummyHeader = new HeaderPart(new PartName("/word/dummyheader.xml")); dummyFooter = new FooterPart(new PartName("/word/dummyfooter.xml")); } catch (InvalidFormatException e) { //should not happen } dummyHeader.setJaxbElement(factory.createHdr()); dummyHeader.getJaxbElement().getContent().add(factory.createP()); dummyFooter.setJaxbElement(factory.createFtr()); dummyFooter.getJaxbElement().getContent().add(factory.createP()); } } }