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());