diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-15 11:53:51 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-15 10:59:23 +0000 |
commit | b8a1d072ff8e686fad4a507b85d163d699ed59e0 (patch) | |
tree | 0b09104f3cadd6677d63710fd43be16d3f85fb2f /sfx2 | |
parent | Resolves: tdf#100396 handle unspecified WEEKDAY arguments and support new ones (diff) | |
download | core-b8a1d072ff8e686fad4a507b85d163d699ed59e0.tar.gz core-b8a1d072ff8e686fad4a507b85d163d699ed59e0.zip |
sfx2: implement per-view LOK_CALLBACK_CONTEXT_MENU
Change-Id: Ia321d2f03bf77eba87b1135799b3cb0409f23ebf
Reviewed-on: https://gerrit.libreoffice.org/26293
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 2cbf1ab4c6eb..da43a7b09290 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1992,8 +1992,16 @@ void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window *pWin, c std::stringstream aStream; boost::property_tree::write_json(aStream, aRoot, true); - const SfxObjectShell* objSh = xImp->pFrame->GetObjectShell(); - objSh->libreOfficeKitCallback(LOK_CALLBACK_CONTEXT_MENU, aStream.str().c_str()); + if (comphelper::LibreOfficeKit::isViewCallback()) + { + if (SfxViewShell* pViewShell = xImp->pFrame->GetViewShell()) + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU, aStream.str().c_str()); + } + else + { + const SfxObjectShell* objSh = xImp->pFrame->GetObjectShell(); + objSh->libreOfficeKitCallback(LOK_CALLBACK_CONTEXT_MENU, aStream.str().c_str()); + } } else { |