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) {
|
private Node addHeader(Node node) {
|
||||||
|
Node headerNode = null;
|
||||||
inHeader = true;
|
inHeader = true;
|
||||||
MasterPage masterPage = ofr.getFullMasterPage(currentMasterPage);
|
MasterPage masterPage = ofr.getFullMasterPage(currentMasterPage);
|
||||||
if (currentMasterPage != null) {
|
if (currentMasterPage != null) {
|
||||||
|
if (pageNum % 2 == 0) {
|
||||||
Node headerNode = masterPage.getHeader();
|
headerNode = masterPage.getHeaderLeft();
|
||||||
|
}
|
||||||
|
if (headerNode == null) {
|
||||||
|
headerNode = masterPage.getHeader();
|
||||||
|
}
|
||||||
if (headerNode != null) {
|
if (headerNode != null) {
|
||||||
//Create header element
|
//Create header element
|
||||||
Element headerElement = converter.createElement("header");
|
Element headerElement = converter.createElement("header");
|
||||||
|
@ -1874,12 +1878,16 @@ public class TextConverter extends ConverterHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Node addFooter(Node node) {
|
private Node addFooter(Node node) {
|
||||||
|
Node footerNode = null;
|
||||||
inFooter = true;
|
inFooter = true;
|
||||||
MasterPage masterPage = ofr.getFullMasterPage(currentMasterPage);
|
MasterPage masterPage = ofr.getFullMasterPage(currentMasterPage);
|
||||||
if (currentMasterPage != null) {
|
if (currentMasterPage != null) {
|
||||||
|
if (pageNum % 2 == 0) {
|
||||||
Node footerNode = masterPage.getFooter();
|
footerNode = masterPage.getFooterLeft();
|
||||||
|
}
|
||||||
|
if (footerNode == null) {
|
||||||
|
footerNode = masterPage.getFooter();
|
||||||
|
}
|
||||||
if (footerNode != null) {
|
if (footerNode != null) {
|
||||||
//Create footer element
|
//Create footer element
|
||||||
Element footerElement = converter.createElement("footer");
|
Element footerElement = converter.createElement("footer");
|
||||||
|
|
Loading…
Add table
Reference in a new issue