diff options
-rw-r--r-- | sc/inc/scopetools.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/scopetools.cxx | 19 | ||||
-rw-r--r-- | test/source/vclbootstrapprotector.cxx | 15 |
3 files changed, 12 insertions, 24 deletions
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( |