OpenOffice API: How to turn off headers and footers
<p>I am struggling to make sense of the OpenOffice API. Thanks to SO I worked out how to turn on line numbering. Now I need to turn off headers and footers.
Getting the XPropertySet of a document XComponent 
XPropertySet propSet = UnoRuntime.queryInterface(XPropertySet.class, document);</p>

<p>and setting </p>

<p>propSet.setPropertyValue("HeaderIsOn", Boolean.FALSE);
  propSet.setPropertyValue("FooterIsOn", Boolean.FALSE);</p>

<p>is not working. Like a lot of others I cannot make sense of the documentation. </p>

<p>I have seen a Perl example (<a href="https://stackoverflow.com/questions/10021610/perl-openofficeoodoc-accessing-header-footer-elements">Perl OpenOffice::OODoc - accessing header/footer elements</a>) and cannot work out how to get the "master page" header/styles in Java. </p>

<p>Help! </p>