Added logic for left and right side headers and footers
This commit is contained in:
parent
b336e22ca1
commit
1bf31d5358
1 changed files with 14 additions and 6 deletions
|
@ -1854,12 +1854,16 @@ public class TextConverter extends ConverterHelper {
|
|||
}
|
||||
|
||||
private Node addHeader(Node node) {
|
||||
|
||||
Node headerNode = null;
|
||||
inHeader = true;
|
||||
MasterPage masterPage = ofr.getFullMasterPage(currentMasterPage);
|
||||
if (currentMasterPage != null) {
|
||||
|
||||
Node headerNode = masterPage.getHeader();
|
||||
if (pageNum % 2 == 0) {
|
||||
headerNode = masterPage.getHeaderLeft();
|
||||
}
|
||||
if (headerNode == null) {
|
||||
headerNode = masterPage.getHeader();
|
||||
}
|
||||
if (headerNode != null) {
|
||||
//Create header element
|
||||
Element headerElement = converter.createElement("header");
|
||||
|
@ -1874,12 +1878,16 @@ public class TextConverter extends ConverterHelper {
|
|||
}
|
||||
|
||||
private Node addFooter(Node node) {
|
||||
|
||||
Node footerNode = null;
|
||||
inFooter = true;
|
||||
MasterPage masterPage = ofr.getFullMasterPage(currentMasterPage);
|
||||
if (currentMasterPage != null) {
|
||||
|
||||
Node footerNode = masterPage.getFooter();
|
||||
if (pageNum % 2 == 0) {
|
||||
footerNode = masterPage.getFooterLeft();
|
||||
}
|
||||
if (footerNode == null) {
|
||||
footerNode = masterPage.getFooter();
|
||||
}
|
||||
if (footerNode != null) {
|
||||
//Create footer element
|
||||
Element footerElement = converter.createElement("footer");
|
||||
|
|
Loading…
Add table
Reference in a new issue