diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-11 21:18:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-12 11:46:59 +0200 |
commit | d86549db56b25c2b201285cb67521cccc11b8bae (patch) | |
tree | 6e98aafc395af17dd7f2403601ce4e601302ef4e /sw/source/uibase | |
parent | a69de8695755f4ae4d12358acb40c7cffcf1b84e (diff) |
weld SwTableColumnPage
Change-Id: I2e92de5899bdee7c5a8a7c29c3a0f407cbb5a1d3
Reviewed-on: https://gerrit.libreoffice.org/55645
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/inc/prcntfld.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/table/tablepg.hxx | 39 |
2 files changed, 19 insertions, 21 deletions
diff --git a/sw/source/uibase/inc/prcntfld.hxx b/sw/source/uibase/inc/prcntfld.hxx index 4e3e0c3f8a2e..21f9978338e8 100644 --- a/sw/source/uibase/inc/prcntfld.hxx +++ b/sw/source/uibase/inc/prcntfld.hxx @@ -124,6 +124,7 @@ public: bool has_focus() const { return m_pField->has_focus(); } void save_value() { m_pField->save_value(); } bool get_value_changed_from_saved() const { return m_pField->get_value_changed_from_saved(); } + void set_text(const OUString& rStr) { m_pField->set_text(rStr); } void SetMetricFieldMin(int nNewMin) { m_pField->set_min(nNewMin, FUNIT_NONE); } void SetMetricFieldMax(int nNewMax) { m_pField->set_max(nNewMax, FUNIT_NONE); } diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx index 3883de6cd2b6..dc4e4abda802 100644 --- a/sw/source/uibase/table/tablepg.hxx +++ b/sw/source/uibase/table/tablepg.hxx @@ -75,7 +75,7 @@ class SwFormatTablePage : public SfxTabPage DECL_LINK(AutoClickHdl, weld::ToggleButton&, void); DECL_LINK(RelWidthClickHdl, weld::ToggleButton&, void); void RightModify(); - DECL_LINK(UpDownHdl, weld::MetricSpinButton&, void); + DECL_LINK(ValueChangedHdl, weld::MetricSpinButton&, void); using TabPage::ActivatePage; using TabPage::DeactivatePage; @@ -96,33 +96,31 @@ public: class SwTableColumnPage : public SfxTabPage { - VclPtr<CheckBox> m_pModifyTableCB; - VclPtr<CheckBox> m_pProportionalCB; - VclPtr<FixedText> m_pSpaceFT; - VclPtr<MetricField> m_pSpaceED; - VclPtr<PushButton> m_pUpBtn; - VclPtr<PushButton> m_pDownBtn; - SwTableRep* pTableData; - PercentField m_aFieldArr[MET_FIELDS]; - VclPtr<FixedText> m_pTextArr[MET_FIELDS]; SwTwips nTableWidth; SwTwips nMinWidth; - sal_uInt16 nNoOfCols; - sal_uInt16 nNoOfVisibleCols; + sal_uInt16 nNoOfCols; + sal_uInt16 nNoOfVisibleCols; // Remember the width, when switching to autoalign - sal_uInt16 aValueTable[MET_FIELDS];// primary assignment of the MetricFields + sal_uInt16 aValueTable[MET_FIELDS];// primary assignment of the MetricFields bool bModified:1; bool bModifyTable:1; bool bPercentMode:1; + SwPercentField m_aFieldArr[MET_FIELDS]; + std::unique_ptr<weld::Label> m_aTextArr[MET_FIELDS]; + std::unique_ptr<weld::CheckButton> m_xModifyTableCB; + std::unique_ptr<weld::CheckButton> m_xProportionalCB; + std::unique_ptr<weld::Label> m_xSpaceFT; + std::unique_ptr<weld::MetricSpinButton> m_xSpaceED; + std::unique_ptr<weld::Button> m_xUpBtn; + std::unique_ptr<weld::Button> m_xDownBtn; + void Init(bool bWeb); - DECL_LINK( AutoClickHdl, Button *, void ); - void ModifyHdl( MetricField const * pEdit ); - DECL_LINK( UpHdl, SpinField&, void ); - DECL_LINK( DownHdl, SpinField&, void ); - DECL_LINK( LoseFocusHdl, Control&, void ); - DECL_LINK( ModeHdl, Button *, void ); + DECL_LINK(AutoClickHdl, weld::Button&, void); + void ModifyHdl(const weld::MetricSpinButton* pEdit); + DECL_LINK(ValueChangedHdl, weld::MetricSpinButton&, void); + DECL_LINK(ModeHdl, weld::ToggleButton&, void); void UpdateCols( sal_uInt16 nCurrentPos ); SwTwips GetVisibleWidth(sal_uInt16 nPos); void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth); @@ -131,9 +129,8 @@ class SwTableColumnPage : public SfxTabPage using TabPage::DeactivatePage; public: - SwTableColumnPage( vcl::Window* pParent, const SfxItemSet& rSet ); + SwTableColumnPage(TabPageParent pParent, const SfxItemSet& rSet); virtual ~SwTableColumnPage() override; - virtual void dispose() override; static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet( SfxItemSet* rSet ) override; |