From 60f3e4b843da89678e022eed837ee66e726b1920 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 20 Apr 2018 11:06:07 +0100 Subject: place an intermediate class as parent for SfxTabPages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit so a SfxTabPage can be parented by a vcl::Window or a welded native notebook tabpage. That ways the same SfxTabPage can be used at the same time in both a native dialog or a vcl dialog. The impl can be changed to the weld api, and when hosted in a native dialog the vcl impl of that will be instantiated, while native otherwise. e.g. print options appearing in print options dialog and general options. This allows incremental changeover. Change-Id: I6f1fed1e8d0898b01853bb878757bad41cbf9bba Reviewed-on: https://gerrit.libreoffice.org/53193 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/ui/envelp/envfmt.cxx | 4 ++-- sw/source/ui/envelp/envfmt.hxx | 2 +- sw/source/ui/envelp/envlop1.cxx | 4 ++-- sw/source/ui/envelp/envprt.cxx | 4 ++-- sw/source/ui/envelp/envprt.hxx | 2 +- sw/source/ui/envelp/label1.cxx | 16 ++++++++-------- sw/source/ui/envelp/labfmt.cxx | 4 ++-- sw/source/ui/envelp/labfmt.hxx | 2 +- sw/source/ui/envelp/labprt.cxx | 4 ++-- sw/source/ui/envelp/labprt.hxx | 2 +- sw/source/ui/envelp/swuilabimp.hxx | 8 ++++---- 11 files changed, 26 insertions(+), 26 deletions(-) (limited to 'sw/source/ui/envelp') diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 56c2ddb67984..c8b5cfc9e3f6 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -458,9 +458,9 @@ void SwEnvFormatPage::SetMinMax() m_pSizeHeightField->Reformat(); } -VclPtr SwEnvFormatPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwEnvFormatPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create(pParent, *rSet); + return VclPtr::Create(pParent.pParent, *rSet); } void SwEnvFormatPage::ActivatePage(const SfxItemSet& rSet) diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx index 294b2ac2eb1a..1d3593e2e91a 100644 --- a/sw/source/ui/envelp/envfmt.hxx +++ b/sw/source/ui/envelp/envfmt.hxx @@ -61,7 +61,7 @@ public: virtual ~SwEnvFormatPage() override; virtual void dispose() override; - static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rSet); + static VclPtr Create(TabPageParent pParent, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index f6edd2de9317..002518c47d27 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -314,9 +314,9 @@ void SwEnvPage::InitDatabaseBox() } } -VclPtr SwEnvPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwEnvPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create(pParent, *rSet); + return VclPtr::Create(pParent.pParent, *rSet); } void SwEnvPage::ActivatePage(const SfxItemSet& rSet) diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx index 5568e9194f55..0e52ab4a7f98 100644 --- a/sw/source/ui/envelp/envprt.cxx +++ b/sw/source/ui/envelp/envprt.cxx @@ -141,9 +141,9 @@ IMPL_LINK_NOARG(SwEnvPrtPage, AlignHdl, ToolBox *, void) } } -VclPtr SwEnvPrtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwEnvPrtPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create(pParent, *rSet); + return VclPtr::Create(pParent.pParent, *rSet); } void SwEnvPrtPage::ActivatePage(const SfxItemSet&) diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx index 91ce62b4a9da..8d70bb97c89b 100644 --- a/sw/source/ui/envelp/envprt.hxx +++ b/sw/source/ui/envelp/envprt.hxx @@ -61,7 +61,7 @@ public: virtual ~SwEnvPrtPage() override; virtual void dispose() override; - static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rSet); + static VclPtr Create(TabPageParent pParent, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 3f8daf71e599..a6a6f93cc0c8 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -486,9 +486,9 @@ void SwLabPage::InitDatabaseBox() } } -VclPtr SwLabPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwLabPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create(pParent, *rSet); + return VclPtr::Create(pParent.pParent, *rSet); } void SwLabPage::ActivatePage(const SfxItemSet& rSet) @@ -631,9 +631,9 @@ void SwVisitingCardPage::dispose() SfxTabPage::dispose(); } -VclPtr SwVisitingCardPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwVisitingCardPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create(pParent, *rSet); + return VclPtr::Create(pParent.pParent, *rSet); } void SwVisitingCardPage::ActivatePage(const SfxItemSet& rSet) @@ -793,9 +793,9 @@ void SwPrivateDataPage::dispose() SfxTabPage::dispose(); } -VclPtr SwPrivateDataPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwPrivateDataPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create(pParent, *rSet); + return VclPtr::Create(pParent.pParent, *rSet); } void SwPrivateDataPage::ActivatePage(const SfxItemSet& rSet) @@ -906,9 +906,9 @@ void SwBusinessDataPage::dispose() } -VclPtr SwBusinessDataPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwBusinessDataPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create(pParent, *rSet); + return VclPtr::Create(pParent.pParent, *rSet); } void SwBusinessDataPage::ActivatePage(const SfxItemSet& rSet) diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 90672ac0fd10..97f43d9c0447 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -479,9 +479,9 @@ void SwLabFormatPage::ChangeMinMax() m_pPHeightField->Reformat(); } -VclPtr SwLabFormatPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwLabFormatPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create(pParent, *rSet); + return VclPtr::Create(pParent.pParent, *rSet); } void SwLabFormatPage::ActivatePage(const SfxItemSet& rSet) diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index 08007cf05818..ddbb559cbd8b 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -99,7 +99,7 @@ public: virtual ~SwLabFormatPage() override; virtual void dispose() override; - static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rSet); + static VclPtr Create(TabPageParent pParent, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index 4bc9f9d88a03..c876f2e2eece 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -106,9 +106,9 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton, void ) } } -VclPtr SwLabPrtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) +VclPtr SwLabPrtPage::Create(TabPageParent pParent, const SfxItemSet* rSet) { - return VclPtr::Create( pParent, *rSet ); + return VclPtr::Create( pParent.pParent, *rSet ); } void SwLabPrtPage::ActivatePage( const SfxItemSet& rSet ) diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index 08d6583a7ad0..e36ab980e1f4 100644 --- a/sw/source/ui/envelp/labprt.hxx +++ b/sw/source/ui/envelp/labprt.hxx @@ -55,7 +55,7 @@ public: virtual ~SwLabPrtPage() override; virtual void dispose() override; - static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rSet); + static VclPtr Create(TabPageParent pParent, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index 23819efb8211..09e4dcc96b12 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -64,7 +64,7 @@ public: virtual ~SwLabPage() override; virtual void dispose() override; - static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rSet); + static VclPtr Create(TabPageParent pParent, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; @@ -116,7 +116,7 @@ class SwVisitingCardPage : public SfxTabPage public: SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& rSet); - static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rSet); + static VclPtr Create(TabPageParent pParent, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; @@ -155,7 +155,7 @@ public: virtual ~SwPrivateDataPage() override; virtual void dispose() override; - static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rSet); + static VclPtr Create(TabPageParent pParent, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; @@ -192,7 +192,7 @@ public: virtual ~SwBusinessDataPage() override; virtual void dispose() override; - static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rSet); + static VclPtr Create(TabPageParent pParent, const SfxItemSet* rSet); virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; -- cgit