[Libreoffice-commits] core.git: 2 commits - comphelper/source include/sfx2 sc/source sd/source sw/source

Michael Stahl mstahl at redhat.com
Wed Jan 13 14:45:18 PST 2016


 comphelper/source/container/embeddedobjectcontainer.cxx |    3 ++-
 include/sfx2/shell.hxx                                  |    2 --
 sc/source/ui/drawfunc/fuins2.cxx                        |    7 ++++---
 sd/source/ui/func/fuinsert.cxx                          |    5 +++--
 sd/source/ui/view/viewshe2.cxx                          |    3 ++-
 sw/source/uibase/table/tablemgr.cxx                     |    3 ++-
 sw/source/uibase/wrtsh/wrtsh1.cxx                       |    5 +++--
 7 files changed, 16 insertions(+), 12 deletions(-)

New commits:
commit d406d7c3a649bcbbe3377338707221e39f03a639
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jan 13 22:34:34 2016 +0100

    resolve TODO, remove SVVERB_SHOW
    
    Change-Id: I10148330f1a356dbd423af98267c25d7128c3a86

diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index 488e06b..9c82f1f 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -113,8 +113,6 @@ enum SfxInterfaceId
     SFX_INTERFACE_LIB               =  450
 };
 
-//TODO/CLEANUP: replace by UNO constant
-#define SVVERB_SHOW -1
 
 typedef void (*SfxExecFunc)(SfxShell *, SfxRequest &rReq);
 typedef void (*SfxStateFunc)(SfxShell *, SfxItemSet &rSet);
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index b98890e..7342981 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -49,6 +49,7 @@
 #include <cppuhelper/component_context.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/storagehelper.hxx>
+#include <com/sun/star/embed/EmbedVerbs.hpp>
 #include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
 #include <com/sun/star/frame/XComponentLoader.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
@@ -361,7 +362,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
                 }
                 else
                 {
-                    pViewShell->ActivateObject( pObj, SVVERB_SHOW );
+                    pViewShell->ActivateObject(pObj, embed::EmbedVerbs::MS_OLEVERB_SHOW);
                 }
             }
 
@@ -605,7 +606,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
         //the controller will be unlocked by the dialog when the dialog is told to do so
 
         // only activate object if not called via API (e.g. macro)
-        pViewShell->ActivateObject( pObj, SVVERB_SHOW );
+        pViewShell->ActivateObject(pObj, embed::EmbedVerbs::MS_OLEVERB_SHOW);
 
         //open wizard
         //@todo get context from calc if that has one
@@ -765,7 +766,7 @@ FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, vcl::Wind
     pView->UnmarkAllObj();
     pView->MarkObj( pObj, pPV );
 
-    pViewShell->ActivateObject( pObj, SVVERB_SHOW );
+    pViewShell->ActivateObject(pObj, embed::EmbedVerbs::MS_OLEVERB_SHOW);
 }
 
 void FuInsertChartFromFile::Activate()
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 7e5b08a..3a9a0d0 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -23,6 +23,7 @@
 #include <comphelper/processfactory.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <svx/svxdlg.hxx>
+#include <com/sun/star/embed/EmbedVerbs.hpp>
 #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
 #include <com/sun/star/embed/XComponentSupplier.hpp>
 #include <com/sun/star/embed/Aspects.hpp>
@@ -427,7 +428,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
                 aVisualSize.Width = aTmp.Width();
                 aVisualSize.Height = aTmp.Height();
                 xObj->setVisualAreaSize( nAspect, aVisualSize );
-                mpViewShell->ActivateObject(pOleObj, SVVERB_SHOW);
+                mpViewShell->ActivateObject(pOleObj, embed::EmbedVerbs::MS_OLEVERB_SHOW);
 
                 if (nSlotId == SID_INSERT_DIAGRAM)
                 {
@@ -647,7 +648,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
                                 xObj->setVisualAreaSize( nAspect, aSz );
                             }
 
-                            mpViewShell->ActivateObject(pObj, SVVERB_SHOW);
+                            mpViewShell->ActivateObject(pObj, embed::EmbedVerbs::MS_OLEVERB_SHOW);
                         }
 
                         Size aVisSizePixel = mpWindow->GetOutputSizePixel();
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 3ba3182..b86daec 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <com/sun/star/embed/EmbedVerbs.hpp>
 #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
@@ -798,7 +799,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
 
             GetViewShellBase().SetVerbs( xObj->getSupportedVerbs() );
 
-            nVerb = SVVERB_SHOW;
+            nVerb = embed::EmbedVerbs::MS_OLEVERB_SHOW;
         }
         else
         {
diff --git a/sw/source/uibase/table/tablemgr.cxx b/sw/source/uibase/table/tablemgr.cxx
index b1518e1..e6bed55 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/embed/EmbedVerbs.hpp>
 
 #include <sot/storage.hxx>
 #include <comphelper/classids.hxx>
@@ -267,7 +268,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
         pSh->CalcAndSetScale( aEmbObjRef );
         //#50270# We don't need to handle errors,
         //this does the DoVerb in the SfxViewShell.
-        ErrCode nErr = pClient->DoVerb( SVVERB_SHOW );
+        ErrCode nErr = pClient->DoVerb(embed::EmbedVerbs::MS_OLEVERB_SHOW);
         (void) nErr;
 
         // #i121334#
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index b44a2c0..e82f8aa 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -17,11 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XChild.hpp>
 #include <com/sun/star/embed/XVisualObject.hpp>
 #include <com/sun/star/embed/EmbedMisc.hpp>
 #include <com/sun/star/embed/EmbedStates.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/embed/EmbedVerbs.hpp>
 #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/util/XModifiable.hpp>
@@ -419,7 +420,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
 
                 //#50270# We don't need to handle error, this is handled by the
                 //DoVerb in the SfxViewShell
-                pClient->DoVerb( SVVERB_SHOW );
+                pClient->DoVerb(embed::EmbedVerbs::MS_OLEVERB_SHOW);
 
                 // TODO/LATER: set document name - should be done in Client
             }
commit bd5834005872d005c3129405c6ab2d6d2bdce19d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jan 13 22:27:01 2016 +0100

    tdf#97108: SwDocShell of clipboard document has no base URL
    
    ... which triggers this assert; have to downgrade it to SAL_INFO.
    
    The startsWith("0x") check is obsolete anyway since commit
    0f02bc189b6e89ca2e62d4bd6a2f407a9fd4ec3b.
    
    Change-Id: If47bc4496852ff85ba1bbeb4205ffc16be0782de

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 9a91321..6c373e2 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -707,7 +707,8 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
     // objects without persistence are not really stored by the method
     if (xObj.is() && StoreEmbeddedObject(xObj, rName, true, rSrcShellID, rDestShellID))
     {
-        assert(!rDestShellID.isEmpty() && !rDestShellID.startsWith("0x")); // assume that every shell has a base URL
+        SAL_INFO_IF(rDestShellID.isEmpty(), "comphelper.container",
+            "SfxObjectShell with no base URL?"); // every shell has a base URL, except the clipboard SwDocShell
         xResult = Get_Impl(rName, xObj, &rDestShellID);
         if ( !xResult.is() )
         {


More information about the Libreoffice-commits mailing list