use of com.sun.star.text.XTextViewCursor in project zotero-libreoffice-integration by zotero.
the class Document method insertField.
public ReferenceMark insertField(String fieldType, int noteType) throws Exception {
// duplicate selection cursor
XTextViewCursor selectionCursor = getSelection();
XTextCursor rangeToInsert = (XParagraphCursor) UnoRuntime.queryInterface(XParagraphCursor.class, selectionCursor.getText().createTextCursorByRange(selectionCursor));
return insertMarkAtRange(fieldType, noteType, rangeToInsert, null, null);
}
Aggregations