diff options
Diffstat (limited to 'sfx2/source/control/unoctitm.cxx')
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 694959d327e6..8366e2eef254 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -50,6 +50,7 @@ #include <vcl/svapp.hxx> #include <vcl/uitest/logger.hxx> #include <boost/property_tree/json_parser.hpp> +#include <tools/json_writer.hxx> #include <sfx2/app.hxx> #include <sfx2/unoctitm.hxx> @@ -71,6 +72,7 @@ #include <unotools/pathoptions.hxx> #include <osl/time.h> #include <sfx2/lokhelper.hxx> +#include <basic/sberrors.hxx> #include <iostream> #include <map> @@ -616,6 +618,21 @@ void SfxDispatchController_Impl::dispatch( const css::util::URL& aURL, collectUIInformation(aURL, aArgs); SolarMutexGuard aGuard; + + if (comphelper::LibreOfficeKit::isActive() && + SfxViewShell::Current()->isBlockedCommand(aURL.Complete)) + { + tools::JsonWriter aTree; + aTree.put("code", ""); + aTree.put("kind", "BlockedCommand"); + aTree.put("cmd", aURL.Complete); + aTree.put("message", "Blocked feature"); + aTree.put("viewID", SfxViewShell::Current()->GetViewShellId().get()); + + SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_COMMAND_BLOCKED, aTree.extractData()); + return; + } + if ( !(pDispatch && ( |