Do not create ODF Section div in case creating Greenstone sections to split document later.
This commit is contained in:
parent
bf765cac21
commit
512850e280
1 changed files with 24 additions and 17 deletions
|
@ -474,27 +474,34 @@ public class TextConverter extends ConverterHelper {
|
||||||
String sName = Misc.getAttribute(onode,XMLString.TEXT_NAME);
|
String sName = Misc.getAttribute(onode,XMLString.TEXT_NAME);
|
||||||
String sStyleName = Misc.getAttribute(onode,XMLString.TEXT_STYLE_NAME);
|
String sStyleName = Misc.getAttribute(onode,XMLString.TEXT_STYLE_NAME);
|
||||||
////closePageSection
|
////closePageSection
|
||||||
Element div = converter.createElement("div");
|
Element div = (Element) hnode;
|
||||||
//close page before enter
|
if (headingTags == null) {
|
||||||
hnode = GreenstoneTags.closePage(hnode);
|
div = converter.createElement("div");
|
||||||
|
// close page before enter
|
||||||
hnode.appendChild(div);
|
hnode = GreenstoneTags.closePage(hnode);
|
||||||
converter.addTarget(div,sName+"|region");
|
|
||||||
StyleInfo sectionInfo = new StyleInfo();
|
hnode.appendChild(div);
|
||||||
getSectionSc().applyStyle(sStyleName,sectionInfo);
|
converter.addTarget(div, sName + "|region");
|
||||||
applyStyle(sectionInfo,div);
|
StyleInfo sectionInfo = new StyleInfo();
|
||||||
sections.push(onode);
|
getSectionSc().applyStyle(sStyleName, sectionInfo);
|
||||||
//open page after enter
|
applyStyle(sectionInfo, div);
|
||||||
div = (Element) GreenstoneTags.openPage(div, pageNum);
|
sections.push(onode);
|
||||||
|
//open page after enter
|
||||||
|
div = (Element) GreenstoneTags.openPage(div, pageNum);
|
||||||
|
}
|
||||||
|
|
||||||
Node newhnode = traverseBlockText(onode, div);
|
Node newhnode = traverseBlockText(onode, div);
|
||||||
|
Node result = null;
|
||||||
|
if (headingTags == null) {
|
||||||
//close page before exit
|
//close page before exit
|
||||||
newhnode = GreenstoneTags.closePage(newhnode);
|
newhnode = GreenstoneTags.closePage(newhnode);
|
||||||
|
result = newhnode.getParentNode();
|
||||||
Node result = newhnode.getParentNode();
|
|
||||||
//Open page after exit
|
//Open page after exit
|
||||||
result = (Element) GreenstoneTags.openPage(result, pageNum);
|
result = (Element) GreenstoneTags.openPage(result, pageNum);
|
||||||
|
sections.pop();
|
||||||
sections.pop();
|
} else {
|
||||||
|
result = newhnode;
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue