[Libreoffice-commits] core.git: 9 commits - connectivity/source editeng/source extensions/source forms/source include/comphelper sd/source svtools/source svx/source sw/source

Caolán McNamara caolanm at redhat.com
Fri Jan 30 13:32:21 PST 2015


 connectivity/source/drivers/evoab2/NResultSet.cxx |    3 +--
 editeng/source/outliner/outliner.cxx              |    2 +-
 extensions/source/update/check/updatecheck.cxx    |   15 ++++++++-------
 forms/source/solar/component/navbarcontrol.cxx    |    7 +++----
 include/comphelper/ChainablePropertySet.hxx       |    3 ++-
 sd/source/core/sdpage.cxx                         |    2 +-
 svtools/source/control/accessibleruler.cxx        |   11 ++++-------
 svx/source/table/accessibletableshape.cxx         |    5 +++--
 sw/source/core/unocore/unotext.cxx                |    2 +-
 sw/source/uibase/inc/unomod.hxx                   |    3 ++-
 sw/source/uibase/uno/unomod.cxx                   |    5 +++--
 11 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit dec950dc4761c1c2f0cf27b20d70f5a0db44d602
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:27:56 2015 +0000

    coverity#1267679 Dereference before null check
    
    Change-Id: Ic3487f204a0a3f826cf6a2441b5c410a8fc1b0b6

diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx
index 493ccc8..fe7e43c 100644
--- a/svtools/source/control/accessibleruler.cxx
+++ b/svtools/source/control/accessibleruler.cxx
@@ -222,14 +222,11 @@ uno::Reference< XAccessibleStateSet > SAL_CALL SvtRulerAccessible::getAccessible
         if( isVisible() )
             pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
 
+        if ( mpRepr->GetStyle() & WB_HORZ )
+            pStateSetHelper->AddState( AccessibleStateType::HORIZONTAL );
+        else
+            pStateSetHelper->AddState( AccessibleStateType::VERTICAL );
 
-        if ( mpRepr )
-        {
-            if ( mpRepr->GetStyle() & WB_HORZ )
-                pStateSetHelper->AddState( AccessibleStateType::HORIZONTAL );
-            else
-                pStateSetHelper->AddState( AccessibleStateType::VERTICAL );
-        }
         if(pStateSetHelper->contains(AccessibleStateType::FOCUSABLE))
         {
             pStateSetHelper->RemoveState( AccessibleStateType::FOCUSABLE );
commit d58d20d43ac14a835fad80a5cc7f33ea48c9aa28
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:25:16 2015 +0000

    coverity#1267673 Dereference after null check
    
    Change-Id: Id9d2176742e4c8f6561ba8e1ab4356852bbb2e8d

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 1f870bc..ba1a901 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -928,7 +928,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
         bDrawBullet = rBulletState.GetValue() ? true : false;
     }
 
-    if ( ImplHasNumberFormat( nPara ) && bDrawBullet)
+    if (bDrawBullet && ImplHasNumberFormat(nPara))
     {
         bool bVertical = IsVertical();
 
commit 04019fc1c81b6eef54a5d38b3039a619cbef6f85
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:23:39 2015 +0000

    coverity#1267672 Unchecked dynamic_cast
    
    Change-Id: Ic5cda0155d54aed7fa89df0fddd6407417b2e133

diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index ae73060..63dafb4 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2323,7 +2323,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
 
     assert(SwTable::FindTable(pTable->GetFrmFmt()) == pTable);
     assert(pTable->GetFrmFmt() ==
-            dynamic_cast<SwXTextTable*>(xRet.get())->GetFrmFmt());
+            dynamic_cast<SwXTextTable&>(*xRet.get()).GetFrmFmt());
     return xRet;
 }
 
commit 0eb9d943614f6b374a0488ba1349be7d1716ae6d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:22:22 2015 +0000

    coverity#1267671 Dereference after null check
    
    Change-Id: I48fe04973732807eca43eaeeba716622318abf6d

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 4ee161e..8cfeff1 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -777,7 +777,7 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
         pMasterPage->EnsureMasterPageDefaultBackground();
     }
 
