diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-19 15:43:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-19 22:17:40 +0100 |
commit | b1249cea2e99873605332de888d03f163cba0128 (patch) | |
tree | bdedca2e8d7d2f144b72ec9ebc77137375102c90 /sw/source/ui/fldui/fldvar.hxx | |
parent | 531a331ed2d5d8aa75002b271e8c90d108e55388 (diff) |
weld SwFieldVarPage
Change-Id: Ifd71cbb4c3ed3baa33136c5b86c042144faa5002
Reviewed-on: https://gerrit.libreoffice.org/69435
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/ui/fldui/fldvar.hxx')
-rw-r--r-- | sw/source/ui/fldui/fldvar.hxx | 70 |
1 files changed, 27 insertions, 43 deletions
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index b7afe73f0497..742ae530315d 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -32,41 +32,25 @@ class SwFieldVarPage; -class SelectionListBox : public ListBox -{ - bool bCallAddSelection; - - virtual bool PreNotify( NotifyEvent& rNEvt ) override; - -public: - SelectionListBox(vcl::Window* pParent, WinBits nStyle); - - // detect selection via Ctrl or Alt and evaluate with SelectHdl - bool IsCallAddSelection() const {return bCallAddSelection;} - void ResetCallAddSelection() {bCallAddSelection = false;} -}; - class SwFieldVarPage : public SwFieldPage { - friend class SelectionListBox; - - VclPtr<ListBox> m_pTypeLB; - VclPtr<VclContainer> m_pSelection; - VclPtr<SelectionListBox> m_pSelectionLB; - VclPtr<FixedText> m_pNameFT; - VclPtr<Edit> m_pNameED; - VclPtr<FixedText> m_pValueFT; - VclPtr<ConditionEdit> m_pValueED; - VclPtr<VclContainer> m_pFormat; - VclPtr<NumFormatListBox> m_pNumFormatLB; - VclPtr<ListBox> m_pFormatLB; - VclPtr<VclContainer> m_pChapterFrame; - VclPtr<ListBox> m_pChapterLevelLB; - VclPtr<CheckBox> m_pInvisibleCB; - VclPtr<FixedText> m_pSeparatorFT; - VclPtr<Edit> m_pSeparatorED; - VclPtr<PushButton> m_pNewPB; - VclPtr<PushButton> m_pDelPB; + std::unique_ptr<weld::TreeView> m_xTypeLB; + std::unique_ptr<weld::Widget> m_xSelection; + std::unique_ptr<weld::TreeView> m_xSelectionLB; + std::unique_ptr<weld::Label> m_xNameFT; + std::unique_ptr<weld::Entry> m_xNameED; + std::unique_ptr<weld::Label> m_xValueFT; + std::unique_ptr<SwConditionEdit> m_xValueED; + std::unique_ptr<weld::Widget> m_xFormat; + std::unique_ptr<SwNumFormatTreeView> m_xNumFormatLB; + std::unique_ptr<weld::TreeView> m_xFormatLB; + std::unique_ptr<weld::Widget> m_xChapterFrame; + std::unique_ptr<weld::TreeView> m_xChapterLevelLB; + std::unique_ptr<weld::CheckButton> m_xInvisibleCB; + std::unique_ptr<weld::Label> m_xSeparatorFT; + std::unique_ptr<weld::Entry> m_xSeparatorED; + std::unique_ptr<weld::Button> m_xNewPB; + std::unique_ptr<weld::Button> m_xDelPB; OUString sOldValueFT; OUString sOldNameFT; @@ -74,13 +58,14 @@ class SwFieldVarPage : public SwFieldPage sal_uInt32 nOldFormat; bool bInit; - DECL_LINK( TypeHdl, ListBox&, void ); - DECL_LINK( SubTypeListBoxHdl, ListBox&, void ); - DECL_LINK( ModifyHdl, Edit&, void ); - DECL_LINK( TBClickHdl, Button*, void ); - DECL_LINK( ChapterHdl, ListBox&, void ); - DECL_LINK( SeparatorHdl, Edit&, void ); - void SubTypeHdl(ListBox const *); + DECL_LINK( TypeHdl, weld::TreeView&, void ); + DECL_LINK( SubTypeListBoxHdl, weld::TreeView&, void ); + DECL_LINK( ModifyHdl, weld::Entry&, void ); + DECL_LINK( TBClickHdl, weld::Button&, void ); + DECL_LINK( ChapterHdl, weld::TreeView&, void ); + DECL_LINK( SeparatorHdl, weld::Entry&, void ); + DECL_LINK( SubTypeInsertHdl, weld::TreeView&, void ); + void SubTypeHdl(const weld::TreeView*); void UpdateSubType(); void FillFormatLB(sal_uInt16 nTypeId); @@ -89,10 +74,9 @@ protected: virtual sal_uInt16 GetGroup() override; public: - SwFieldVarPage(vcl::Window* pParent, const SfxItemSet* pSet); + SwFieldVarPage(TabPageParent pParent, const SfxItemSet* pSet); - virtual ~SwFieldVarPage() override; - virtual void dispose() override; + virtual ~SwFieldVarPage() override; static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rAttrSet); |