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 sStyleName = Misc.getAttribute(onode,XMLString.TEXT_STYLE_NAME);
|
||||
////closePageSection
|
||||
Element div = converter.createElement("div");
|
||||
//close page before enter
|
||||
hnode = GreenstoneTags.closePage(hnode);
|
||||
|
||||
hnode.appendChild(div);
|
||||
converter.addTarget(div,sName+"|region");
|
||||
StyleInfo sectionInfo = new StyleInfo();
|
||||
getSectionSc().applyStyle(sStyleName,sectionInfo);
|
||||
applyStyle(sectionInfo,div);
|
||||
sections.push(onode);
|
||||
//open page after enter
|
||||
div = (Element) GreenstoneTags.openPage(div, pageNum);
|
||||
Element div = (Element) hnode;
|
||||
if (headingTags == null) {
|
||||
div = converter.createElement("div");
|
||||
// close page before enter
|
||||
hnode = GreenstoneTags.closePage(hnode);
|
||||
|
||||
hnode.appendChild(div);
|
||||
converter.addTarget(div, sName + "|region");
|
||||
StyleInfo sectionInfo = new StyleInfo();
|
||||
getSectionSc().applyStyle(sStyleName, sectionInfo);
|
||||
applyStyle(sectionInfo, div);
|
||||
sections.push(onode);
|
||||
//open page after enter
|
||||
div = (Element) GreenstoneTags.openPage(div, pageNum);
|
||||
}
|
||||
|
||||
Node newhnode = traverseBlockText(onode, div);
|
||||
Node result = null;
|
||||
if (headingTags == null) {
|
||||
//close page before exit
|
||||
newhnode = GreenstoneTags.closePage(newhnode);
|
||||
|
||||
Node result = newhnode.getParentNode();
|
||||
result = newhnode.getParentNode();
|
||||
//Open page after exit
|
||||
result = (Element) GreenstoneTags.openPage(result, pageNum);
|
||||
|
||||
sections.pop();
|
||||
result = (Element) GreenstoneTags.openPage(result, pageNum);
|
||||
sections.pop();
|
||||
} else {
|
||||
result = newhnode;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue