Verified Owner
Top Description Methods
org.jabref.model.openoffice.backend

public Interface NamedRange

Known Direct Implementers
org.jabref.logic.openoffice.backend.NamedRangeReferenceMark
Imports
java.util.Optional, org.jabref.model.openoffice.uno.CreationException, .NoDocumentException, com.sun.star.lang.WrappedTargetException, com.sun.star.text.XTextCursor, com.sun.star.text.XTextDocument, com.sun.star.text.XTextRange

NamedRange (with NamedRangeManager) attempts to provide a common interface for working with reference mark based and bookmark based text ranges to be used as locations to fill with citation markers. LibreOffice supports name-based lookup and listing names for both (hence the name).

Note

currently only implemented for refence marks (in NamedRangeReferenceMark and NamedRangeManagerReferenceMark).

Method Summary

Modifier and TypeMethod and Description
public void
cleanFillCursor(com.sun.star.text.XTextDocument doc)

Remove brackets, but if the result would become empty, leave them; if the result would be a single character, leave the left bracket.

public com.sun.star.text.XTextCursor
getFillCursor(com.sun.star.text.XTextDocument doc)

Get a cursor for filling in text.

public Optional<com.sun.star.text.XTextRange>
getMarkRange(com.sun.star.text.XTextDocument doc)

Returns: Optional.empty if the mark is missing from the document.

public String
public Optional<com.sun.star.text.XTextCursor>
getRawCursor(com.sun.star.text.XTextDocument doc)

Cursor for the reference marks as is, not prepared for filling, but does not need cleanFillCursor either.

public void
removeFromDocument(com.sun.star.text.XTextDocument doc)

Note

create is in NamedRangeManager

Method Detail

cleanFillCursorback to summary
public void cleanFillCursor(com.sun.star.text.XTextDocument doc) throws NoDocumentException, com.sun.star.lang.WrappedTargetException

Remove brackets, but if the result would become empty, leave them; if the result would be a single character, leave the left bracket.

getFillCursorback to summary
public com.sun.star.text.XTextCursor getFillCursor(com.sun.star.text.XTextDocument doc) throws NoDocumentException, com.sun.star.lang.WrappedTargetException, CreationException

Get a cursor for filling in text.

Must be followed by cleanFillCursor()

getMarkRangeback to summary
public Optional<com.sun.star.text.XTextRange> getMarkRange(com.sun.star.text.XTextDocument doc) throws NoDocumentException, com.sun.star.lang.WrappedTargetException
Returns:Optional<com.sun.star.text.XTextRange>

Optional.empty if the mark is missing from the document.

getRangeNameback to summary
public String getRangeName()
getRawCursorback to summary
public Optional<com.sun.star.text.XTextCursor> getRawCursor(com.sun.star.text.XTextDocument doc) throws NoDocumentException, com.sun.star.lang.WrappedTargetException

Cursor for the reference marks as is, not prepared for filling, but does not need cleanFillCursor either.

removeFromDocumentback to summary
public void removeFromDocument(com.sun.star.text.XTextDocument doc) throws com.sun.star.lang.WrappedTargetException, NoDocumentException

Note

create is in NamedRangeManager