public class OOBibBase
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.regex.Pattern |
citePattern |
Constructor and Description |
---|
OOBibBase(java.lang.String pathToOO,
boolean atEnd) |
Modifier and Type | Method and Description |
---|---|
void |
clearBibTextSectionContent() |
void |
clearBibTextSectionContent2() |
void |
combineCiteMarkers(java.util.List<BibtexDatabase> databases,
OOBibStyle style) |
boolean |
createBibTextSection(boolean end)
This method creates and inserts an XTextSection named as determined by the
string BIB_SECTION_NAME.
|
void |
createBibTextSection2(boolean end) |
java.util.LinkedHashMap<BibtexEntry,BibtexDatabase> |
findCitedEntries(java.util.List<BibtexDatabase> databases,
java.util.List<java.lang.String> keys,
java.util.HashMap<java.lang.String,BibtexDatabase> linkSourceBase) |
int[] |
findCitedEntryIndex(java.lang.String citRefName,
java.util.List<java.lang.String> keys)
Resolve the bibtex key from a citation reference marker name, and look up
the index of the key in a list of keys.
|
java.util.List<java.lang.String> |
findCitedKeys() |
com.sun.star.awt.Point |
findPosition(com.sun.star.text.XTextViewCursor cursor,
com.sun.star.text.XTextRange range) |
com.sun.star.text.XTextRange |
getBookmarkRange(java.lang.String name)
Get the XTextRange corresponding to the named bookmark.
|
java.lang.String |
getCitationContext(com.sun.star.container.XNameAccess nameAccess,
java.lang.String refMarkName,
int charBefore,
int charAfter,
boolean htmlMarkup) |
java.lang.String |
getCurrentDocumentTitle() |
java.lang.String |
getCustomProperty(java.lang.String property) |
java.lang.String[] |
getJabRefReferenceMarks(com.sun.star.container.XNameAccess nameAccess) |
com.sun.star.container.XNameAccess |
getReferenceMarks() |
java.util.LinkedHashMap<BibtexEntry,BibtexDatabase> |
getSortedEntriesFromSortedRefMarks(java.lang.String[] names,
java.util.Map<BibtexEntry,BibtexDatabase> entries,
java.util.HashMap<java.lang.String,BibtexDatabase> linkSourceBase) |
java.lang.String[] |
getSortedReferenceMarks(com.sun.star.container.XNameAccess nameAccess) |
java.util.List<com.sun.star.text.XTextDocument> |
getTextDocuments() |
java.lang.String |
getUniqueReferenceMarkName(java.lang.String bibtexKey,
int type) |
com.sun.star.text.XTextContent |
insertBookMark(java.lang.String name,
com.sun.star.text.XTextCursor position) |
void |
insertEntry(BibtexEntry[] entries,
BibtexDatabase database,
java.util.List<BibtexDatabase> allBases,
OOBibStyle style,
boolean inParenthesis,
boolean withText,
java.lang.String pageInfo,
boolean sync)
This method inserts a cite marker in the text for the given BibtexEntry,
and may refresh the bibliography.
|
void |
insertFootnote(java.lang.String name,
java.lang.String citText,
com.sun.star.text.XTextCursor position) |
void |
insertFullReferenceAtCursor(com.sun.star.text.XTextCursor cursor,
java.util.Map<BibtexEntry,BibtexDatabase> entries,
OOBibStyle style,
java.lang.String parFormat) |
void |
insertFullReferenceAtViewCursor(java.util.Map<BibtexEntry,BibtexDatabase> entries,
OOBibStyle style,
java.lang.String parFormat) |
void |
insertMarkedUpTextAtViewCursor(java.lang.String lText,
java.lang.String parFormat) |
void |
insertReferenceMark(java.lang.String name,
java.lang.String citText,
com.sun.star.text.XTextCursor position,
boolean withText,
OOBibStyle style) |
boolean |
isConnectedToDocument() |
java.util.List<java.lang.String> |
parseRefMarkName(java.lang.String name)
Extract the list of bibtex keys from a reference mark name.
|
void |
populateBibTextSection(java.util.Map<BibtexEntry,BibtexDatabase> entries,
OOBibStyle style) |
void |
printBookmarkNames() |
void |
rebuildBibTextSection(java.util.List<BibtexDatabase> databases,
OOBibStyle style) |
java.util.List<java.lang.String> |
refreshCiteMarkers(java.util.List<BibtexDatabase> databases,
OOBibStyle style)
Refresh all cite markers in the document.
|
void |
removeBookMark(java.lang.String name) |
void |
removeReferenceMark(java.lang.String name) |
void |
selectDocument() |
void |
setCustomProperty(java.lang.String property,
java.lang.String value) |
void |
setFocus()
Focus the active OO document.
|
com.sun.star.frame.XDesktop |
simpleBootstrap(java.lang.String pathToExecutable) |
void |
testCustomProperties() |
void |
testFootnote() |
void |
testFrameHandling() |
void |
updateSortedReferenceMarks() |
public OOBibBase(java.lang.String pathToOO, boolean atEnd) throws java.lang.Exception
java.lang.Exception
public boolean isConnectedToDocument()
public java.lang.String getCurrentDocumentTitle()
public void selectDocument() throws java.lang.Exception
java.lang.Exception
public com.sun.star.frame.XDesktop simpleBootstrap(java.lang.String pathToExecutable) throws java.lang.Exception
java.lang.Exception
public java.util.List<com.sun.star.text.XTextDocument> getTextDocuments() throws java.lang.Exception
java.lang.Exception
public void testCustomProperties() throws java.lang.Exception
java.lang.Exception
public void setCustomProperty(java.lang.String property, java.lang.String value) throws java.lang.Exception
java.lang.Exception
public java.lang.String getCustomProperty(java.lang.String property) throws java.lang.Exception
java.lang.Exception
public void updateSortedReferenceMarks() throws java.lang.Exception
java.lang.Exception
public void insertEntry(BibtexEntry[] entries, BibtexDatabase database, java.util.List<BibtexDatabase> allBases, OOBibStyle style, boolean inParenthesis, boolean withText, java.lang.String pageInfo, boolean sync) throws java.lang.Exception
entries
- The entries to cite.database
- The database the entry belongs to.style
- The bibliography style we are using.inParenthesis
- Indicates whether it is an in-text citation or a citation in parenthesis.
This is not relevant if numbered citations are used.withText
- Indicates whether this should be a normal citation (true) or an empty
(invisible) citation (false).sync
- Indicates whether the reference list should be refreshed.java.lang.Exception
public java.util.List<java.lang.String> refreshCiteMarkers(java.util.List<BibtexDatabase> databases, OOBibStyle style) throws java.lang.Exception
databases
- The databases to get entries from.style
- The bibliography style to use.java.lang.Exception
public com.sun.star.container.XNameAccess getReferenceMarks()
public java.lang.String[] getJabRefReferenceMarks(com.sun.star.container.XNameAccess nameAccess)
public java.lang.String[] getSortedReferenceMarks(com.sun.star.container.XNameAccess nameAccess) throws java.lang.Exception
java.lang.Exception
public void rebuildBibTextSection(java.util.List<BibtexDatabase> databases, OOBibStyle style) throws java.lang.Exception
java.lang.Exception
public java.lang.String getUniqueReferenceMarkName(java.lang.String bibtexKey, int type)
public java.util.LinkedHashMap<BibtexEntry,BibtexDatabase> findCitedEntries(java.util.List<BibtexDatabase> databases, java.util.List<java.lang.String> keys, java.util.HashMap<java.lang.String,BibtexDatabase> linkSourceBase)
public java.util.List<java.lang.String> findCitedKeys() throws com.sun.star.container.NoSuchElementException, com.sun.star.lang.WrappedTargetException
com.sun.star.container.NoSuchElementException
com.sun.star.lang.WrappedTargetException
public java.util.LinkedHashMap<BibtexEntry,BibtexDatabase> getSortedEntriesFromSortedRefMarks(java.lang.String[] names, java.util.Map<BibtexEntry,BibtexDatabase> entries, java.util.HashMap<java.lang.String,BibtexDatabase> linkSourceBase) throws BibtexEntryNotFoundException
BibtexEntryNotFoundException
public com.sun.star.awt.Point findPosition(com.sun.star.text.XTextViewCursor cursor, com.sun.star.text.XTextRange range)
public java.util.List<java.lang.String> parseRefMarkName(java.lang.String name)
name
- The reference mark name.public int[] findCitedEntryIndex(java.lang.String citRefName, java.util.List<java.lang.String> keys)
citRefName
- The name of the ReferenceMark representing the citation.keys
- A List of bibtex keys representing the entries in the bibliography.public java.lang.String getCitationContext(com.sun.star.container.XNameAccess nameAccess, java.lang.String refMarkName, int charBefore, int charAfter, boolean htmlMarkup) throws java.lang.Exception
java.lang.Exception
public void insertFullReferenceAtCursor(com.sun.star.text.XTextCursor cursor, java.util.Map<BibtexEntry,BibtexDatabase> entries, OOBibStyle style, java.lang.String parFormat) throws UndefinedParagraphFormatException, java.lang.Exception
UndefinedParagraphFormatException
java.lang.Exception
public void insertFullReferenceAtViewCursor(java.util.Map<BibtexEntry,BibtexDatabase> entries, OOBibStyle style, java.lang.String parFormat) throws java.lang.Exception
java.lang.Exception
public void insertMarkedUpTextAtViewCursor(java.lang.String lText, java.lang.String parFormat) throws java.lang.Exception
java.lang.Exception
public boolean createBibTextSection(boolean end) throws java.lang.Exception
end
- true to indicate that the section should be put at the end of the document,
false to indicate that it should be put at the cursor position.java.lang.Exception
public void createBibTextSection2(boolean end) throws java.lang.Exception
java.lang.Exception
public void clearBibTextSectionContent2() throws java.lang.Exception
java.lang.Exception
public void clearBibTextSectionContent() throws java.lang.Exception
java.lang.Exception
public void populateBibTextSection(java.util.Map<BibtexEntry,BibtexDatabase> entries, OOBibStyle style) throws UndefinedParagraphFormatException, java.lang.Exception
UndefinedParagraphFormatException
java.lang.Exception
public com.sun.star.text.XTextContent insertBookMark(java.lang.String name, com.sun.star.text.XTextCursor position) throws java.lang.Exception
java.lang.Exception
public void insertReferenceMark(java.lang.String name, java.lang.String citText, com.sun.star.text.XTextCursor position, boolean withText, OOBibStyle style) throws java.lang.Exception
java.lang.Exception
public void testFootnote() throws java.lang.Exception
java.lang.Exception
public void insertFootnote(java.lang.String name, java.lang.String citText, com.sun.star.text.XTextCursor position) throws java.lang.Exception
java.lang.Exception
public void removeBookMark(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void removeReferenceMark(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public com.sun.star.text.XTextRange getBookmarkRange(java.lang.String name) throws java.lang.Exception
name
- The name of the bookmark to find.java.lang.Exception
public void printBookmarkNames() throws java.lang.Exception
java.lang.Exception
public void setFocus()
public void combineCiteMarkers(java.util.List<BibtexDatabase> databases, OOBibStyle style) throws java.lang.Exception
java.lang.Exception
public void testFrameHandling() throws java.lang.Exception
java.lang.Exception