basctl/source/dlged/dlgedfac.cxx | 7 +++++-- basctl/source/inc/dlgedfac.hxx | 4 +++- basic/source/inc/iosys.hxx | 2 +- basic/source/runtime/iosys.cxx | 5 ++--- connectivity/source/drivers/jdbc/Object.cxx | 9 ++++++++- connectivity/source/inc/java/GlobalRef.hxx | 6 +++--- connectivity/source/inc/java/lang/Object.hxx | 6 ++++-- cui/source/dialogs/hangulhanjadlg.cxx | 4 ++-- drawinglayer/source/primitive2d/textlayoutdevice.cxx | 5 ++++- include/drawinglayer/primitive2d/textlayoutdevice.hxx | 2 +- 10 files changed, 33 insertions(+), 17 deletions(-)
New commits: commit 41a20e67c80bd84333e4af95f717c5e3ba3407c0 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Oct 6 08:28:39 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Oct 6 11:22:08 2025 +0200 cid#1421169 Uncaught exception and cid#1421161 Uncaught exception cid#1421146 Uncaught exception cid#1421145 Uncaught exception cid#1421100 Uncaught exception cid#1659879 Uncaught exception Change-Id: Ib117e8f2de0d51189d7277d3eec8a1ed685f0724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191947 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index 5dcbdf7c2ef8..aa50f313de05 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -38,12 +38,15 @@ DlgEdFactory::DlgEdFactory( css::uno::Reference< css::frame::XModel > xModel ) : SdrObjFactory::InsertMakeObjectHdl( LINK(this, DlgEdFactory, MakeObject) ); } - -DlgEdFactory::~DlgEdFactory() +void DlgEdFactory::ImplDestroy() { SdrObjFactory::RemoveMakeObjectHdl( LINK(this, DlgEdFactory, MakeObject) ); } +DlgEdFactory::~DlgEdFactory() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Reference<SdrObject> ) { diff --git a/basctl/source/inc/dlgedfac.hxx b/basctl/source/inc/dlgedfac.hxx index d85998e3db9e..c921192d7ab0 100644 --- a/basctl/source/inc/dlgedfac.hxx +++ b/basctl/source/inc/dlgedfac.hxx @@ -31,6 +31,8 @@ class DlgEdFactory { const css::uno::Reference<css::frame::XModel> mxModel; + void ImplDestroy(); + public: DlgEdFactory(css::uno::Reference<css::frame::XModel> xModel); ~DlgEdFactory(); diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 4b838ba1091a..afb5a6fe3078 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -600,7 +600,6 @@ ErrCode SbiStream::Write( const OString& rBuf ) return nError; } - SbiIoSystem::SbiIoSystem() { for(SbiStream* & i : pChan) @@ -613,7 +612,7 @@ SbiIoSystem::SbiIoSystem() SbiIoSystem::~SbiIoSystem() { - Shutdown(); + suppress_fun_call_w_exception(Shutdown()); } ErrCode SbiIoSystem::GetError() diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index 179963af1a4a..88b06aec20c0 100644 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/logging/LogLevel.hpp> #include <java/tools.hxx> #include <java/sql/SQLException.hxx> +#include <o3tl/deleter.hxx> #include <osl/diagnose.h> #include <java/LocalRef.hxx> #include <strings.hxx> @@ -110,7 +111,7 @@ java_lang_Object::java_lang_Object( JNIEnv * pXEnv, jobject myObj ) object = pXEnv->NewGlobalRef( myObj ); } -java_lang_Object::~java_lang_Object() +void java_lang_Object::ImplDestroy() { if( object ) { @@ -119,6 +120,12 @@ java_lang_Object::~java_lang_Object() } SDBThreadAttach::releaseRef(); } + +java_lang_Object::~java_lang_Object() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + void java_lang_Object::clearObject(JNIEnv& rEnv) { if( object ) diff --git a/connectivity/source/inc/java/GlobalRef.hxx b/connectivity/source/inc/java/GlobalRef.hxx index 04c691fb5872..b0dac199f220 100644 --- a/connectivity/source/inc/java/GlobalRef.hxx +++ b/connectivity/source/inc/java/GlobalRef.hxx @@ -21,7 +21,7 @@ #include <java/LocalRef.hxx> #include <java/lang/Object.hxx> - +#include <o3tl/deleter.hxx> namespace connectivity::jdbc { @@ -54,7 +54,7 @@ namespace connectivity::jdbc ~GlobalRef() { - reset(); + suppress_fun_call_w_exception(reset()); } void reset() diff --git a/connectivity/source/inc/java/lang/Object.hxx b/connectivity/source/inc/java/lang/Object.hxx index 9ec6ee1752ba..cff4a4f444f2 100644 --- a/connectivity/source/inc/java/lang/Object.hxx +++ b/connectivity/source/inc/java/lang/Object.hxx @@ -55,11 +55,13 @@ namespace connectivity }; - class java_lang_Object + class java_lang_Object { java_lang_Object& operator= (java_lang_Object const &) = delete; java_lang_Object(java_lang_Object const &) = delete; + void ImplDestroy(); + protected: // The Java handle to this class jobject object; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 0babb4ed39ff..db62c86a0011 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -73,7 +73,7 @@ namespace svx } ~FontSwitch() { - m_rDev.Pop(); + suppress_fun_call_w_exception(m_rDev.Pop()); } }; diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 2cf66e26d17f..36f5a7bdacd2 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -165,7 +165,10 @@ TextLayouterDevice::TextLayouterDevice() mrDevice.setSubpixelPositioning(true); } -TextLayouterDevice::~TextLayouterDevice() { releaseGlobalVirtualDevice(); } +TextLayouterDevice::~TextLayouterDevice() +{ + suppress_fun_call_w_exception(releaseGlobalVirtualDevice()); +} void TextLayouterDevice::setFont(const vcl::Font& rFont) { commit 153b4dc2e0e5a60a1af6ca51f994b60d696d874b Author: Caolán McNamara <[email protected]> AuthorDate: Sun Oct 5 11:26:56 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Oct 6 11:22:01 2025 +0200 drop some more COVERITY stuff Change-Id: I5964880c3eb62875c45e3262a9c657f7bade236d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191946 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index 72107f383626..5dcbdf7c2ef8 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -39,7 +39,7 @@ DlgEdFactory::DlgEdFactory( css::uno::Reference< css::frame::XModel > xModel ) : } -DlgEdFactory::~DlgEdFactory() COVERITY_NOEXCEPT_FALSE +DlgEdFactory::~DlgEdFactory() { SdrObjFactory::RemoveMakeObjectHdl( LINK(this, DlgEdFactory, MakeObject) ); } diff --git a/basctl/source/inc/dlgedfac.hxx b/basctl/source/inc/dlgedfac.hxx index 5e583ada1729..d85998e3db9e 100644 --- a/basctl/source/inc/dlgedfac.hxx +++ b/basctl/source/inc/dlgedfac.hxx @@ -33,7 +33,7 @@ class DlgEdFactory public: DlgEdFactory(css::uno::Reference<css::frame::XModel> xModel); - ~DlgEdFactory() COVERITY_NOEXCEPT_FALSE; + ~DlgEdFactory(); DECL_LINK(MakeObject, SdrObjCreatorParams, rtl::Reference<SdrObject>); }; diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx index b562b13c2154..e4e3ff3f181e 100644 --- a/basic/source/inc/iosys.hxx +++ b/basic/source/inc/iosys.hxx @@ -91,7 +91,7 @@ class SbiIoSystem void WriteCon(std::u16string_view); public: SbiIoSystem(); - ~SbiIoSystem() COVERITY_NOEXCEPT_FALSE; + ~SbiIoSystem(); ErrCode GetError(); void Shutdown(); void SetPrompt(const OUString& r) { aPrompt = r; } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index d49890d52790..4b838ba1091a 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -611,7 +611,7 @@ SbiIoSystem::SbiIoSystem() nError = ERRCODE_NONE; } -SbiIoSystem::~SbiIoSystem() COVERITY_NOEXCEPT_FALSE +SbiIoSystem::~SbiIoSystem() { Shutdown(); } diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index 65d6680d745e..179963af1a4a 100644 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx @@ -110,7 +110,7 @@ java_lang_Object::java_lang_Object( JNIEnv * pXEnv, jobject myObj ) object = pXEnv->NewGlobalRef( myObj ); } -java_lang_Object::~java_lang_Object() COVERITY_NOEXCEPT_FALSE +java_lang_Object::~java_lang_Object() { if( object ) { diff --git a/connectivity/source/inc/java/GlobalRef.hxx b/connectivity/source/inc/java/GlobalRef.hxx index 1a97bfb33a45..04c691fb5872 100644 --- a/connectivity/source/inc/java/GlobalRef.hxx +++ b/connectivity/source/inc/java/GlobalRef.hxx @@ -52,7 +52,7 @@ namespace connectivity::jdbc return *this; } - ~GlobalRef() COVERITY_NOEXCEPT_FALSE + ~GlobalRef() { reset(); } diff --git a/connectivity/source/inc/java/lang/Object.hxx b/connectivity/source/inc/java/lang/Object.hxx index 63d7af3f5976..9ec6ee1752ba 100644 --- a/connectivity/source/inc/java/lang/Object.hxx +++ b/connectivity/source/inc/java/lang/Object.hxx @@ -77,7 +77,7 @@ namespace connectivity // The actual ctor java_lang_Object(); - virtual ~java_lang_Object() COVERITY_NOEXCEPT_FALSE; + virtual ~java_lang_Object(); void saveRef( JNIEnv * pEnv, jobject myObj ); jobject getJavaObject() const { return object; } diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 63955ac4862c..0babb4ed39ff 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -71,7 +71,7 @@ namespace svx m_rDev.Push( vcl::PushFlags::FONT ); m_rDev.SetFont( _rTemporaryFont ); } - ~FontSwitch() COVERITY_NOEXCEPT_FALSE + ~FontSwitch() { m_rDev.Pop(); } diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 005e4dfcdc86..2cf66e26d17f 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -165,7 +165,7 @@ TextLayouterDevice::TextLayouterDevice() mrDevice.setSubpixelPositioning(true); } -TextLayouterDevice::~TextLayouterDevice() COVERITY_NOEXCEPT_FALSE { releaseGlobalVirtualDevice(); } +TextLayouterDevice::~TextLayouterDevice() { releaseGlobalVirtualDevice(); } void TextLayouterDevice::setFont(const vcl::Font& rFont) { diff --git a/include/drawinglayer/primitive2d/textlayoutdevice.hxx b/include/drawinglayer/primitive2d/textlayoutdevice.hxx index 10dacdec3f5a..c4441c2428af 100644 --- a/include/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/include/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -82,7 +82,7 @@ class DRAWINGLAYER_DLLPUBLIC TextLayouterDevice public: /// constructor/destructor TextLayouterDevice(); - ~TextLayouterDevice() COVERITY_NOEXCEPT_FALSE; + ~TextLayouterDevice(); /// tooling methods void setFont(const vcl::Font& rFont);
