diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-23 19:51:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-25 13:36:53 +0200 |
commit | 1942182a3d1817bc539229d7fda3af69f7e295b8 (patch) | |
tree | 1c7291efb486d4789c580671ef0ea2133251c92c /cui/source/inc/iconcdlg.hxx | |
parent | 2f00a7c61fff9c091f08b6aaa4f829cd34fb3745 (diff) |
weld HyperLink Dialog
Change-Id: Ic861b0a593505828a900fe2163125d6f5584a956
Reviewed-on: https://gerrit.libreoffice.org/74634
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/inc/iconcdlg.hxx')
-rw-r--r-- | cui/source/inc/iconcdlg.hxx | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index c403bb1358e2..a5db9706917e 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -39,27 +39,29 @@ class SfxItemSet; enum class HyperLinkPageType; // Create-Function -typedef VclPtr<IconChoicePage> (*CreatePage)(vcl::Window *pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pAttrSet); +typedef std::unique_ptr<IconChoicePage> (*CreatePage)(weld::Container* pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pAttrSet); /// Data-structure for pages in dialog struct IconChoicePageData { - HyperLinkPageType nId; - CreatePage fnCreatePage; ///< pointer to the factory - VclPtr<IconChoicePage> pPage; ///< the TabPage itself + OString sId; + std::unique_ptr<IconChoicePage> xPage; ///< the TabPage itself bool bRefresh; ///< Flag: page has to be newly initialized // constructor - IconChoicePageData( HyperLinkPageType Id, CreatePage fnPage ) - : nId ( Id ), - fnCreatePage ( fnPage ), - pPage ( nullptr ), - bRefresh ( false ) + IconChoicePageData(const OString& rId, std::unique_ptr<IconChoicePage> xInPage) + : sId(rId) + , xPage(std::move(xInPage)) + , bRefresh(false) {} }; -class IconChoicePage : public TabPage +class IconChoicePage { +protected: + std::unique_ptr<weld::Builder> xBuilder; + std::unique_ptr<weld::Container> xContainer; + private: const SfxItemSet* pSet; bool bHasExchangeSupport; @@ -67,13 +69,13 @@ private: void ImplInitSettings(); protected: - using TabPage::ActivatePage; - using TabPage::DeactivatePage; - IconChoicePage( vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet* pItemSet ); + IconChoicePage(weld::Container* pParent, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet* pItemSet); public: - virtual ~IconChoicePage() override; + virtual ~IconChoicePage(); + + OString GetHelpId() const { return xContainer->get_help_id(); } const SfxItemSet& GetItemSet() const { return *pSet; } @@ -86,9 +88,6 @@ public: virtual void ActivatePage( const SfxItemSet& ); virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ); virtual bool QueryClose(); - - void StateChanged( StateChangedType nType ) override; - void DataChanged( const DataChangedEvent& rDCEvt ) override; }; #endif // INCLUDED_CUI_SOURCE_INC_ICONCDLG_HXX |