*
* @return the footer of this text document.
* @since 0.5
*/
public Footer getFooter(boolean isFirstPage) {
Footer tmpFooter = isFirstPage ? firstPageFooter : standardFooter;
if (tmpFooter == null) {
try {
StyleMasterPageElement masterPageElement = getMasterPage(isFirstPage);
StyleFooterElement footerElement = OdfElement.findFirstChildNode(StyleFooterElement.class,
masterPageElement);
if (footerElement == null) {
footerElement = masterPageElement.newStyleFooterElement();
}
tmpFooter = new Footer(footerElement);
} catch (Exception e) {
Logger.getLogger(TextDocument.class.getName()).log(Level.SEVERE, null, e);
}
if (isFirstPage) {
firstPageFooter = tmpFooter;