summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewsh.cxx')
-rw-r--r--sfx2/source/view/viewsh.cxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d7790fcdb6f5..f8f4f615966b 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -98,7 +98,7 @@
#include <sfx2/lokhelper.hxx>
#include <openuriexternally.hxx>
#include <shellimpl.hxx>
-
+#include <iostream>
#include <vector>
#include <libxml/xmlwriter.h>
@@ -1480,6 +1480,7 @@ void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) c
{
case LOK_CALLBACK_FORM_FIELD_BUTTON:
case LOK_CALLBACK_TEXT_SELECTION:
+ case LOK_CALLBACK_COMMENT:
break;
default:
// Reject e.g. invalidate during paint.
@@ -2100,4 +2101,23 @@ weld::Window* SfxViewShell::GetFrameWeld() const
return pWindow ? pWindow->GetFrameWeld() : nullptr;
}
+void SfxViewShell::setBlockedCommandList(const char* bolckedCommandList)
+{
+ if(!mvLOKBlockedCommandList.empty())
+ return;
+
+ OUString BolckedListString(bolckedCommandList, strlen(bolckedCommandList), RTL_TEXTENCODING_UTF8);
+ OUString command = BolckedListString.getToken(0, ' ');
+ for (size_t i = 1; !command.isEmpty(); i++)
+ {
+ mvLOKBlockedCommandList.emplace(command);
+ command = BolckedListString.getToken(i, ' ');
+ }
+}
+
+bool SfxViewShell::isBlockedCommand(OUString command)
+{
+ return mvLOKBlockedCommandList.find(command) != mvLOKBlockedCommandList.end();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */