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

public Class UpdateCitationMarkers

extends Object
Class Inheritance
Imports
java.util.List, .Optional, org.jabref.logic.openoffice.style.JStyle, 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, com.sun.star.uno.XComponentContext, org.jspecify.annotations.NonNull, 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, JStyle
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, com.sun.star.uno.XComponentContext context, List<String>
BibTeX keys of
citationKeys
,
@NonNull 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
,
JStyle style, boolean
A space inserted before the reference mark makes it easier to separate from the text coming before.
insertSpaceBefore
,
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, @NonNull com.sun.star.text.XTextCursor cursor, @NonNull OOText citationText, boolean withText, @NonNull JStyle 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, JStyle 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:JStyle

Bibliography style to use.

createAndFillCitationGroupback to summary
public static void createAndFillCitationGroup(OOFrontend frontend, com.sun.star.text.XTextDocument doc, com.sun.star.uno.XComponentContext context, List<String> citationKeys, @NonNull List<Optional<OOText>> pageInfos, CitationType citationType, OOText citationText, com.sun.star.text.XTextCursor position, JStyle style, boolean insertSpaceBefore, 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.

insertSpaceBefore:boolean

A space inserted before the reference mark makes it easier to separate from the text coming before.

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, @NonNull com.sun.star.text.XTextCursor cursor, @NonNull OOText citationText, boolean withText, @NonNull JStyle style) throws com.sun.star.lang.WrappedTargetException, CreationException, IllegalArgumentException