diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-20 16:29:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-21 10:26:03 +0200 |
commit | 9d0d79ba59a4fb3b88d1757fc4b2916b9f161500 (patch) | |
tree | 5debd03b4bad81c8df4db5c8d21f740279dd8314 /svx | |
parent | 6e7e19d9c300dbdd279789b09f94781e946fad52 (diff) |
can now change base class to use FormattedFieldCellController
Change-Id: I1ea6a7fd88cfac21e7d6d2a1533db5363ea558c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99106
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 22 | ||||
-rw-r--r-- | svx/source/inc/gridcell.hxx | 6 |
2 files changed, 1 insertions, 27 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 8e87c2dabfc6..4005c0d2a7d1 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1854,7 +1854,7 @@ void DbSpinField::Init(BrowserDataWin& _rParent, const Reference< XRowSet >& _rx CellControllerRef DbSpinField::CreateController() const { - return new SpinCellController( static_cast< SpinField* >( m_pWindow.get() ) ); + return new ::svt::FormattedFieldCellController(static_cast<FormattedControlBase*>(m_pWindow.get())); } DbNumericField::DbNumericField( DbGridColumn& _rColumn ) @@ -1868,11 +1868,6 @@ DbNumericField::DbNumericField( DbGridColumn& _rColumn ) doPropertyListening( FM_PROP_SHOWTHOUSANDSEP ); } -CellControllerRef DbNumericField::CreateController() const -{ - return new ::svt::FormattedFieldCellController(static_cast<FormattedControlBase*>(m_pWindow.get())); -} - void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySet >& _rxModel ) { DBG_ASSERT( m_pWindow, "DbNumericField::implAdjustGenericFieldSetting: not to be called without window!" ); @@ -2013,11 +2008,6 @@ DbCurrencyField::DbCurrencyField(DbGridColumn& _rColumn) doPropertyListening( FM_PROP_CURRENCYSYMBOL ); } -CellControllerRef DbCurrencyField::CreateController() const -{ - return new ::svt::FormattedFieldCellController(static_cast<FormattedControlBase*>(m_pWindow.get())); -} - void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertySet >& _rxModel ) { DBG_ASSERT( m_pWindow, "DbCurrencyField::implAdjustGenericFieldSetting: not to be called without window!" ); @@ -2147,11 +2137,6 @@ VclPtr<Control> DbDateField::createField(BrowserDataWin* pParent, bool bSpinButt return VclPtr<DateControl>::Create(pParent, bSpinButton || bDropDown); } -CellControllerRef DbDateField::CreateController() const -{ - return new ::svt::FormattedFieldCellController(static_cast<FormattedControlBase*>(m_pWindow.get())); -} - void DbDateField::implAdjustGenericFieldSetting( const Reference< XPropertySet >& _rxModel ) { DBG_ASSERT( m_pWindow, "DbDateField::implAdjustGenericFieldSetting: not to be called without window!" ); @@ -2272,11 +2257,6 @@ VclPtr<Control> DbTimeField::createField(BrowserDataWin* pParent, bool bSpinButt return VclPtr<TimeControl>::Create(pParent, bSpinButton); } -CellControllerRef DbTimeField::CreateController() const -{ - return new ::svt::FormattedFieldCellController(static_cast<FormattedControlBase*>(m_pWindow.get())); -} - void DbTimeField::implAdjustGenericFieldSetting( const Reference< XPropertySet >& _rxModel ) { DBG_ASSERT( m_pWindow, "DbTimeField::implAdjustGenericFieldSetting: not to be called without window!" ); diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index e4203d31819a..2f57874c779b 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -552,12 +552,10 @@ protected: ) = 0; }; - class DbDateField : public DbSpinField { public: DbDateField(DbGridColumn& _rColumn); - virtual ::svt::CellControllerRef CreateController() const override; virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; @@ -581,7 +579,6 @@ class DbTimeField : public DbSpinField { public: DbTimeField(DbGridColumn& _rColumn); - virtual ::svt::CellControllerRef CreateController() const override; virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; @@ -605,7 +602,6 @@ class DbCurrencyField : public DbSpinField { public: DbCurrencyField(DbGridColumn& _rColumn); - virtual ::svt::CellControllerRef CreateController() const override; virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; @@ -630,8 +626,6 @@ class DbNumericField : public DbSpinField public: DbNumericField(DbGridColumn& _rColumn); - virtual ::svt::CellControllerRef CreateController() const override; - virtual OUString GetFormatText(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter, Color** ppColor = nullptr) override; virtual void UpdateFromField(const css::uno::Reference< css::sdb::XColumn >& _rxField, const css::uno::Reference< css::util::XNumberFormatter >& xFormatter) override; |