[Libreoffice-commits] .: 2 commits - svx/source ucb/source

Michael Meeks mmeeks at kemper.freedesktop.org
Thu Oct 14 09:33:22 PDT 2010


 svx/source/unodraw/unopage.cxx            |    3 +--
 svx/source/unodraw/unoshap2.cxx           |    3 +--
 ucb/source/ucp/odma/odma_datasupplier.cxx |    5 ++++-
 3 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 37d03a6fd24aebbb0908ca7cdc89aa216d783c23
Author: Harri Pitkänen <hatapitk at iki.fi>
Date:   Thu Oct 14 17:32:23 2010 +0100

    remove redundant null checks.

diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 4504c99..e4f9abb 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -330,8 +330,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape
     if(pObj == NULL)
         return;
 
-    if(pShape)
-        pShape->Create( pObj, this );
+    pShape->Create( pObj, this );
 
     if( mpModel )
         mpModel->SetChanged();
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index b0c48b7..10fd236 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -249,8 +249,7 @@ void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShap
         // Establish connection between new SdrObject and its wrapper before
         // inserting the new shape into the group.  There a new wrapper
         // would be created when this connection would not already exist.
-        if(pShape)
-            pShape->Create( pSdrShape, mxPage.get() );
+        pShape->Create( pSdrShape, mxPage.get() );
 
         if( mpModel )
             mpModel->SetChanged();
commit cb9d5351f02d8a6c6e75bb5676ef78a306a8466b
Author: Harri Pitkänen <hatapitk at iki.fi>
Date:   Thu Oct 14 17:32:07 2010 +0100

    fix leak

diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx
index 86d1326..8225175 100644
--- a/ucb/source/ucp/odma/odma_datasupplier.cxx
+++ b/ucb/source/ucp/odma/odma_datasupplier.cxx
@@ -288,8 +288,11 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
     
     DWORD dwFlags = ODM_SPECIFIC;
     odm = NODMQueryExecute(ContentProvider::getHandle(), sQuery,dwFlags, lpszDMSList, pQueryId );
-    if(odm != ODM_SUCCESS)
+    if(odm != ODM_SUCCESS) {
+        delete[] pQueryId;
+        delete[] lpszDMSList;
         return sal_False;
+    }
 
     sal_uInt16 nCount		= 10;
     sal_uInt16 nMaxCount	= 10;


More information about the Libreoffice-commits mailing list