sc/inc/colorscale.hxx | 2 ++ sc/source/core/data/colorscale.cxx | 7 ++++++- sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx | 1 + sd/source/ui/slidesorter/view/SlsToolTip.cxx | 7 ++++++- sfx2/source/view/viewfrm.cxx | 6 +++++- sw/source/ui/dbui/mmaddressblockpage.cxx | 7 ++++++- sw/source/ui/dbui/mmaddressblockpage.hxx | 1 + vcl/inc/printdlg.hxx | 1 + vcl/inc/unx/gtk/gtkdata.hxx | 2 ++ vcl/source/window/printdlg.cxx | 7 ++++++- vcl/unx/gtk3/gtkdata.cxx | 7 ++++++- 11 files changed, 42 insertions(+), 6 deletions(-)
New commits: commit 6bd1d2d241ecc5c4a8d340c9847e2e366752c9d7 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Oct 14 08:24:50 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Oct 14 12:00:45 2025 +0200 cid#1399090 Uncaught exception and cid#1399099 Uncaught exception cid#1399421 Uncaught exception cid#1429470 Uncaught exception cid#1659907 Uncaught exception cid#1659910 Uncaught exception cid#1660301 Uncaught exception Change-Id: I7c33f9678adc8077d30ea292651aa920d3229486 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192368 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index 0d1810b9a854..20a3d623f428 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -52,6 +52,8 @@ private: void setListener(); + void ImplDestroy(); + public: SC_DLLPUBLIC ScColorScaleEntry(double nVal, const Color& rCol, ScColorScaleEntryType eType = COLORSCALE_VALUE, diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 885de73e4fdf..15b424591d03 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -203,12 +203,17 @@ ScColorScaleEntry::ScColorScaleEntry(ScDocument& rDoc, const ScColorScaleEntry& } } -ScColorScaleEntry::~ScColorScaleEntry() COVERITY_NOEXCEPT_FALSE +void ScColorScaleEntry::ImplDestroy() { if(mpCell) mpCell->EndListeningTo(mpCell->GetDocument()); } +ScColorScaleEntry::~ScColorScaleEntry() COVERITY_NOEXCEPT_FALSE +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + void ScColorScaleEntry::SetFormula( const OUString& rFormula, ScDocument& rDoc, const ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar ) { mpCell.reset(new ScFormulaCell( rDoc, rAddr, rFormula, eGrammar )); diff --git a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx index 6c3557e6477e..694a15bb413b 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx @@ -66,6 +66,7 @@ private: Timer maHiddenTimer; void DoShow(); + void ImplDestroy(); DECL_LINK(DelayTrigger, Timer*, void); }; diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index 24cf35d35ce4..1d109693324e 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -44,13 +44,18 @@ ToolTip::ToolTip (SlideSorter& rSlideSorter) maHiddenTimer.SetTimeout(HelpSettings::GetTipDelay()); } -ToolTip::~ToolTip() +void ToolTip::ImplDestroy() { maShowTimer.Stop(); maHiddenTimer.Stop(); Hide(); } +ToolTip::~ToolTip() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + void ToolTip::SetPage (const model::SharedPageDescriptor& rpDescriptor) { if (mpDescriptor == rpDescriptor) diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index b8c7841cc1b8..53bb7c4a124f 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -307,7 +307,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) ReadOnlyUIGuard(SfxViewFrame* pFrame, SfxObjectShell* p_Sh) : m_pFrame(pFrame), m_pSh(p_Sh), m_bSetRO(p_Sh->IsReadOnlyUI()) {} - ~ReadOnlyUIGuard() COVERITY_NOEXCEPT_FALSE + void ImplDestroy() { if (m_bSetRO != m_pSh->IsReadOnlyUI()) { @@ -325,6 +325,10 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) } } } + ~ReadOnlyUIGuard() + { + suppress_fun_call_w_exception(ImplDestroy()); + } } aReadOnlyUIGuard(this, pSh); SfxMedium* pMed = pSh->GetMedium(); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 8c88e5eb9d28..609279dafcf2 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -553,11 +553,16 @@ void SwCustomizeAddressBlockDialog::UpdateFields() m_xDragED->UpdateFields(); } -SwCustomizeAddressBlockDialog::~SwCustomizeAddressBlockDialog() +void SwCustomizeAddressBlockDialog::ImplDestroy() { m_xDragED->EndDropTarget(); } +SwCustomizeAddressBlockDialog::~SwCustomizeAddressBlockDialog() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, OKHdl_Impl, weld::Button&, void) { m_xDialog->response(RET_OK); diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 928c357ccc6c..58183e8a4998 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -225,6 +225,7 @@ private: sal_Int32 GetSelectedItem_Impl() const; void UpdateImageButtons_Impl(); + void ImplDestroy(); public: SwCustomizeAddressBlockDialog(weld::Widget* pParent, SwMailMergeConfigItem& rConfig, DialogType); diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index d6e0c17b4417..b2c067c99cc0 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -218,6 +218,7 @@ namespace vcl css::beans::PropertyValue* getValueForWindow(weld::Widget*) const; + void ImplDestroy(); void preparePreview( bool i_bMayUseCache ); void setupPaperSidesBox(); void storeToSettings(); diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index 98134aa20f13..518ec6443079 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -206,6 +206,8 @@ int getButtonPriority(std::u16string_view rType); class GtkSalTimer final : public SalTimer { struct SalGtkTimeoutSource *m_pTimeout; + + void ImplDestroy(); public: GtkSalTimer(); virtual ~GtkSalTimer() override; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 93867807b1c1..e854ea18b894 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -714,7 +714,7 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterControl m_xDialog->set_centered_on_parent(true); } -PrintDialog::~PrintDialog() +void PrintDialog::ImplDestroy() { std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::Print::Dialog::RangeSectionExpanded::set(mxRangeExpander->get_expanded(), batch); @@ -722,6 +722,11 @@ PrintDialog::~PrintDialog() batch->commit(); } +PrintDialog::~PrintDialog() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + void PrintDialog::setupPaperSidesBox() { DuplexMode eDuplex = maPController->getPrinter()->GetDuplexMode(); diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx index a135b7be8a99..0d6561b6ff32 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -775,12 +775,17 @@ GtkSalTimer::GtkSalTimer() { } -GtkSalTimer::~GtkSalTimer() +void GtkSalTimer::ImplDestroy() { GetGtkInstance()->RemoveTimer(); Stop(); } +GtkSalTimer::~GtkSalTimer() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + bool GtkSalTimer::Expired() { if( !m_pTimeout || g_source_is_destroyed( &m_pTimeout->aParent ) )
