sw/source/ui/misc/insfnote.cxx | 7 ++++++- sw/source/ui/misc/swmodalredlineacceptdlg.cxx | 8 +++++++- sw/source/uibase/inc/insfnote.hxx | 4 +++- sw/source/uibase/inc/swmodalredlineacceptdlg.hxx | 2 ++ 4 files changed, 18 insertions(+), 3 deletions(-)
New commits: commit d979137209a9579385bc26781007180608d903f9 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Dec 23 20:31:10 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Dec 24 13:17:10 2024 +0100 cid#1401342 Uncaught exception Change-Id: I58c442ee3f85b0378c5eb772bcccbab0d0d7f38d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179264 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 07e6bc8bf823..8e51c4c232b3 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -183,7 +183,7 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(weld::Window *pParent, SwWrtShell &rShell, bo } } -SwInsFootNoteDlg::~SwInsFootNoteDlg() COVERITY_NOEXCEPT_FALSE +void SwInsFootNoteDlg::ImplDestroy() { SwViewShell::SetCareDialog(nullptr); @@ -191,6 +191,11 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg() COVERITY_NOEXCEPT_FALSE m_rSh.ResetSelect(nullptr, false); } +SwInsFootNoteDlg::~SwInsFootNoteDlg() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + void SwInsFootNoteDlg::Init() { SwFormatFootnote aFootnoteNote; diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx index 8a103a4b9702..b0abc98b6808 100644 --- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx +++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <o3tl/deleter.hxx> #include <svx/ctredlin.hxx> #include <unotools/viewoptions.hxx> @@ -43,7 +44,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(weld::Window *pParent) m_xImplDlg->Activate(); // for data's initialisation } -SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg() +void SwModalRedlineAcceptDlg::ImplDestroy() { AcceptAll(false); // refuse everything remaining @@ -55,6 +56,11 @@ SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg() m_xDialog->set_modal(false); } +SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + void SwModalRedlineAcceptDlg::Activate() { } diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx index 7e9bb2649029..291ad7c14018 100644 --- a/sw/source/uibase/inc/insfnote.hxx +++ b/sw/source/uibase/inc/insfnote.hxx @@ -56,9 +56,11 @@ class SwInsFootNoteDlg final : public weld::GenericDialogController void Init(); + void ImplDestroy(); + public: SwInsFootNoteDlg(weld::Window * pParent, SwWrtShell &rSh, bool bEd); - virtual ~SwInsFootNoteDlg() COVERITY_NOEXCEPT_FALSE override; + virtual ~SwInsFootNoteDlg() override; const OUString& GetFontName() const { return m_aFontName; } bool IsEndNote() const { return m_xEndNoteBtn->get_active(); } diff --git a/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx b/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx index 00d4e1e028f1..9ba1fb6c8e54 100644 --- a/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx +++ b/sw/source/uibase/inc/swmodalredlineacceptdlg.hxx @@ -27,6 +27,8 @@ class SwModalRedlineAcceptDlg final : public SfxDialogController std::unique_ptr<weld::Container> m_xContentArea; std::unique_ptr<SwRedlineAcceptDlg> m_xImplDlg; + void ImplDestroy(); + public: SwModalRedlineAcceptDlg(weld::Window *pParent); virtual ~SwModalRedlineAcceptDlg() override;