w2x: Regenerate bibliography
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@255 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
a475b5fd42
commit
67ceaae08a
12 changed files with 508 additions and 97 deletions
|
@ -16,20 +16,22 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2014 by Henrik Just
|
||||
* Copyright: 2002-2015 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.4 (2014-09-03)
|
||||
* Version 1.6 (2015-06-16)
|
||||
*
|
||||
*/
|
||||
|
||||
package writer2latex.office;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -308,6 +310,10 @@ public class OfficeReader {
|
|||
private ListStyle outline = new ListStyle();
|
||||
private PropertySet footnotes = null;
|
||||
private PropertySet endnotes = null;
|
||||
|
||||
// Bibliographic data
|
||||
private Element bibliographyConfiguration = null;
|
||||
private List<Element> bibliographyMarks = new ArrayList<Element>();
|
||||
|
||||
// Special styles
|
||||
private StyleWithProperties[] heading = new StyleWithProperties[11];
|
||||
|
@ -582,6 +588,14 @@ public class OfficeReader {
|
|||
public boolean isIndexSourceStyle(String sStyleName) {
|
||||
return indexSourceStyles.contains(sStyleName);
|
||||
}
|
||||
|
||||
/** Get the text:bibliography-configuration element
|
||||
*
|
||||
* @return the bibliography configuration
|
||||
*/
|
||||
public Element getBibliographyConfiguration() {
|
||||
return bibliographyConfiguration;
|
||||
}
|
||||
|
||||
/** <p>Does this sequence name belong to a lof?</p>
|
||||
* @param sName the name of the sequence
|
||||
|
@ -738,6 +752,15 @@ public class OfficeReader {
|
|||
public boolean hasBookmarkRefTo(String sName) {
|
||||
return bookmarkRef.contains(sName);
|
||||
}
|
||||
|
||||
/** Get the raw list of all text:bibliography-mark elements. The marks are returned in document order and
|
||||
* includes any duplicates
|
||||
*
|
||||
* @return the list
|
||||
*/
|
||||
public List<Element> getBibliographyMarks() {
|
||||
return bibliographyMarks;
|
||||
}
|
||||
|
||||
/** <p>Is there a reference to this sequence field?
|
||||
* @param sId the id of the sequence field
|
||||
|
@ -1037,7 +1060,17 @@ public class OfficeReader {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// bibliography configuration:
|
||||
if (stylesDOM==null) {
|
||||
list = contentDOM.getElementsByTagName(XMLString.TEXT_BIBLIOGRAPHY_CONFIGURATION);
|
||||
}
|
||||
else {
|
||||
list = stylesDOM.getElementsByTagName(XMLString.TEXT_BIBLIOGRAPHY_CONFIGURATION);
|
||||
}
|
||||
if (list.getLength()!=0) {
|
||||
bibliographyConfiguration = (Element) list.item(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1200,6 +1233,9 @@ public class OfficeReader {
|
|||
else if (sName.equals(XMLString.TEXT_BOOKMARK_REF)) {
|
||||
collectRefName(bookmarkRef,node);
|
||||
}
|
||||
else if (sName.equals(XMLString.TEXT_BIBLIOGRAPHY_MARK)) {
|
||||
bibliographyMarks.add(node);
|
||||
}
|
||||
else if (sName.equals(XMLString.TEXT_SEQUENCE_REF)) {
|
||||
collectRefName(sequenceRef,node);
|
||||
}
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2011 by Henrik Just
|
||||
* Copyright: 2002-2015 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2011-03-08)
|
||||
* Version 1.6 (2015-06-18)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -249,6 +249,8 @@ public class XMLString {
|
|||
public static final String TEXT_FOOTNOTES_CONFIGURATION="text:footnotes-configuration";
|
||||
public static final String TEXT_ENDNOTES_CONFIGURATION="text:endnotes-configuration";
|
||||
public static final String TEXT_NOTES_CONFIGURATION="text:notes-configuration"; // oasis
|
||||
public static final String TEXT_BIBLIOGRAPHY_CONFIGURATION="text:bibliography-configuration";
|
||||
public static final String TEXT_SORT_KEY="text:sort-key";
|
||||
public static final String TEXT_SECTION_SOURCE="text:section-source";
|
||||
public static final String TEXT_SEQUENCE_DECLS="text:sequence-decls";
|
||||
public static final String TEXT_SEQUENCE_DECL="text:sequence-decl";
|
||||
|
@ -284,6 +286,10 @@ public class XMLString {
|
|||
public static final String TEXT_OBJECT_INDEX="text:object-index";
|
||||
public static final String TEXT_USER_INDEX="text:user-index";
|
||||
public static final String TEXT_BIBLIOGRAPHY="text:bibliography";
|
||||
public static final String TEXT_BIBLIOGRAPHY_SOURCE="text:bibliography-source";
|
||||
public static final String TEXT_BIBLIOGRAPHY_ENTRY_TEMPLATE="text:bibliography-entry-template";
|
||||
public static final String TEXT_INDEX_ENTRY_BIBLIOGRAPHY="text:index-entry-bibliography";
|
||||
public static final String TEXT_INDEX_ENTRY_SPAN="text:index-entry-span";
|
||||
public static final String TEXT_INDEX_TITLE_TEMPLATE="text:index-title-template";
|
||||
public static final String TEXT_INDEX_BODY="text:index-body";
|
||||
public static final String TEXT_INDEX_TITLE="text:index-title";
|
||||
|
@ -372,10 +378,18 @@ public class XMLString {
|
|||
public static final String TEXT_LIST_LEVEL_POSITION_AND_SPACE_MODE="text:list-level-position-and-space-mode"; // oasis 1.2
|
||||
public static final String TEXT_LABEL_FOLLOWED_BY="text:label-followed-by"; // oasis 1.2
|
||||
public static final String TEXT_LIST_TAB_STOP_POSITION="text:list-tab-stop-position"; // oasis 1.2
|
||||
|
||||
|
||||
public static final String TEXT_PREFIX="text:prefix";
|
||||
public static final String TEXT_SUFFIX="text:suffix";
|
||||
public static final String TEXT_NUMBERED_ENTRIES="text:numbered-entries";
|
||||
public static final String TEXT_SORT_BY_POSITION="text:sort-by-position";
|
||||
public static final String TEXT_SORT_ALGORITHM="text:sort-algorithm";
|
||||
public static final String TEXT_KEY="text:key";
|
||||
public static final String TEXT_SORT_ASCENDING="text:sort-ascending";
|
||||
public static final String TEXT_IDENTIFIER="text:identifier";
|
||||
public static final String TEXT_BIBLIOGRAPHY_TYPE="text:bibliography-type";
|
||||
public static final String TEXT_BIBILIOGRAPHIC_TYPE="text:bibiliographic-type"; // bug in OOo 1.0
|
||||
public static final String TEXT_BIBLIOGRAPHY_DATA_FIELD="text:bibliography-data-field";
|
||||
public static final String TEXT_ADDRESS="text:address";
|
||||
public static final String TEXT_ANNOTE="text:annote";
|
||||
public static final String TEXT_AUTHOR="text:author";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue