sfx2/source/control/dispatch.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit b8a1d072ff8e686fad4a507b85d163d699ed59e0
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Wed Jun 15 11:53:51 2016 +0200

    sfx2: implement per-view LOK_CALLBACK_CONTEXT_MENU
    
    Change-Id: Ia321d2f03bf77eba87b1135799b3cb0409f23ebf
    Reviewed-on: https://gerrit.libreoffice.org/26293
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 2cbf1ab..da43a7b 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
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to