use of com.sun.star.frame.XDispatchHelper in project zotero-libreoffice-integration by zotero.
the class ReferenceMark method getOutOfField.
private void getOutOfField() {
try {
XTextCursor cursor = doc.getSelection();
if (cursor.isCollapsed() && textRangeCompare.compareRegionEnds(cursor, range) == 0) {
cursor.gotoRange(range.getEnd(), false);
XDispatchProvider dispatchProvider = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, doc.controller);
XDispatchHelper dispatchHelper = (XDispatchHelper) UnoRuntime.queryInterface(XDispatchHelper.class, doc.factory.createInstance("com.sun.star.frame.DispatchHelper"));
dispatchHelper.executeDispatch(dispatchProvider, ".uno:ResetAttributes", "", 0, new PropertyValue[] {});
}
} catch (Exception e) {
}
}
Aggregations