[Libreoffice-commits] core.git: 4 commits - dbaccess/source i18npool/inc i18npool/source sc/qa sc/source

Caolán McNamara caolanm at redhat.com
Sat Sep 3 17:58:10 UTC 2016


 dbaccess/source/core/api/KeySet.cxx                       |    2 +-
 dbaccess/source/core/api/KeySet.hxx                       |    2 +-
 i18npool/inc/indexentrysupplier_default.hxx               |    2 +-
 i18npool/source/indexentry/indexentrysupplier_default.cxx |    2 +-
 sc/qa/unit/ucalc_sharedformula.cxx                        |    3 ++-
 sc/source/ui/docshell/docsh3.cxx                          |   14 +++++++-------
 6 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 29012d14efab09ffd3a74a6695f80ee6882765b3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Sep 3 18:57:06 2016 +0100

    coverity#1372443 Unchecked return value
    
    Change-Id: I44532e3bf77e8397e1dc08d766c43ecfc0b0a59f

diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 4c2c4e5..3d9408c 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -1024,17 +1024,17 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
                         {
                             OUString aName;
                             aDocument.CreateValidTabName( aName );
-                            GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, true, false );
+                            (void)GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, true, false );
                         }
                         break;
                         case SC_CAT_INSERT_ROWS:
-                            GetDocFunc().InsertCells( aSourceRange, nullptr, INS_INSROWS_BEFORE, true, false );
+                            (void)GetDocFunc().InsertCells( aSourceRange, nullptr, INS_INSROWS_BEFORE, true, false );
                         break;
                         case SC_CAT_INSERT_COLS:
-                            GetDocFunc().InsertCells( aSourceRange, nullptr, INS_INSCOLS_BEFORE, true, false );
+                            (void)GetDocFunc().InsertCells( aSourceRange, nullptr, INS_INSCOLS_BEFORE, true, false );
                         break;
                         case SC_CAT_DELETE_TABS :
-                            GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), true, false );
+                            (void)GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), true, false );
                         break;
                         case SC_CAT_DELETE_ROWS:
                         {
@@ -1042,7 +1042,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
                             if ( pDel->IsTopDelete() )
                             {
                                 aSourceRange = pDel->GetOverAllRange().MakeRange();
-                                GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELROWS, false );
+                                (void)GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELROWS, false );
 
                                 // #i101099# [Collaboration] Changes are not correctly shown
                                 if ( bShared )
@@ -1062,7 +1062,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
                             if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() )
                             {   // deleted Table enthaelt deleted Cols, die nicht
                                 aSourceRange = pDel->GetOverAllRange().MakeRange();
-                                GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELCOLS, false );
+                                (void)GetDocFunc().DeleteCells( aSourceRange, nullptr, DEL_DELCOLS, false );
                             }
                         }
                         break;
@@ -1070,7 +1070,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
                         {
                             const ScChangeActionMove* pMove = static_cast<const ScChangeActionMove*>(pSourceAction);
                             ScRange aFromRange( pMove->GetFromRange().MakeRange() );
-                            GetDocFunc().MoveBlock( aFromRange,
+                            (void)GetDocFunc().MoveBlock( aFromRange,
                                 aSourceRange.aStart, true, true, false, false );
                         }
                         break;
commit d98355805e0c275ccdbdfb45f20592fa3621c4a5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Sep 3 18:54:05 2016 +0100

    coverity#1372442 Unchecked return value
    
    Change-Id: I09c4500a66da8a53630e8701e1531a04e178eaf8

diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx
index 6a9a000..d319717 100644
--- a/sc/qa/unit/ucalc_sharedformula.cxx
+++ b/sc/qa/unit/ucalc_sharedformula.cxx
@@ -1479,7 +1479,8 @@ void Test::testSharedFormulaMoveBlock()
     CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(1,4,0)));
 
     // Move A1:A2 to D2:D3.
-    rFunc.MoveBlock(ScRange(0,0,0,0,1,0), ScAddress(3,1,0), true, true, false, true);
+    bool bMoved = rFunc.MoveBlock(ScRange(0,0,0,0,1,0), ScAddress(3,1,0), true, true, false, true);
+    CPPUNIT_ASSERT(bMoved);
 
     // Check the formula values again.  They should not change.
     CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(1,0,0)));
commit 1b3980564f518a3bbc871307807eb151cd02ea1a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Sep 3 18:51:53 2016 +0100

    coverity#1372445 Uncaught exception
    
    Change-Id: If28494c8727504c6f995576b59e6c79995e405a0

diff --git a/i18npool/inc/indexentrysupplier_default.hxx b/i18npool/inc/indexentrysupplier_default.hxx
index e9ffbd0..79934b2 100644
--- a/i18npool/inc/indexentrysupplier_default.hxx
+++ b/i18npool/inc/indexentrysupplier_default.hxx
@@ -84,7 +84,7 @@ public:
     Index(const css::uno::Reference < css::uno::XComponentContext >& rxContext);
     ~Index();
 
-    void init(const css::lang::Locale& rLocale, const OUString& algorithm) throw (css::uno::RuntimeException);
+    void init(const css::lang::Locale& rLocale, const OUString& algorithm) throw (css::uno::RuntimeException, std::exception);
 
     void makeIndexKeys(const css::lang::Locale &rLocale, const OUString &algorithm) throw (css::uno::RuntimeException, std::exception);
     sal_Int16 getIndexWeight(const OUString& rIndexEntry);
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 9cfbc9f..2c902cf 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -251,7 +251,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm
     }
 }
 
-void Index::init(const lang::Locale &rLocale, const OUString& algorithm) throw (RuntimeException)
+void Index::init(const lang::Locale &rLocale, const OUString& algorithm) throw (RuntimeException, std::exception)
 {
     makeIndexKeys(rLocale, algorithm);
 
commit a54f7b5ce913505c93764d4dc6bca39118457830
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Sep 3 18:51:05 2016 +0100

    coverity#1372446 Uncaught exception
    
    Change-Id: I831c0d2e6449eae76383163f08e7b16c7decc92f

diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 917f78b..a42d273 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1184,7 +1184,7 @@ bool SAL_CALL OKeySet::previous(  ) throw(SQLException, RuntimeException)
     return previous_checked(true);
 }
 
-bool OKeySet::doTryRefetch_throw()  throw(SQLException, RuntimeException)
+bool OKeySet::doTryRefetch_throw()  throw(SQLException, RuntimeException, std::exception)
 {
     ensureStatement( );
     // we just reassign the base members
diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index 5c3fa2b6..9d559a4 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -138,7 +138,7 @@ namespace dbaccess
                                        sal_Int32 _nType,
                                        sal_Int32 _nScale );
         OUStringBuffer createKeyFilter( );
-        bool doTryRefetch_throw() throw(css::sdbc::SQLException, css::uno::RuntimeException);
+        bool doTryRefetch_throw() throw(css::sdbc::SQLException, css::uno::RuntimeException, std::exception);
         void tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch);
         void executeUpdate(const ORowSetRow& _rInsertRow, const ORowSetRow& _rOriginalRow, const OUString& i_sSQL, const OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions = ::std::vector<sal_Int32>());
         void executeInsert( const ORowSetRow& _rInsertRow, const OUString& i_sSQL, const OUString& i_sTableName, bool bRefetch = false);


More information about the Libreoffice-commits mailing list