From 1f440348eb0892fd2c9597806d87b5fe9d60d49a Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Tue, 10 Oct 2023 21:55:42 +0200 Subject: tdf#157482 UI: Turn Security Warnings popup windows into infobars In case of all the 4 security warnings we will have a new infobar warning dialog message with an infobar button which can open the security windows option settings and we can set which security issues should warn us, and also which security infos we want to remove. (etc after saving) TODO: If the directly the file dialog window pop up the Infobar message will only update after closing the file dialog window. That should be fixed later. Change-Id: Idf0f728fd40089d3691f8f044d3718a4e0d99cad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157797 Tested-by: Jenkins Reviewed-by: Balazs Varga --- cui/source/factory/dlgfact.cxx | 6 ++++-- cui/source/factory/dlgfact.hxx | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'cui') diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 086fd01c5af3..63bfdbddbe39 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -854,16 +854,18 @@ VclPtr AbstractDialogFactory_Impl::CreateVclDialog(weld::Wind } VclPtr AbstractDialogFactory_Impl::CreateFrameDialog(weld::Window* pParent, const Reference< frame::XFrame >& rxFrame, - sal_uInt32 nResId, const OUString& rParameter ) + sal_uInt32 nResId, sal_uInt16 nPageId, const OUString& rParameter) { std::unique_ptr xDlg; if (SID_OPTIONS_TREEDIALOG == nResId || SID_OPTIONS_DATABASES == nResId) { // only activate last page if we don't want to activate a special page - bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.isEmpty() ); + bool bActivateLastSelection = ( nResId != SID_OPTIONS_DATABASES && rParameter.isEmpty() && !nPageId); xDlg = std::make_unique(pParent, rxFrame, bActivateLastSelection); if ( nResId == SID_OPTIONS_DATABASES ) xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS); + else if (nPageId) + xDlg->ActivatePage(nPageId); else if ( !rParameter.isEmpty() ) xDlg->ActivatePage( rParameter ); } diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 38ca4beded0a..b57fe2995718 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -439,8 +439,7 @@ public: const SfxItemSet& rAttr, const css::uno::Reference< css::frame::XFrame >& rFrame) override; virtual VclPtr CreateFrameDialog(weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame, - sal_uInt32 nResId, - const OUString& rParameter ) override; + sal_uInt32 nResId, sal_uInt16 nPageId, const OUString& rParameter) override; virtual VclPtr CreateAutoCorrTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet) override; virtual VclPtr CreateCustomizeTabDialog(weld::Window* pParent, const SfxItemSet* pAttrSet, -- cgit