[Libreoffice-commits] core.git: svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 5 19:36:38 UTC 2020


 svx/source/fmcomp/gridcell.cxx |   10 ++++------
 svx/source/inc/gridcell.hxx    |   10 +++++-----
 2 files changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 9202793ed81c5568f6789504335446b97e8087da
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 2 16:57:16 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jul 5 21:35:55 2020 +0200

    loosen requirement that createField return something derived from SpinField
    
    Change-Id: I2f15717d2e96f21c3fcbbcfd9eda6544daf2a0a2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97984
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 2a4213ffcede..098ae2e3356b 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1944,7 +1944,7 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe
     rPaintFormatter.SetFormat( sFormatString, aAppLanguage );
 }
 
-VclPtr<SpinField> DbNumericField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/  )
+VclPtr<Control> DbNumericField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/  )
 {
     WinBits _nFieldStyle = bSpinButton ? (WB_REPEAT | WB_SPIN) : 0;
     return VclPtr<DoubleNumericField>::Create( _pParent, _nFieldStyle );
@@ -2072,14 +2072,12 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
     static_cast< LongCurrencyField* >( m_pPainter.get() )->SetStrictFormat( bStrict );
 }
 
-
-VclPtr<SpinField> DbCurrencyField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/  )
+VclPtr<Control> DbCurrencyField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/  )
 {
     WinBits _nFieldStyle = bSpinButton ? (WB_REPEAT | WB_SPIN) : 0;
     return VclPtr<LongCurrencyField>::Create( _pParent, _nFieldStyle );
 }
 
-
 double DbCurrencyField::GetCurrency(const Reference< css::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) const
 {
     double fValue = GetValue(_rxField, xFormatter);
@@ -2179,7 +2177,7 @@ DbDateField::DbDateField( DbGridColumn& _rColumn )
     doPropertyListening( FM_PROP_DATE_SHOW_CENTURY );
 }
 
-VclPtr<SpinField> DbDateField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& _rxModel  )
+VclPtr<Control> DbDateField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& _rxModel  )
 {
     WinBits _nFieldStyle = bSpinButton ? (WB_REPEAT | WB_SPIN) : 0;
     // check if there is a DropDown property set to TRUE
@@ -2306,7 +2304,7 @@ DbTimeField::DbTimeField( DbGridColumn& _rColumn )
     doPropertyListening( FM_PROP_STRICTFORMAT );
 }
 
-VclPtr<SpinField> DbTimeField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/ )
+VclPtr<Control> DbTimeField::createField( vcl::Window* _pParent, bool bSpinButton, const Reference< XPropertySet >& /*_rxModel*/ )
 {
     WinBits _nFieldStyle = bSpinButton ? (WB_REPEAT | WB_SPIN) : 0;
     return VclPtr<TimeField>::Create( _pParent, _nFieldStyle );
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 2491152cbf0d..f63f2466b720 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -545,7 +545,7 @@ public:
     virtual ::svt::CellControllerRef    CreateController() const override;
 
 protected:
-    virtual VclPtr<SpinField> createField(
+    virtual VclPtr<Control> createField(
                             vcl::Window* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
@@ -566,7 +566,7 @@ protected:
     virtual void        updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
 
     // DbSpinField
-    virtual VclPtr<SpinField> createField(
+    virtual VclPtr<Control> createField(
                             vcl::Window* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
@@ -590,7 +590,7 @@ protected:
     virtual void        updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
 
     // DbSpinField
-    virtual VclPtr<SpinField> createField(
+    virtual VclPtr<Control> createField(
                             vcl::Window* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
@@ -618,7 +618,7 @@ protected:
     virtual void        updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
 
     // DbSpinField
-    virtual VclPtr<SpinField> createField(
+    virtual VclPtr<Control> createField(
                             vcl::Window* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel
@@ -642,7 +642,7 @@ protected:
     virtual void        updateFromModel( css::uno::Reference< css::beans::XPropertySet > _rxModel ) override;
 
     // DbSpinField
-    virtual VclPtr<SpinField> createField(
+    virtual VclPtr<Control> createField(
                             vcl::Window* _pParent,
                             bool bSpinButton,
                             const css::uno::Reference< css::beans::XPropertySet >& _rxModel


More information about the Libreoffice-commits mailing list