Top Fields Constructors Methods
org.jabref.logic.openoffice.frontend

public Class UpdateCitationMarkers

extends Object
Class Inheritance
Imports
java.util.List, .Objects, .Optional, org.jabref.logic.openoffice.style.OOBibStyle, org.jabref.model.openoffice.ootext.OOText, .OOTextIntoOO, org.jabref.model.openoffice.style.CitationGroup, .CitationGroups, .CitationType, org.jabref.model.openoffice.uno.CreationException, .NoDocumentException, com.sun.star.beans.IllegalTypeException, com.sun.star.beans.NotRemoveableException, com.sun.star.beans.PropertyVetoException, com.sun.star.lang.WrappedTargetException, com.sun.star.text.XTextCursor, com.sun.star.text.XTextDocument, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
applyNewCitationMarkers(com.sun.star.text.XTextDocument doc, OOFrontend frontend, OOBibStyle
Bibliography style to use.
style
)

Visit each reference mark in referenceMarkNames, overwrite its text content.

public static void
createAndFillCitationGroup(OOFrontend frontend, com.sun.star.text.XTextDocument doc, List<String>
BibTeX keys of
citationKeys
,
List<Optional<OOText>> pageInfos, CitationType citationType, OOText
Text for the citation. A citation mark or placeholder if not yet available.
citationText
,
com.sun.star.text.XTextCursor
Location to insert at.
position
,
OOBibStyle style, boolean
A space inserted after the reference mark makes it easier to separate from the text coming after. But is not wanted when we recreate a reference mark.
insertSpaceAfter
)

Inserts a citation group in the document: creates and fills it.

public static void
fillCitationMarkInCursor(com.sun.star.text.XTextDocument doc, com.sun.star.text.XTextCursor cursor, OOText citationText, boolean withText, OOBibStyle style)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

UpdateCitationMarkersback to summary
private UpdateCitationMarkers()

Method Detail

applyNewCitationMarkersback to summary
public static void applyNewCitationMarkers(com.sun.star.text.XTextDocument doc, OOFrontend frontend, OOBibStyle style) throws NoDocumentException, CreationException, com.sun.star.lang.WrappedTargetException

Visit each reference mark in referenceMarkNames, overwrite its text content.

After each fillCitationMarkInCursor call check if we lost the BIB_SECTION_NAME bookmark and recreate it if we did.

Parameters
style:OOBibStyle

Bibliography style to use.

createAndFillCitationGroupback to summary
public static void createAndFillCitationGroup(OOFrontend frontend, com.sun.star.text.XTextDocument doc, List<String> citationKeys, List<Optional<OOText>> pageInfos, CitationType citationType, OOText citationText, com.sun.star.text.XTextCursor position, OOBibStyle style, boolean insertSpaceAfter) throws com.sun.star.beans.NotRemoveableException, com.sun.star.lang.WrappedTargetException, com.sun.star.beans.PropertyVetoException, IllegalArgumentException, CreationException, NoDocumentException, com.sun.star.beans.IllegalTypeException

Inserts a citation group in the document: creates and fills it.

Parameters
citationKeys:List<String>

BibTeX keys of

citationText:OOText

Text for the citation. A citation mark or placeholder if not yet available.

position:com.sun.star.text.XTextCursor

Location to insert at.

insertSpaceAfter:boolean

A space inserted after the reference mark makes it easier to separate from the text coming after. But is not wanted when we recreate a reference mark.

fillCitationMarkInCursorback to summary
public static void fillCitationMarkInCursor(com.sun.star.text.XTextDocument doc, com.sun.star.text.XTextCursor cursor, OOText citationText, boolean withText, OOBibStyle style) throws com.sun.star.lang.WrappedTargetException, CreationException, IllegalArgumentException