diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-20 20:29:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-26 09:54:18 +0200 |
commit | a37e559ed123789f6bc8f7972242d6461ce692ab (patch) | |
tree | 7c6304b4541335b2bb706efda58b882132fe3819 /starmath | |
parent | b3f249c1351642be6f2774230ff80a6d20bd1401 (diff) |
disinherit OWizardPage and SfxTabPage from vcl TabPage
Now that there's no need to support weld/unwelded mixes of
pages in dialog any more.
inherit from a BuilderPage which contains a Builder and
Toplevel container
BuilderPage Activate and Deactivate replace TabPage ActivatePage and
DeactivatePage, allowing disambiguation wrt SfxTabPage ActivatePage and
DeactivatePage.
Change-Id: I5706e50fd92f712a25328ee9791e054bb9ad9812
Reviewed-on: https://gerrit.libreoffice.org/79317
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/dialog.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/smmod.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/view.hxx | 4 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 4 | ||||
-rw-r--r-- | starmath/source/smmod.cxx | 9 | ||||
-rw-r--r-- | starmath/source/view.cxx | 2 |
6 files changed, 11 insertions, 12 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 713ecb5ae8e5..0c6c6a91f271 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -57,7 +57,7 @@ class SmPrintOptionsTabPage : public SfxTabPage virtual void Reset(const SfxItemSet* rSet) override; public: - static VclPtr<SfxTabPage> Create(TabPageParent pWindow, const SfxItemSet &rSet); + static std::unique_ptr<SfxTabPage> Create(TabPageParent pWindow, const SfxItemSet &rSet); SmPrintOptionsTabPage(TabPageParent pPage, const SfxItemSet &rOptions); virtual ~SmPrintOptionsTabPage() override; diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index 8c33f5a76baf..8e3759e575ea 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -97,7 +97,7 @@ public: //virtual methods for options dialog virtual std::unique_ptr<SfxItemSet> CreateItemSet( sal_uInt16 nId ) override; virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) override; - virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet ) override; + virtual std::unique_ptr<SfxTabPage> CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet ) override; }; #define SM_MOD() ( static_cast<SmModule*>(SfxApplication::GetModule(SfxToolsModule::Math)) ) diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index fb27546c456f..62068e586824 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -249,8 +249,8 @@ protected: void InsertFrom(SfxMedium &rMedium); virtual bool HasPrintOptionsPage() const override; - virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, - const SfxItemSet &rOptions) override; + virtual std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(TabPageParent pParent, + const SfxItemSet &rOptions) override; virtual void Deactivate(bool IsMDIActivate) override; virtual void Activate(bool IsMDIActivate) override; virtual void InnerResizePixel(const Point &rOfs, const Size &rSize, bool inplaceEditModeChange) override; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 5e236f6460d3..6be0c38d0c59 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -224,9 +224,9 @@ void SmPrintOptionsTabPage::Reset(const SfxItemSet* rSet) m_xAutoCloseBrackets->set_active(static_cast<const SfxBoolItem &>(rSet->Get(GetWhich(SID_AUTO_CLOSE_BRACKETS))).GetValue()); } -VclPtr<SfxTabPage> SmPrintOptionsTabPage::Create(TabPageParent pParent, const SfxItemSet& rSet) +std::unique_ptr<SfxTabPage> SmPrintOptionsTabPage::Create(TabPageParent pParent, const SfxItemSet& rSet) { - return VclPtr<SmPrintOptionsTabPage>::Create(pParent, rSet).get(); + return std::make_unique<SmPrintOptionsTabPage>(pParent, rSet); } void SmShowFont::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 93a0ca2053de..6429e4abdb6c 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -224,13 +224,12 @@ void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) } } -VclPtr<SfxTabPage> SmModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet ) +std::unique_ptr<SfxTabPage> SmModule::CreateTabPage( sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet ) { - VclPtr<SfxTabPage> pRet; + std::unique_ptr<SfxTabPage> xRet; if (nId == SID_SM_TP_PRINTOPTIONS) - pRet = SmPrintOptionsTabPage::Create(pParent, rSet); - return pRet; - + xRet = SmPrintOptionsTabPage::Create(pParent, rSet); + return xRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 68a4368d1e04..b0a020fdc448 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1266,7 +1266,7 @@ bool SmViewShell::HasPrintOptionsPage() const return true; } -VclPtr<SfxTabPage> SmViewShell::CreatePrintOptionsPage(TabPageParent pParent, +std::unique_ptr<SfxTabPage> SmViewShell::CreatePrintOptionsPage(TabPageParent pParent, const SfxItemSet &rOptions) { return SmPrintOptionsTabPage::Create(pParent, rOptions); |