diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-29 12:00:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-29 20:27:56 +0200 |
commit | a26c59ddccc527239f53dadd1db04d34231b310d (patch) | |
tree | 7c22d204afebdae63138991db02b07429a51d8cc /sc | |
parent | b4550772ca34b752bd68a5fe2fc0971741c79ee3 (diff) |
drop newly unused ScDoubleField
Change-Id: I2105306d1d865512a5fa2f8c862e7a21c384ee39
Reviewed-on: https://gerrit.libreoffice.org/76545
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/cctrl/editfield.cxx | 32 | ||||
-rw-r--r-- | sc/source/ui/inc/editfield.hxx | 10 |
2 files changed, 0 insertions, 42 deletions
diff --git a/sc/source/ui/cctrl/editfield.cxx b/sc/source/ui/cctrl/editfield.cxx index 0e6b55747e3b..4066ec4b5e3a 100644 --- a/sc/source/ui/cctrl/editfield.cxx +++ b/sc/source/ui/cctrl/editfield.cxx @@ -24,7 +24,6 @@ #include <comphelper/string.hxx> #include <rtl/math.hxx> #include <unotools/localedatawrapper.hxx> -#include <vcl/builder.hxx> #include <global.hxx> namespace { @@ -36,37 +35,6 @@ sal_Unicode lclGetDecSep() } // namespace -ScDoubleField::ScDoubleField( vcl::Window* pParent, WinBits nStyle ) : - Edit( pParent, nStyle ) -{ -} - -extern "C" SAL_DLLPUBLIC_EXPORT void makeScDoubleField(VclPtr<vcl::Window> & rRet, VclPtr<vcl::Window> & pParent, VclBuilder::stringmap & rMap) -{ - BuilderUtils::ensureDefaultWidthChars(rMap); - rRet = VclPtr<ScDoubleField>::Create(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); -} - -bool ScDoubleField::GetValue( double& rfValue ) const -{ - OUString aStr(comphelper::string::strip(GetText(), ' ')); - bool bOk = !aStr.isEmpty(); - if( bOk ) - { - rtl_math_ConversionStatus eStatus; - sal_Int32 nEnd; - rfValue = ScGlobal::GetpLocaleData()->stringToDouble( aStr, true, &eStatus, &nEnd ); - bOk = (eStatus == rtl_math_ConversionStatus_Ok) && (nEnd == aStr.getLength() ); - } - return bOk; -} - -void ScDoubleField::SetValue( double fValue, sal_Int32 nDecPlaces ) -{ - SetText( ::rtl::math::doubleToUString( fValue, rtl_math_StringFormat_G, - nDecPlaces, lclGetDecSep(), true/*bEraseTrailingDecZeros*/ ) ); -} - DoubleField::DoubleField(std::unique_ptr<weld::Entry> xEntry) : m_xEntry(std::move(xEntry)) { diff --git a/sc/source/ui/inc/editfield.hxx b/sc/source/ui/inc/editfield.hxx index e64b79e305ef..ce6e9a9ac027 100644 --- a/sc/source/ui/inc/editfield.hxx +++ b/sc/source/ui/inc/editfield.hxx @@ -24,16 +24,6 @@ #include <vcl/weld.hxx> /** An edit control that contains a double precision floating-point value. */ -class ScDoubleField : public Edit -{ -public: - explicit ScDoubleField( vcl::Window* pParent, WinBits nStyle ); - - bool GetValue( double& rfValue ) const; - void SetValue( double fValue, - sal_Int32 nDecPlaces = 12 ); -}; - class DoubleField { private: |