cui/source/dialogs/whatsnewtabpage.cxx | 4 +--- cui/source/inc/whatsnewtabpage.hxx | 1 - cui/source/options/appearance.cxx | 21 ++++++++------------- cui/source/options/appearance.hxx | 2 -- 4 files changed, 9 insertions(+), 19 deletions(-)
New commits: commit 6fb8f20900139856cbe06aeaa8985efb761aeb40 Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Fri Aug 15 11:30:21 2025 +0200 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Aug 20 15:37:35 2025 +0200 Resolves tdf#167952 - Null-pointer-use in Welcome dialog Change-Id: Ibc33b0e8cb93888a373ee0f27735ba276ee27960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189668 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> (cherry picked from commit 144e72591a61127a6d1e0f1a6bc9867a61e9b135) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189952 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/cui/source/dialogs/whatsnewtabpage.cxx b/cui/source/dialogs/whatsnewtabpage.cxx index f8eec976948a..f5a35acd0670 100644 --- a/cui/source/dialogs/whatsnewtabpage.cxx +++ b/cui/source/dialogs/whatsnewtabpage.cxx @@ -34,9 +34,7 @@ std::unique_ptr<SfxTabPage> WhatsNewTabPage::Create(weld::Container* pPage, return std::make_unique<WhatsNewTabPage>(pPage, pController, *rAttr); } -void WhatsNewTabPage::Reset(const SfxItemSet* rSet) { ActivatePage(*rSet); } - -void WhatsNewTabPage::ActivatePage(const SfxItemSet& /* rSet */) +void WhatsNewTabPage::Reset(const SfxItemSet* /* rSet */) { const Size aGraphicSize = m_aBrand.GetGraphicSize(); m_pBrand->set_size_request(aGraphicSize.getWidth(), aGraphicSize.getHeight()); diff --git a/cui/source/inc/whatsnewtabpage.hxx b/cui/source/inc/whatsnewtabpage.hxx index acb49d80ffc3..af17e7c1fb32 100644 --- a/cui/source/inc/whatsnewtabpage.hxx +++ b/cui/source/inc/whatsnewtabpage.hxx @@ -33,7 +33,6 @@ private: BrandGraphic m_aBrand; std::unique_ptr<weld::CustomWeld> m_pBrand; - virtual void ActivatePage(const SfxItemSet&) override; virtual void Reset(const SfxItemSet* rSet) override; public: diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx index 14ee0f37ec46..21312ae75ccf 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -175,17 +175,6 @@ std::unique_ptr<SfxTabPage> SvxAppearanceTabPage::Create(weld::Container* pPage, return std::make_unique<SvxAppearanceTabPage>(pPage, pController, *rSet); } -void SvxAppearanceTabPage::ActivatePage(const SfxItemSet& /* rSet */) -{ - auto& aProperties = getAdditionalProperties(); - auto aIterator = aProperties.find(u"HideAdvancedControls"_ustr); - if (aIterator != aProperties.end()) - { - m_xSizeGrid->set_visible(false); - m_xCustomizationFrame->set_visible(false); - } -} - OUString SvxAppearanceTabPage::GetAllStrings() { OUString sAllStrings; @@ -210,10 +199,16 @@ bool SvxAppearanceTabPage::FillItemSet(SfxItemSet* /* rSet */) return true; } -void SvxAppearanceTabPage::Reset(const SfxItemSet* rSet) +void SvxAppearanceTabPage::Reset(const SfxItemSet* /* rSet */) { // hide advanced controls - ActivatePage(*rSet); + auto& aProperties = getAdditionalProperties(); + auto aIterator = aProperties.find(u"HideAdvancedControls"_ustr); + if (aIterator != aProperties.end()) + { + m_xSizeGrid->set_visible(false); + m_xCustomizationFrame->set_visible(false); + } // reset scheme list LoadSchemeList(); diff --git a/cui/source/options/appearance.hxx b/cui/source/options/appearance.hxx index 4ab868e00c84..f327ceaee609 100644 --- a/cui/source/options/appearance.hxx +++ b/cui/source/options/appearance.hxx @@ -87,8 +87,6 @@ private: void FillItemsList(); ColorConfigEntry GetActiveEntry(); - virtual void ActivatePage(const SfxItemSet&) override; - public: SvxAppearanceTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);