sw/inc/calc.hxx | 4 +++- sw/source/core/bastyp/calc.cxx | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit 1286014bbfad29e99634d62111e1ccef2f5e9a2b Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Aug 18 09:04:13 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Aug 18 11:00:41 2022 +0200 cid#1485150 Uncaught exception Change-Id: I793683bfb59ff6b8751baa14a999b699cc28fdc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138467 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index 81ae76f4e29b..2a770dc447cd 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -226,9 +226,11 @@ class SwCalc SwCalc( const SwCalc& ) = delete; SwCalc& operator=( const SwCalc& ) = delete; + void ImplDestroy(); + public: SwCalc(SwDoc& rD); - ~SwCalc() COVERITY_NOEXCEPT_FALSE; + ~SwCalc(); SwSbxValue Calculate( const OUString &rStr ); OUString GetStrResult( const SwSbxValue& rValue ); diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index a2dfd6c4aee2..d63ab0231914 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -348,12 +348,17 @@ SwCalc::SwCalc( SwDoc& rD ) } // SwCalc::SwCalc -SwCalc::~SwCalc() COVERITY_NOEXCEPT_FALSE +void SwCalc::ImplDestroy() { if( m_pCharClass != &GetAppCharClass() ) delete m_pCharClass; } +SwCalc::~SwCalc() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + SwSbxValue SwCalc::Calculate( const OUString& rStr ) { m_eError = SwCalcError::NONE;