[Libreoffice-commits] core.git: sc/source sd/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 2 15:33:29 UTC 2021


 sc/source/ui/drawfunc/fudraw.cxx |    5 +++--
 sc/source/ui/drawfunc/fusel.cxx  |    3 ++-
 sc/source/ui/uitest/uiobject.cxx |    4 +++-
 sc/source/ui/view/tabvwshh.cxx   |    4 +++-
 sd/source/ui/func/fupoor.cxx     |    4 +++-
 5 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit c94f55488ce85091d3510db2717951ca52793174
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Feb 2 11:53:04 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Feb 2 16:32:47 2021 +0100

    use css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY instead of bare 0
    
    Change-Id: I3fb67bcdaa27159790d36100f897efa7d43856ca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110317
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 3d3201bd6c17..04d31cd6c8b3 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -37,6 +37,7 @@
 #include <docsh.hxx>
 #include <drawview.hxx>
 #include <comphelper/lok.hxx>
+#include <com/sun/star/embed/EmbedVerbs.hpp>
 
 namespace
 {
@@ -242,7 +243,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                     SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
                     if( dynamic_cast<const SdrOle2Obj*>( pObj) && !bOle )
                     {
-                        rViewShell.ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
+                        rViewShell.ActivateObject(static_cast<SdrOle2Obj*>(pObj), css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
 
                         // consumed
                         bReturn = true;
@@ -270,7 +271,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                     // in that case F2 is sent instead of double click
                     if (isMobilePhone && ScDocument::IsChart(pObj))
                     {
-                        rViewShell.ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
+                        rViewShell.ActivateObject(static_cast<SdrOle2Obj*>(pObj), css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
                         break;
                     }
                     if ( lcl_KeyEditMode( pObj, rViewShell, nullptr ) )            // start text edit for suitable object
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index dca0beaa1ef1..b42979a3ba56 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <com/sun/star/embed/EmbedVerbs.hpp>
 #include <editeng/flditem.hxx>
 #include <svx/svddrgmt.hxx>
 #include <svx/svdoole2.hxx>
@@ -467,7 +468,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
                         {
                             if (static_cast<SdrOle2Obj*>(pObj)->GetObjRef().is())
                             {
-                                rViewShell.ActivateObject( static_cast<SdrOle2Obj*>(pObj), 0 );
+                                rViewShell.ActivateObject(static_cast<SdrOle2Obj*>(pObj), css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
                             }
                         }
                     }
diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx
index 661f69aacfcd..1e17f9301a58 100644
--- a/sc/source/ui/uitest/uiobject.cxx
+++ b/sc/source/ui/uitest/uiobject.cxx
@@ -27,6 +27,8 @@
 #include <fudraw.hxx>
 #include <postit.hxx>
 
+#include <com/sun/star/embed/EmbedVerbs.hpp>
+
 #include <svx/svditer.hxx>
 #include <svx/svdobj.hxx>
 #include <svx/svdoole2.hxx>
@@ -201,7 +203,7 @@ void ScGridWinUIObject::execute(const OUString& rAction,
             if (nSdrObjKind == OBJ_OLE2)
             {
                 ScTabViewShell* pViewShell = getViewShell();
-                pViewShell->ActivateObject( static_cast<SdrOle2Obj*>(pObj), 0 );
+                pViewShell->ActivateObject(static_cast<SdrOle2Obj*>(pObj), css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
             }
             else
             {
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 4a448584aef7..f178175046fd 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -37,6 +37,8 @@
 #include <retypepassdlg.hxx>
 #include <tabprotection.hxx>
 
+#include <com/sun/star/embed/EmbedVerbs.hpp>
+
 using namespace com::sun::star;
 
 void ScTabViewShell::ExecuteObject( const SfxRequest& rReq )
@@ -72,7 +74,7 @@ void ScTabViewShell::ExecuteObject( const SfxRequest& rReq )
                 // activate
 
                 if ( nSlotId == SID_OLE_ACTIVATE )
-                    pVisibleSh->DoVerb( 0 );
+                    pVisibleSh->DoVerb(css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
             }
             break;
         case SID_OLE_DEACTIVATE:
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 3b0a81870672..7d1728be115e 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -40,6 +40,8 @@
 #include <slideshow.hxx>
 #include <LayerTabBar.hxx>
 
+#include <com/sun/star/embed/EmbedVerbs.hpp>
+
 #include <sfx2/viewfrm.hxx>
 
 #include <svx/svditer.hxx>
@@ -238,7 +240,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
                     if( dynamic_cast< const SdrOle2Obj* >( pObj ) && !mpDocSh->IsUIActive() )
                     {
                         //HMHmpView->HideMarkHdl();
-                        mpViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
+                        mpViewShell->ActivateObject(static_cast<SdrOle2Obj*>(pObj), css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
                     }
                     else if( pObj && pObj->IsEmptyPresObj() && dynamic_cast< const SdrGrafObj *>( pObj ) !=  nullptr )
                     {


More information about the Libreoffice-commits mailing list