-    if( static_cast<SdDrawDocument*>( GetModel() )->GetDocumentType() == DOCUMENT_TYPE_IMPRESS )
+    if (GetModel() && static_cast<SdDrawDocument*>(GetModel())->GetDocumentType() == DOCUMENT_TYPE_IMPRESS)
     {
         if( mePageKind == PK_HANDOUT && bInit )
         {
commit 28db7916b7296d40233b464c4603722f735f0d10
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:19:38 2015 +0000

    coverity#1267628 Resource leak in object
    
    Change-Id: I90e36c7af58638e57296dc4776fbd86beff3d101

diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index acc92f0..83f64b5 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -644,12 +644,11 @@ OEvoabResultSet::OEvoabResultSet( OCommonStatement* pStmt, OEvoabConnection *pCo
     REGISTER_PROP( PROPERTY_ID_RESULTSETCONCURRENCY, m_nResultSetConcurrency );
 }
 
-
 OEvoabResultSet::~OEvoabResultSet()
 {
+    delete m_pVersionHelper;
 }
 
-
 void OEvoabResultSet::construct( const QueryData& _rData )
 {
     ENSURE_OR_THROW( _rData.getQuery(), "internal error: no EBookQuery" );
commit fae0953f7d162e092bf3ad6d6ff4cef4c05cc0e7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:16:49 2015 +0000

    coverity#707772 Uninitialized scalar field
    
    Change-Id: I00a5bc6256d9cbfc69ea6a71f2f2cd21e75cc594

diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index bf7b6a5..15cc6c8 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -740,13 +740,14 @@ void SAL_CALL ShutdownThread::onTerminated()
 
 } // anonymous namespace
 
-
-
-
-UpdateCheck::UpdateCheck():
-    m_eState(NOT_INITIALIZED), m_eUpdateState(UPDATESTATES_COUNT),
-    m_pThread(NULL)
-{};
+UpdateCheck::UpdateCheck()
+    : m_eState(NOT_INITIALIZED)
+    , m_eUpdateState(UPDATESTATES_COUNT)
+    , m_pThread(NULL)
+    , m_bHasExtensionUpdate(false)
+    , m_bShowExtUpdDlg(false)
+{
+}
 
 UpdateCheck::~UpdateCheck() {}
 
commit 76e372ccd999f42ad75c20d7eb8e359b608956fc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:15:31 2015 +0000

    coverity#704645 Dereference after null check
    
    Change-Id: Id6930c8e87f27051520e10e1277d769d0b380374

diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 8e6b4d4..16aa480 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -140,10 +140,9 @@ namespace frm
 
             // create the peer
             ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( m_xContext, pParentWin, getModel() );
-            DBG_ASSERT( pPeer, "ONavigationBarControl::createPeer: invalid peer returned!" );
-            if ( pPeer )
-                // by definition, the returned component is acquired once
-                pPeer->release();
+            assert(pPeer && "ONavigationBarControl::createPeer: invalid peer returned!");
+            // by definition, the returned component is acquired once
+            pPeer->release();
 
             // announce the peer to the base class
             setPeer( pPeer );
commit 6ce0ca734f31489019605d3550cbe29a70d8e6f4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:05:57 2015 +0000

    coverity#1267684 Uncaught exception
    
    Change-Id: Ie444d89108087c39ad429743e76c383f640c8751

diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index 35c0ecb..1cb7685 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -69,7 +69,7 @@ public:
     void init( const Reference< XAccessible>& xAccessible, const Reference< XTable >& xTable );
     void dispose();
 
-    Reference< XAccessible > getAccessibleChild( sal_Int32 i ) throw(IndexOutOfBoundsException);
+    Reference< XAccessible > getAccessibleChild(sal_Int32 i) throw (IndexOutOfBoundsException, RuntimeException);
     void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (IndexOutOfBoundsException );
 
     // XModifyListener
@@ -151,7 +151,8 @@ Reference< AccessibleCell > AccessibleTableShapeImpl::getAccessibleCell (Referen
 }
 
 
-Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild( sal_Int32 nChildIndex ) throw(IndexOutOfBoundsException)
+Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild(sal_Int32 nChildIndex)
+    throw (IndexOutOfBoundsException, RuntimeException)
 {
     sal_Int32 nColumn = 0, nRow = 0;
     getColumnAndRow( nChildIndex, nColumn, nRow );
commit 78f8fb8acf9bff6264ede0403dd7a25ec96864cb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 30 21:03:13 2015 +0000

    coverity#1267689 Uncaught exception
    
    Change-Id: I9286332d74c234007556a7f1d5193197ce547652

diff --git a/include/comphelper/ChainablePropertySet.hxx b/include/comphelper/ChainablePropertySet.hxx
index b8aa4f7..31e1de7 100644
--- a/include/comphelper/ChainablePropertySet.hxx
+++ b/include/comphelper/ChainablePropertySet.hxx
@@ -74,7 +74,8 @@ namespace comphelper
                    css::beans::PropertyVetoException,
                    css::lang::IllegalArgumentException,
                    css::lang::WrappedTargetException,
-                   css::uno::RuntimeException) = 0;
+                   css::uno::RuntimeException,
+                   std::exception) = 0;
         virtual void _postSetValues ()
             throw (css::beans::UnknownPropertyException,
                    css::beans::PropertyVetoException,
diff --git a/sw/source/uibase/inc/unomod.hxx b/sw/source/uibase/inc/unomod.hxx
index 264ae07..a0f24eb 100644
--- a/sw/source/uibase/inc/unomod.hxx
+++ b/sw/source/uibase/inc/unomod.hxx
@@ -152,7 +152,8 @@ protected:
                css::beans::PropertyVetoException,
                css::lang::IllegalArgumentException,
                css::lang::WrappedTargetException,
-               css::uno::RuntimeException) SAL_OVERRIDE;
+               css::uno::RuntimeException,
+               std::exception) SAL_OVERRIDE;
     virtual void _postSetValues()
         throw (css::beans::UnknownPropertyException,
                css::beans::PropertyVetoException,
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index d43e236..f1b4fb3 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -299,7 +299,8 @@ void SwXPrintSettings::_preSetValues ()
 }
 
 void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue )
-    throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
+    throw (UnknownPropertyException, PropertyVetoException,
+           IllegalArgumentException, WrappedTargetException)
 {
     bool bVal;
     if ( rInfo.mnHandle != HANDLE_PRINTSET_ANNOTATION_MODE &&
@@ -606,7 +607,7 @@ void SwXViewSettings::_preSetValues ()
 void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue )
     throw (UnknownPropertyException, PropertyVetoException,
            IllegalArgumentException, WrappedTargetException,
-           RuntimeException)
+           RuntimeException, std::exception)
 {
     bool bVal = HANDLE_VIEWSET_ZOOM != rInfo.mnHandle && *(sal_Bool*)rValue.getValue();
     // the API flag should not be set to the application's view settings


More information about the Libreoffice-commits mailing list