From ec548bce309d965a25e807ae79432114926e06f3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 15 Oct 2018 11:14:02 +0100 Subject: weld ChartTypeDialog and SchLayoutTabPage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I101c56b855d0bdc43559ca4561d298fa4ad92572 Reviewed-on: https://gerrit.libreoffice.org/61797 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- include/sfx2/tabdlg.hxx | 25 ------------------------- include/svtools/valueset.hxx | 2 ++ include/svtools/wizardmachine.hxx | 6 ++++++ include/vcl/tabpage.hxx | 25 +++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 25 deletions(-) (limited to 'include') diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 3c5b26ef7144..79748b30afe9 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -41,31 +41,6 @@ class SfxViewFrame; class SfxTabPage; class SfxBindings; -struct TabPageParent -{ - TabPageParent(vcl::Window* _pParent) - : pParent(_pParent) - , pPage(nullptr) - , pController(nullptr) - { - } - TabPageParent(weld::Container* _pPage, weld::DialogController* _pController) - : pParent(nullptr) - , pPage(_pPage) - , pController(_pController) - { - } - weld::Window* GetFrameWeld() const - { - if (pController) - return pController->getDialog(); - return pParent->GetFrameWeld(); - } - VclPtr pParent; - weld::Container* const pPage; - weld::DialogController* pController; -}; - typedef VclPtr (*CreateTabPage)(TabPageParent pParent, const SfxItemSet *rAttrSet); typedef const sal_uInt16* (*GetTabPageRanges)(); // provides international Which-value struct TabPageImpl; diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index fef9fd2f4d71..a67518f5c6e0 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -502,6 +502,8 @@ public: void SetOptimalSize(); + /// Insert @rImage item. + void InsertItem(sal_uInt16 nItemId, const Image& rImage); /// Insert @rImage item with @rStr as a tooltip void InsertItem(sal_uInt16 nItemId, const Image& rImage, const OUString& rStr, size_t nPos = VALUESET_APPEND); diff --git a/include/svtools/wizardmachine.hxx b/include/svtools/wizardmachine.hxx index 68ad14a134bf..748afebbb712 100644 --- a/include/svtools/wizardmachine.hxx +++ b/include/svtools/wizardmachine.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include class Bitmap; @@ -104,6 +105,8 @@ namespace svt must be the OWizardMachine (which is derived from Window) */ OWizardPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription); + OWizardPage(TabPageParent pParent, const OUString& rUIXMLDescription, const OString& rID); + virtual void dispose() override; virtual ~OWizardPage() override; // IWizardPageController overridables @@ -112,6 +115,9 @@ namespace svt virtual bool canAdvance() const override; protected: + std::unique_ptr m_xBuilder; + std::unique_ptr m_xContainer; + // TabPage overridables virtual void ActivatePage() override; diff --git a/include/vcl/tabpage.hxx b/include/vcl/tabpage.hxx index 3845da4fffed..bd8475d81591 100644 --- a/include/vcl/tabpage.hxx +++ b/include/vcl/tabpage.hxx @@ -23,9 +23,34 @@ #include #include #include +#include #include #include +struct TabPageParent +{ + TabPageParent(vcl::Window* _pParent) + : pParent(_pParent) + , pPage(nullptr) + , pController(nullptr) + { + } + TabPageParent(weld::Container* _pPage, weld::DialogController* _pController) + : pParent(nullptr) + , pPage(_pPage) + , pController(_pController) + { + } + weld::Window* GetFrameWeld() const + { + if (pController) + return pController->getDialog(); + return pParent->GetFrameWeld(); + } + VclPtr pParent; + weld::Container* const pPage; + weld::DialogController* pController; +}; class VCL_DLLPUBLIC TabPage : public vcl::Window -- cgit