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 144e72591a61127a6d1e0f1a6bc9867a61e9b135 Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Fri Aug 15 11:30:21 2025 +0200 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Tue Aug 19 19:47:14 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> diff --git a/cui/source/dialogs/whatsnewtabpage.cxx b/cui/source/dialogs/whatsnewtabpage.cxx index 3fc87ef9c7b9..156b295b821e 100644 --- a/cui/source/dialogs/whatsnewtabpage.cxx +++ b/cui/source/dialogs/whatsnewtabpage.cxx @@ -30,9 +30,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 db2cc37e2d2f..970cf4b16707 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -173,17 +173,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; @@ -208,10 +197,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 e98d529b2759..25b2057c2cb5 100644 --- a/cui/source/options/appearance.hxx +++ b/cui/source/options/appearance.hxx @@ -86,8 +86,6 @@ private: void FillItemsList(); ColorConfigEntry GetActiveEntry(); - virtual void ActivatePage(const SfxItemSet&) override; - public: SvxAppearanceTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);