Verified Owner
Top Description Fields Constructors Methods
org.jabref.model.openoffice.uno

public Class UnoDispatch

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
com.sun.star.beans.PropertyValue, com.sun.star.frame.XDispatchHelper, com.sun.star.frame.XDispatchProvider, com.sun.star.text.XTextCursor, com.sun.star.text.XTextDocument, com.sun.star.text.XTextRange, com.sun.star.text.XTextRangeCompare, com.sun.star.uno.UnoRuntime, com.sun.star.uno.XComponentContext, org.jspecify.annotations.NullMarked, org.slf4j.Logger, .LoggerFactory

Executes a LibreOffice UI command against the document's controller.

Used to reach SwTextNode::DontExpandFormat, which has no UNO equivalent: .uno:ResetAttributes -> SwDoc::ResetAttrs(bTextAttr=true) -> DontExpandFormat, which sets the DontExpand flag on text hints ending at the view cursor, stopping a ReferenceMark from absorbing the next typed character. See tdf#81720.

The flag is one-shot, but one is enough: after a character survives, the caret sits past the mark's end and the bleed condition can no longer hold. What this does not protect against is the caret returning to that boundary (click, delete, undo) — see the repair path in CSLReferenceMarkManager.

Field Summary

Modifier and TypeField and Description
private static final String
private static final com.sun.star.beans.PropertyValue[]
private static final Logger
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
execute(com.sun.star.text.XTextDocument doc, com.sun.star.uno.XComponentContext context, String unoUrl, com.sun.star.beans.PropertyValue[] arguments)

public static void
resetAttributesAtRangeEnd(com.sun.star.text.XTextDocument doc, com.sun.star.uno.XComponentContext context, com.sun.star.text.XTextCursor cursor, com.sun.star.text.XTextRange endRange)

Arms LibreOffice's one-shot DontExpand protection when the insertion cursor ends exactly at the citation boundary.

public static void
resetAttributesAtRangeEnd(com.sun.star.text.XTextDocument doc, com.sun.star.uno.XComponentContext context, com.sun.star.text.XTextRange endRange)

Re-arms DontExpand for a recreated mark when the user's view cursor is still at that boundary after a numeric citation update.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DISPATCH_HELPER_SERVICEback to summary
private static final String DISPATCH_HELPER_SERVICE
EMPTY_DISPATCH_ARGUMENTSback to summary
private static final com.sun.star.beans.PropertyValue[] EMPTY_DISPATCH_ARGUMENTS
LOGGERback to summary
private static final Logger LOGGER
RESET_ATTRIBUTES_COMMANDback to summary
private static final String RESET_ATTRIBUTES_COMMAND

Constructor Detail

UnoDispatchback to summary
private UnoDispatch()

Method Detail

executeback to summary
public static void execute(com.sun.star.text.XTextDocument doc, com.sun.star.uno.XComponentContext context, String unoUrl, com.sun.star.beans.PropertyValue[] arguments)
resetAttributesAtRangeEndback to summary
public static void resetAttributesAtRangeEnd(com.sun.star.text.XTextDocument doc, com.sun.star.uno.XComponentContext context, com.sun.star.text.XTextCursor cursor, com.sun.star.text.XTextRange endRange)

Arms LibreOffice's one-shot DontExpand protection when the insertion cursor ends exactly at the citation boundary.

.uno:ResetAttributes acts on the view cursor and shows up in undo history as "Clear Direct Formatting", so this helper first verifies that the live insertion cursor is collapsed and ends at the same position as endRange.

resetAttributesAtRangeEndback to summary
public static void resetAttributesAtRangeEnd(com.sun.star.text.XTextDocument doc, com.sun.star.uno.XComponentContext context, com.sun.star.text.XTextRange endRange)

Re-arms DontExpand for a recreated mark when the user's view cursor is still at that boundary after a numeric citation update.