w2l: Finished support cross references to list items + a few minor w2l and w2x bugfixes

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@136 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2012-03-05 14:56:56 +00:00
parent 9cb0e43ef2
commit 568d0d01f8
9 changed files with 169 additions and 84 deletions

View file

@ -2,9 +2,16 @@ Changelog for Writer2LaTeX version 1.0 -> 1.2
---------- version 1.1.9 ---------- ---------- version 1.1.9 ----------
[w2l] Added support for cross references to list items [w2x] The minimum year in the date dialog (EPUB export) has been changed from 1900 to 1800
[w2l] Do not use string replace or writing direction in math mode for XeTeX backend [w2x] Bugfix: Do not create an empty footnotes page if footnotes are exported as endnotes, and the document contains no footnotess
[w2l] Bugfix: Now converts the content of prefix or suffix of a list item correctly
[w2l] Added support for the bookmark reference types "number", "number-no-superior" and "number-all-superior" (all treated like \ref)
for bookmarks in headings and numbered lists
[w2l] Bugfix: Do not use string replace or writing direction in math mode for XeTeX backend
[w2x] Export date only for dc:date attribute in EPUB meta data (not date+time) [w2x] Export date only for dc:date attribute in EPUB meta data (not date+time)

View file

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2012-02-27) * Version 1.2 (2012-03-05)
* *
*/ */
@ -33,7 +33,7 @@ public class ConverterFactory {
// Version information // Version information
private static final String VERSION = "1.1.9"; private static final String VERSION = "1.1.9";
private static final String DATE = "2012-02-27"; private static final String DATE = "2012-03-05";
/** Return the Writer2LaTeX version in the form /** Return the Writer2LaTeX version in the form
* (major version).(minor version).(patch level)<br/> * (major version).(minor version).(patch level)<br/>

View file

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2012-02-27) * Version 1.2 (2012-03-05)
* *
*/ */
@ -40,6 +40,7 @@ import org.w3c.dom.Node;
import writer2latex.latex.util.Context; import writer2latex.latex.util.Context;
import writer2latex.latex.util.HeadingMap; import writer2latex.latex.util.HeadingMap;
import writer2latex.office.ListStyle;
import writer2latex.office.OfficeReader; import writer2latex.office.OfficeReader;
import writer2latex.office.XMLString; import writer2latex.office.XMLString;
import writer2latex.util.CSVList; import writer2latex.util.CSVList;
@ -789,8 +790,31 @@ public class FieldConverter extends ConverterHelper {
ldp.append("\\ref{bkm:"+bookmarknames.getExportName(sName)+"}"); ldp.append("\\ref{bkm:"+bookmarknames.getExportName(sName)+"}");
} }
else if (("number".equals(sFormat) || "number-no-superior".equals(sFormat) || "number-all-superior".equals(sFormat)) && else if (("number".equals(sFormat) || "number-no-superior".equals(sFormat) || "number-all-superior".equals(sFormat)) &&
ofr.bookmarkInList(sName)) { (ofr.bookmarkInHeading(sName) || ofr.bookmarkInList(sName))) {
ldp.append("\\ref{bkm:"+bookmarknames.getExportName(sName)+"}"); ListStyle style=null;
int nLevel = 0;
String sPrefix=null;
String sSuffix=null;
// Only convert the prefix and suffix if it is converted at the reference target
if (ofr.bookmarkInHeading(sName)) {
if (config.formatting()>=LaTeXConfig.CONVERT_MOST) {
style = ofr.getOutlineStyle();
}
nLevel = ofr.getBookmarkHeadingLevel(sName);
}
else {
if (config.formatting()>=LaTeXConfig.CONVERT_BASIC) {
style = ofr.getListStyle(ofr.getBookmarkListStyle(sName));
}
nLevel = ofr.getBookmarkListLevel(sName);
}
if (style!=null) {
sPrefix = style.getLevelProperty(nLevel, XMLString.STYLE_NUM_PREFIX);
sSuffix = style.getLevelProperty(nLevel, XMLString.STYLE_NUM_SUFFIX);
}
if (sPrefix!=null) ldp.append(palette.getI18n().convert(sPrefix,false,oc.getLang()));
ldp.append("\\ref{bkm:").append(bookmarknames.getExportName(sName)).append("}");
if (sSuffix!=null) ldp.append(palette.getI18n().convert(sSuffix,false,oc.getLang()));
} }
else { // use current value else { // use current value
palette.getInlineCv().traversePCDATA(node,ldp,oc); palette.getInlineCv().traversePCDATA(node,ldp,oc);

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
* *
* Copyright: 2002-2011 by Henrik Just * Copyright: 2002-2012 by Henrik Just
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2011-03-29) * Version 1.2 (2012-03-05)
* *
*/ */
@ -356,9 +356,9 @@ public class HeadingConverter extends ConverterHelper {
ldp.append("\\protect\\makebox[").append(sLabelWidth).append("][").append(sAlignmentChar).append("]{"); ldp.append("\\protect\\makebox[").append(sLabelWidth).append("][").append(sAlignmentChar).append("]{");
} }
ldp.append(baText.getBefore()) ldp.append(baText.getBefore())
.append(sPrefix!=null ? sPrefix : "") .append(sPrefix!=null ? palette.getI18n().convert(sPrefix,false,"en") : "")
.append("#1") .append("#1")
.append(sSuffix!=null ? sSuffix : "") .append(sSuffix!=null ? palette.getI18n().convert(sSuffix,false,"en") : "")
.append(sSpaceChar) .append(sSpaceChar)
.append(baText.getAfter()); .append(baText.getAfter());
if (!bOnlyNum && sLabelWidth!=null) { if (!bOnlyNum && sLabelWidth!=null) {

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
* *
* Copyright: 2002-2011 by Henrik Just * Copyright: 2002-2012 by Henrik Just
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2011-03-22) * Version 1.2 (2012-03-05)
* *
*/ */
@ -391,9 +391,9 @@ public class ListStyleConverter extends StyleConverter {
String sSuffix = style.getLevelProperty(i,XMLString.STYLE_NUM_SUFFIX); String sSuffix = style.getLevelProperty(i,XMLString.STYLE_NUM_SUFFIX);
// Apply style // Apply style
ldp.append(baText.getBefore()); ldp.append(baText.getBefore());
if (sPrefix!=null) { ldp.append(sPrefix); } if (sPrefix!=null) { ldp.append(palette.getI18n().convert(sPrefix,false,"en")); }
ldp.append("\\the").append(sName[i]); ldp.append("\\the").append(sName[i]);
if (sSuffix!=null) { ldp.append(sSuffix); } if (sSuffix!=null) { ldp.append(palette.getI18n().convert(sSuffix,false,"en")); }
ldp.append(baText.getAfter()); ldp.append(baText.getAfter());
} }
else if (style.isBullet(i)) { else if (style.isBullet(i)) {

View file

@ -18,7 +18,7 @@
* *
* Copyright: 2002-2012 by Henrik Just * Copyright: 2002-2012 by Henrik Just
* *
* Version 1.2 (2012-02-24) * Version 1.2 (2012-02-27)
* *
* All Rights Reserved. * All Rights Reserved.
*/ */
@ -1119,7 +1119,7 @@ public final class StarMathConverter implements writer2latex.api.StarMathConvert
while (tokenInGroup(TGroup.PRODUCT)){ while (tokenInGroup(TGroup.PRODUCT)){
if (curToken.eType==Token.OVER){ if (curToken.eType==Token.OVER){
nextToken(); nextToken();
sProduct="\\frac"+groupsp(sProduct)+group(power(fSize,eAlign)); sProduct="\\frac"+groupsp(sProduct)+groupsp(power(fSize,eAlign));
} else if (curToken.eType==Token.BOPER){ } else if (curToken.eType==Token.BOPER){
nextToken(); nextToken();
sProduct+=special()+power(fSize,eAlign); sProduct+=special()+power(fSize,eAlign);

View file

@ -20,15 +20,19 @@
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2012-02-27) * Version 1.2 (2012-03-05)
* *
*/ */
package writer2latex.office; package writer2latex.office;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
@ -276,33 +280,34 @@ public class OfficeReader {
//private String sFirstMasterPageName = null; //private String sFirstMasterPageName = null;
// All indexes // All indexes
private Hashtable<Element, Object> indexes = new Hashtable<Element, Object>(); private Map<Element, Object> indexes = new Hashtable<Element, Object>();
private HashSet<String> indexSourceStyles = new HashSet<String>(); private Set<String> indexSourceStyles = new HashSet<String>();
private HashSet<String> figureSequenceNames = new HashSet<String>(); private Set<String> figureSequenceNames = new HashSet<String>();
private HashSet<String> tableSequenceNames = new HashSet<String>(); private Set<String> tableSequenceNames = new HashSet<String>();
private String sAutoFigureSequenceName = null; private String sAutoFigureSequenceName = null;
private String sAutoTableSequenceName = null; private String sAutoTableSequenceName = null;
// Map paragraphs to sequence names (caption helper) // Map paragraphs to sequence names (caption helper)
private Hashtable<Element, String> sequenceNames = new Hashtable<Element, String>(); private Map<Element, String> sequenceNames = new Hashtable<Element, String>();
// Map sequence reference names to sequence names // Map sequence reference names to sequence names
private Hashtable<String, String> seqrefNames = new Hashtable<String, String>(); private Map<String, String> seqrefNames = new Hashtable<String, String>();
// All references // All references
private HashSet<String> footnoteRef = new HashSet<String>(); private Set<String> footnoteRef = new HashSet<String>();
private HashSet<String> endnoteRef = new HashSet<String>(); private Set<String> endnoteRef = new HashSet<String>();
private HashSet<String> referenceRef = new HashSet<String>(); private Set<String> referenceRef = new HashSet<String>();
private HashSet<String> bookmarkRef = new HashSet<String>(); private Set<String> bookmarkRef = new HashSet<String>();
private HashSet<String> sequenceRef = new HashSet<String>(); private Set<String> sequenceRef = new HashSet<String>();
// Reference marks and bookmarks contained in headings or lists // Reference marks and bookmarks contained in headings or lists
private HashSet<String> referenceHeading = new HashSet<String>(); private Map<String,Integer> referenceHeading = new HashMap<String,Integer>();
private HashSet<String> bookmarkHeading = new HashSet<String>(); private Map<String,Integer> bookmarkHeading = new HashMap<String,Integer>();
private HashSet<String> bookmarkList = new HashSet<String>(); private Map<String,String> bookmarkList = new HashMap<String,String>();
private Map<String,Integer> bookmarkListLevel = new HashMap<String,Integer>();
// All internal hyperlinks // All internal hyperlinks
private HashSet<String> links = new HashSet<String>(); private Set<String> links = new HashSet<String>();
// Forms // Forms
private FormsReader forms = new FormsReader(); private FormsReader forms = new FormsReader();
@ -623,7 +628,7 @@ public class OfficeReader {
* @return true if so * @return true if so
*/ */
public boolean referenceMarkInHeading(String sName) { public boolean referenceMarkInHeading(String sName) {
return referenceHeading.contains(sName); return referenceHeading.containsKey(sName);
} }
/** Is there a reference to this reference mark? /** Is there a reference to this reference mark?
@ -639,7 +644,15 @@ public class OfficeReader {
* @return true if so * @return true if so
*/ */
public boolean bookmarkInHeading(String sName) { public boolean bookmarkInHeading(String sName) {
return bookmarkHeading.contains(sName); return bookmarkHeading.containsKey(sName);
}
/** Get the level of the heading associated with this bookmark
* @param sName the name of the bookmark
* @return the level or 0 if the bookmark does not exist
*/
public int getBookmarkHeadingLevel(String sName) {
return bookmarkHeading.get(sName);
} }
/** Is this bookmark contained in a list? /** Is this bookmark contained in a list?
@ -647,7 +660,33 @@ public class OfficeReader {
* @return true if so * @return true if so
*/ */
public boolean bookmarkInList(String sName) { public boolean bookmarkInList(String sName) {
return bookmarkList.contains(sName); return bookmarkList.containsKey(sName);
}
/** Get the list style name associated with a bookmark in a list
* @param sName the name of the bookmark
* @return the list style name or null if the bookmark does not exist or the list does not have a style name
*/
public String getBookmarkListStyle(String sName) {
if (bookmarkList.containsKey(sName)) {
return bookmarkList.get(sName);
}
else {
return null;
}
}
/** Get the list level associated with a bookmark in a list
* @param sName the name of the bookmark
* @return the level or 0 if the bookmark does not exist
*/
public int getBookmarkListLevel(String sName) {
if (bookmarkListLevel.containsKey(sName)) {
return bookmarkListLevel.get(sName);
}
else {
return 0;
}
} }
/** <p>Is there a reference to this bookmark? /** <p>Is there a reference to this bookmark?
@ -1020,7 +1059,7 @@ public class OfficeReader {
} }
} }
traverseContent(body); traverseContent(body,null,0,-1);
if (sAutoFigureSequenceName!=null) { if (sAutoFigureSequenceName!=null) {
addFigureSequenceName(sAutoFigureSequenceName); addFigureSequenceName(sAutoFigureSequenceName);
@ -1043,10 +1082,11 @@ public class OfficeReader {
return getParagraph(parent); return getParagraph(parent);
} }
private void traverseContent(Element node) { private void traverseContent(Element node, String sListStyleName, int nListLevel, int nParLevel) {
// Handle this node first // Handle this node first
String sName = node.getTagName(); String sName = node.getTagName();
if (sName.equals(XMLString.TEXT_P)) { if (sName.equals(XMLString.TEXT_P)) {
nParLevel=0;
//collectMasterPage(getParStyle(node.getAttribute(XMLString.TEXT_STYLE_NAME))); //collectMasterPage(getParStyle(node.getAttribute(XMLString.TEXT_STYLE_NAME)));
} }
else if (sName.equals(XMLString.TEXT_H)) { else if (sName.equals(XMLString.TEXT_H)) {
@ -1057,6 +1097,7 @@ public class OfficeReader {
else { else {
nLevel = Misc.getPosInteger(node.getAttribute(XMLString.TEXT_LEVEL),1); nLevel = Misc.getPosInteger(node.getAttribute(XMLString.TEXT_LEVEL),1);
} }
nParLevel = nLevel;
StyleWithProperties style = getParStyle(node.getAttribute(XMLString.TEXT_STYLE_NAME)); StyleWithProperties style = getParStyle(node.getAttribute(XMLString.TEXT_STYLE_NAME));
//collectMasterPage(style); //collectMasterPage(style);
if (1<=nLevel && nLevel<=10 && heading[nLevel]==null) { if (1<=nLevel && nLevel<=10 && heading[nLevel]==null) {
@ -1068,6 +1109,20 @@ public class OfficeReader {
} }
} }
} }
else if (sName.equals(XMLString.TEXT_LIST) ||
sName.equals(XMLString.TEXT_ORDERED_LIST) || sName.equals(XMLString.TEXT_UNORDERED_LIST)) {
nListLevel++;
String sStyleName = Misc.getAttribute(node, XMLString.TEXT_STYLE_NAME);
if (sStyleName!=null) sListStyleName = sStyleName;
}
else if (sName.equals(XMLString.TEXT_NOTE) ||
sName.equals(XMLString.TEXT_FOOTNOTE) || sName.equals(XMLString.TEXT_ENDNOTE) ||
sName.equals(XMLString.TABLE_TABLE)) {
// Various block elements; all resetting the list and par level
sListStyleName=null;
nListLevel=0;
nParLevel=-1;
}
else if (sName.equals(XMLString.TEXT_SEQUENCE)) { else if (sName.equals(XMLString.TEXT_SEQUENCE)) {
String sSeqName = Misc.getAttribute(node,XMLString.TEXT_NAME); String sSeqName = Misc.getAttribute(node,XMLString.TEXT_NAME);
String sRefName = Misc.getAttribute(node,XMLString.TEXT_REF_NAME); String sRefName = Misc.getAttribute(node,XMLString.TEXT_REF_NAME);
@ -1094,19 +1149,19 @@ public class OfficeReader {
else if ("endnote".equals(sClass)) { collectRefName(endnoteRef,node); } else if ("endnote".equals(sClass)) { collectRefName(endnoteRef,node); }
} }
else if (sName.equals(XMLString.TEXT_REFERENCE_MARK)) { else if (sName.equals(XMLString.TEXT_REFERENCE_MARK)) {
collectMarkByPosition(referenceHeading,null,node); collectMarkByPosition(referenceHeading,null,null,node,sListStyleName,nListLevel,nParLevel);
} }
else if (sName.equals(XMLString.TEXT_REFERENCE_MARK_START)) { else if (sName.equals(XMLString.TEXT_REFERENCE_MARK_START)) {
collectMarkByPosition(referenceHeading,null,node); collectMarkByPosition(referenceHeading,null,null,node,sListStyleName,nListLevel,nParLevel);
} }
else if (sName.equals(XMLString.TEXT_REFERENCE_REF)) { else if (sName.equals(XMLString.TEXT_REFERENCE_REF)) {
collectRefName(referenceRef,node); collectRefName(referenceRef,node);
} }
else if (sName.equals(XMLString.TEXT_BOOKMARK)) { else if (sName.equals(XMLString.TEXT_BOOKMARK)) {
collectMarkByPosition(bookmarkHeading,bookmarkList,node); collectMarkByPosition(bookmarkHeading,bookmarkList,bookmarkListLevel,node,sListStyleName,nListLevel,nParLevel);
} }
else if (sName.equals(XMLString.TEXT_BOOKMARK_START)) { else if (sName.equals(XMLString.TEXT_BOOKMARK_START)) {
collectMarkByPosition(bookmarkHeading,bookmarkList,node); collectMarkByPosition(bookmarkHeading,bookmarkList,bookmarkListLevel,node,sListStyleName,nListLevel,nParLevel);
} }
else if (sName.equals(XMLString.TEXT_BOOKMARK_REF)) { else if (sName.equals(XMLString.TEXT_BOOKMARK_REF)) {
collectRefName(bookmarkRef,node); collectRefName(bookmarkRef,node);
@ -1152,7 +1207,7 @@ public class OfficeReader {
Node child = node.getFirstChild(); Node child = node.getFirstChild();
while (child!=null) { while (child!=null) {
if (child.getNodeType()==Node.ELEMENT_NODE) { if (child.getNodeType()==Node.ELEMENT_NODE) {
traverseContent((Element) child); traverseContent((Element) child, sListStyleName, nListLevel, nParLevel);
} }
child = child.getNextSibling(); child = child.getNextSibling();
} }
@ -1175,27 +1230,24 @@ public class OfficeReader {
} }
private void collectRefName(HashSet<String> ref, Element node) { private void collectRefName(Set<String> ref, Element node) {
String sRefName = node.getAttribute(XMLString.TEXT_REF_NAME); String sRefName = node.getAttribute(XMLString.TEXT_REF_NAME);
if (sRefName!=null && sRefName.length()>0) { if (sRefName!=null && sRefName.length()>0) {
ref.add(sRefName); ref.add(sRefName);
} }
} }
private void collectMarkByPosition(HashSet<String> headingmarks, HashSet<String> listmarks, Element node) { private void collectMarkByPosition(Map<String,Integer> headingmarklevels, Map<String,String> listmarknames,
Map<String,Integer> listmarklevels, Element node,
String sListStyleName, int nListLevel, int nParLevel) {
String sName = node.getAttribute(XMLString.TEXT_NAME); String sName = node.getAttribute(XMLString.TEXT_NAME);
if (sName!=null && sName.length()>0) { if (sName!=null && sName.length()>0) {
Element par = getParagraph(node); if (nParLevel>0) { // Mark contained in a heading
if (XMLString.TEXT_H.equals(par.getTagName())) { // Mark contained in a heading headingmarklevels.put(sName,nParLevel);
headingmarks.add(sName);
} }
else if (listmarks!=null && XMLString.TEXT_P.equals(par.getTagName())) { else if (listmarknames!=null && nListLevel>0) {
Element parent = (Element) par.getParentNode(); listmarknames.put(sName,sListStyleName);
if (XMLString.TEXT_LIST_ITEM.equals(parent.getTagName())) { // Mark contained in a list listmarklevels.put(sName, nListLevel);
// Note: text:list-header is not relevant here (no number to refer to!)
// TODO: Collect style name and level (necessary to add text before/after)
listmarks.add(sName);
}
} }
} }
} }

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
* *
* Copyright: 2002-2011 by Henrik Just * Copyright: 2002-2012 by Henrik Just
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2011-06-16) * Version 1.2 (2012-03-05)
* *
*/ */
@ -1748,33 +1748,35 @@ public class TextConverter extends ConverterHelper {
private void insertFootnotes(Node hnode, boolean bFinal) { private void insertFootnotes(Node hnode, boolean bFinal) {
int n = footnotes.size(); int n = footnotes.size();
if (n>0 && bFootnotesAtPage) { // Add footnote rule if (n>0) {
Element rule = converter.createElement("hr"); if (bFootnotesAtPage) { // Add footnote rule
StyleInfo info = new StyleInfo(); Element rule = converter.createElement("hr");
getPageSc().applyFootnoteRuleStyle(info); StyleInfo info = new StyleInfo();
getPageSc().applyStyle(info, rule); getPageSc().applyFootnoteRuleStyle(info);
hnode.appendChild(rule); getPageSc().applyStyle(info, rule);
} hnode.appendChild(rule);
else if (bFinal && !bFootnotesAtPage) { // New page if required for footnotes as endnotes }
if (nSplit>0) { hnode = converter.nextOutFile(); } else if (bFinal) { // New page if required for footnotes as endnotes
insertNoteHeading(hnode, config.getFootnotesHeading(), "footnotes"); if (nSplit>0) { hnode = converter.nextOutFile(); }
} insertNoteHeading(hnode, config.getFootnotesHeading(), "footnotes");
}
if (bFinal || bFootnotesAtPage) { // Insert the footnotes
for (int i=0; i<n; i++) { if (bFinal || bFootnotesAtPage) { // Insert the footnotes
Node footnote = footnotes.get(i); for (int i=0; i<n; i++) {
String sId = Misc.getAttribute(footnote,XMLString.TEXT_ID); Node footnote = footnotes.get(i);
Node citation = Misc.getChildByTagName(footnote,XMLString.TEXT_FOOTNOTE_CITATION); String sId = Misc.getAttribute(footnote,XMLString.TEXT_ID);
if (citation==null) { // try oasis Node citation = Misc.getChildByTagName(footnote,XMLString.TEXT_FOOTNOTE_CITATION);
citation = Misc.getChildByTagName(footnote,XMLString.TEXT_NOTE_CITATION); if (citation==null) { // try oasis
} citation = Misc.getChildByTagName(footnote,XMLString.TEXT_NOTE_CITATION);
Node body = Misc.getChildByTagName(footnote,XMLString.TEXT_FOOTNOTE_BODY); }
if (body==null) { // try oasis Node body = Misc.getChildByTagName(footnote,XMLString.TEXT_FOOTNOTE_BODY);
body = Misc.getChildByTagName(footnote,XMLString.TEXT_NOTE_BODY); if (body==null) { // try oasis
} body = Misc.getChildByTagName(footnote,XMLString.TEXT_NOTE_BODY);
traverseNoteBody(sId,sFntCitStyle,citation,body,hnode,ofr.getFootnotesConfiguration()); }
traverseNoteBody(sId,sFntCitStyle,citation,body,hnode,ofr.getFootnotesConfiguration());
}
footnotes.clear();
} }
footnotes.clear();
} }
} }

View file

@ -3,7 +3,7 @@
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DateDialog" dlg:left="173" dlg:top="73" dlg:width="158" dlg:height="62" dlg:closeable="true" dlg:moveable="true"> <dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DateDialog" dlg:left="173" dlg:top="73" dlg:width="158" dlg:height="62" dlg:closeable="true" dlg:moveable="true">
<dlg:bulletinboard> <dlg:bulletinboard>
<dlg:text dlg:id="DateLabel" dlg:tab-index="0" dlg:left="5" dlg:top="9" dlg:width="60" dlg:height="12" dlg:value="Date"/> <dlg:text dlg:id="DateLabel" dlg:tab-index="0" dlg:left="5" dlg:top="9" dlg:width="60" dlg:height="12" dlg:value="Date"/>
<dlg:datefield dlg:id="Date" dlg:tab-index="1" dlg:left="70" dlg:top="6" dlg:width="80" dlg:height="12" dlg:strict-format="true" dlg:date-format="short_YYYYMMDD_DIN5008" dlg:spin="true"/> <dlg:datefield dlg:id="Date" dlg:tab-index="1" dlg:left="70" dlg:top="6" dlg:width="80" dlg:height="12" dlg:strict-format="true" dlg:date-format="short_YYYYMMDD_DIN5008" dlg:value-min="18000101" dlg:spin="true"/>
<dlg:text dlg:id="Eventlabel" dlg:tab-index="2" dlg:left="5" dlg:top="22" dlg:width="60" dlg:height="12" dlg:value="Event"/> <dlg:text dlg:id="Eventlabel" dlg:tab-index="2" dlg:left="5" dlg:top="22" dlg:width="60" dlg:height="12" dlg:value="Event"/>
<dlg:textfield dlg:id="Event" dlg:tab-index="3" dlg:left="70" dlg:top="21" dlg:width="80" dlg:height="12"/> <dlg:textfield dlg:id="Event" dlg:tab-index="3" dlg:left="70" dlg:top="21" dlg:width="80" dlg:height="12"/>
<dlg:button dlg:id="OKButton" dlg:tab-index="4" dlg:left="5" dlg:top="43" dlg:width="50" dlg:height="12" dlg:value="OK" dlg:button-type="ok"/> <dlg:button dlg:id="OKButton" dlg:tab-index="4" dlg:left="5" dlg:top="43" dlg:width="50" dlg:height="12" dlg:value="OK" dlg:button-type="ok"/>