diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-23 20:01:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-24 09:59:03 +0200 |
commit | 66839a21da8d552f2a66fe0b323f9cee7b05de80 (patch) | |
tree | 04b06ba60991fc34f438f86b7645f0c61afe73e2 /cui/source/inc/iconcdlg.hxx | |
parent | a53768abccfa81d4dfb15629e02ea61072bfc905 (diff) |
merge IconChoiceDialog and SvxHpLinkDlg
Change-Id: I8ba8f2b589db8842da63a4ce6824d4f049081108
Reviewed-on: https://gerrit.libreoffice.org/74610
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 | 85 |
1 files changed, 2 insertions, 83 deletions
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index 7f13cbfe40e1..7d5693ce6719 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -32,14 +32,14 @@ // forward-declarations struct IconChoicePageData; -class IconChoiceDialog; +class SvxHpLinkDlg; class IconChoicePage; class SfxItemPool; class SfxItemSet; enum class HyperLinkPageType; // Create-Function -typedef VclPtr<IconChoicePage> (*CreatePage)(vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet* pAttrSet); +typedef VclPtr<IconChoicePage> (*CreatePage)(vcl::Window *pParent, SvxHpLinkDlg* pDlg, const SfxItemSet* pAttrSet); /// Data-structure for pages in dialog struct IconChoicePageData @@ -91,87 +91,6 @@ public: void DataChanged( const DataChangedEvent& rDCEvt ) override; }; -class IconChoiceDialog : public SfxModalDialog -{ -private: - friend class IconChoicePage; - - std::vector< std::unique_ptr<IconChoicePageData> > maPageList; - - VclPtr<SvtIconChoiceCtrl> m_pIconCtrl; - - HyperLinkPageType mnCurrentPageId; - - // Buttons - VclPtr<OKButton> m_pOKBtn; - VclPtr<PushButton> m_pApplyBtn; - VclPtr<CancelButton> m_pCancelBtn; - VclPtr<HelpButton> m_pHelpBtn; - VclPtr<PushButton> m_pResetBtn; - - VclPtr<VclVBox> m_pTabContainer; - const SfxItemSet* pSet; - std::unique_ptr<SfxItemSet> pOutSet; - SfxItemSet* pExampleSet; - std::unique_ptr<sal_uInt16[]> pRanges; - - DECL_LINK( ChosePageHdl_Impl, SvtIconChoiceCtrl*, void ); - DECL_LINK( OkHdl, Button*, void ); - DECL_LINK( ApplyHdl, Button*, void) ; - DECL_LINK( ResetHdl, Button*, void) ; - DECL_LINK( CancelHdl, Button*, void ); - - IconChoicePageData* GetPageData ( HyperLinkPageType nId ); - void Start_Impl(); - bool OK_Impl(); - - void FocusOnIcon ( HyperLinkPageType nId ); - -protected: - static void ShowPageImpl ( IconChoicePageData const * pData ); - static void HidePageImpl ( IconChoicePageData const * pData ); - - virtual void PageCreated( HyperLinkPageType nId, IconChoicePage& rPage ); - IconChoicePage* GetTabPage( HyperLinkPageType nPageId ) - { return ( GetPageData (nPageId)->pPage ? GetPageData (nPageId)->pPage.get() : nullptr); } - - void ActivatePageImpl (); - void DeActivatePageImpl (); - void ResetPageImpl (); - - void Ok(); - -public: - - // the IconChoiceCtrl's could also be set in the Ctor - IconChoiceDialog ( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription ); - virtual ~IconChoiceDialog () override; - virtual void dispose() override; - - // interface - SvxIconChoiceCtrlEntry* AddTabPage( - HyperLinkPageType nId, const OUString& rIconText, const Image& rChoiceIcon, - CreatePage pCreateFunc /* != NULL */ ); - - void SetCurPageId( HyperLinkPageType nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); } - HyperLinkPageType GetCurPageId() const { return mnCurrentPageId; } - void ShowPage( HyperLinkPageType nId ); - - /// gives via map converted local slots if applicable - const sal_uInt16* GetInputRanges( const SfxItemPool& ); - void SetInputSet( const SfxItemSet* pInSet ); - - OKButton& GetOKButton() { return *m_pOKBtn; } - PushButton& GetApplyButton() { return *m_pApplyBtn; } - CancelButton& GetCancelButton() { return *m_pCancelBtn; } - - short Execute() override; - void Start(); - bool QueryClose(); - - void SetCtrlStyle(); -}; - #endif // INCLUDED_CUI_SOURCE_INC_ICONCDLG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |