sc/inc/scopetools.hxx                 |    2 ++
 sc/source/core/tool/scopetools.cxx    |   19 +++++++------------
 sw/source/core/docnode/node.cxx       |    2 +-
 test/source/vclbootstrapprotector.cxx |   15 +++------------
 4 files changed, 13 insertions(+), 25 deletions(-)

New commits:
commit 9e4419dcb9f30f46ba9cc2db62e8a2859c075c29
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Jan 20 08:31:28 2025 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Jan 21 09:42:40 2025 +0100

    cid#1465236 Uncaught exception
    
    and drop coverity workarounds
    
    Change-Id: If9ffc607999285b2f5b63e85c51b0289fb05750f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180531
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/inc/scopetools.hxx b/sc/inc/scopetools.hxx
index db76c8651633..a836f06ee90b 100644
--- a/sc/inc/scopetools.hxx
+++ b/sc/inc/scopetools.hxx
@@ -86,6 +86,8 @@ class DelayStartListeningFormulaCells
     ScColumn& mColumn;
     bool const mbOldValue;
 
+    void ImplDestroy();
+
 public:
     DelayStartListeningFormulaCells(ScColumn& column, bool delay);
     DelayStartListeningFormulaCells(ScColumn& column);
diff --git a/sc/source/core/tool/scopetools.cxx 
b/sc/source/core/tool/scopetools.cxx
index 022c553d59d8..15d94040e09b 100644
--- a/sc/source/core/tool/scopetools.cxx
+++ b/sc/source/core/tool/scopetools.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <o3tl/deleter.hxx>
 #include <scopetools.hxx>
 #include <document.hxx>
 #include <column.hxx>
@@ -84,20 +85,14 @@ 
DelayStartListeningFormulaCells::DelayStartListeningFormulaCells(ScColumn& colum
 {
 }
 
-DelayStartListeningFormulaCells::~DelayStartListeningFormulaCells()
+void DelayStartListeningFormulaCells::ImplDestroy()
 {
-#if defined(__COVERITY__) && __COVERITY_MAJOR__ <= 2023
-    try
-    {
-        mColumn.GetDoc().EnableDelayStartListeningFormulaCells(&mColumn, 
mbOldValue);
-    }
-    catch (...)
-    {
-        std::abort();
-    }
-#else
     mColumn.GetDoc().EnableDelayStartListeningFormulaCells(&mColumn, 
mbOldValue);
-#endif
+}
+
+DelayStartListeningFormulaCells::~DelayStartListeningFormulaCells()
+{
+    suppress_fun_call_w_exception(ImplDestroy());
 }
 
 void DelayStartListeningFormulaCells::set()
diff --git a/test/source/vclbootstrapprotector.cxx 
b/test/source/vclbootstrapprotector.cxx
index 568a1928887e..b0e9518a392d 100644
--- a/test/source/vclbootstrapprotector.cxx
+++ b/test/source/vclbootstrapprotector.cxx
@@ -26,18 +26,9 @@ public:
 
 private:
     virtual ~Protector() override {
-#if defined(__COVERITY__) && __COVERITY_MAJOR__ <= 2023
-        try {
-#endif
-            DeInitVCL();
-            // for the 6 tests that use it
-            comphelper::ThreadPool::getSharedOptimalPool().shutdown();
-#if defined(__COVERITY__) && __COVERITY_MAJOR__ <= 2023
-        } catch (const std::exception& e) {
-            SAL_WARN("vcl.app", "Fatal exception: " << e.what());
-            std::terminate();
-        }
-#endif
+        DeInitVCL();
+        // for the 6 tests that use it
+        comphelper::ThreadPool::getSharedOptimalPool().shutdown();
     }
 
     virtual bool protect(
commit 9723eab349aae681e2680b0bf1854bf5a55e2589
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Jan 20 23:08:50 2025 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Jan 21 09:42:34 2025 +0100

    cid#1641353 COPY_INSTEAD_OF_MOVE
    
    Change-Id: I9037272d4f6ff2e2008d6e13e8021551e5cab1af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180530
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index c3e9688762e8..f224cfd2c6b3 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -140,7 +140,7 @@ static void SetParent( std::shared_ptr<const SwAttrSet>& 
rpAttrSet,
         {
             ProgName sTmp;
             SwStyleNameMapper::FillProgName( pConditionalFormat->GetName(), 
sTmp, SwGetPoolIdFromName::TxtColl );
-            sVal = sTmp;
+            sVal = std::move(sTmp);
         }
 
         const SfxStringItem aFormatColl( RES_FRMATR_CONDITIONAL_STYLE_NAME, 
sVal.toString() );

Reply via email to