summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/bookmark.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/crsr/bookmark.cxx')
-rw-r--r--sw/source/core/crsr/bookmark.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx
index 8165b30a98b1..c43dd04c2496 100644
--- a/sw/source/core/crsr/bookmark.cxx
+++ b/sw/source/core/crsr/bookmark.cxx
@@ -420,6 +420,27 @@ namespace sw::mark
m_aName = rName;
}
+ void Bookmark::sendLOKDeleteCallback()
+ {
+ if (GetMarkPos().GetDoc().IsClipBoard())
+ return;
+
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+ if (!pViewShell)
+ return;
+
+ OUString fieldCommand = GetName();
+ tools::JsonWriter aJson;
+ aJson.put("commandName", ".uno:DeleteBookmark");
+ aJson.put("success", true);
+ {
+ auto result = aJson.startNode("result");
+ aJson.put("DeleteBookmark", fieldCommand);
+ }
+
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_UNO_COMMAND_RESULT, aJson.extractData());
+ }
+
void Bookmark::InitDoc(SwDoc& io_rDoc,
sw::mark::InsertMode const, SwPosition const*const)
{