diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-10-27 11:15:54 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-10-27 11:22:46 +0100 |
commit | 94044b8981b9fd861c28c0bf2537b29a8461e0b5 (patch) | |
tree | 08a59a35acb73e9abe7b8b33e0f1c37cb9a9186e /basic | |
parent | 4a35c118a3a6b954827953674cc9bad435c394ee (diff) |
Replace these macro-based implementations with normal C++
Change-Id: Ibb227a0f9e7178ea388e720874ec31a178c2aab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104859
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/sbx/sbxvalue.cxx | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 74b2fcd23d98..fb8f8518573e 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -352,6 +352,13 @@ bool SbxValue::Get( SbxValues& rRes ) const return bRes; } +SbxValues SbxValue::Get(SbxDataType t) const +{ + SbxValues aRes(t); + Get(aRes); + return aRes; +} + const OUString& SbxValue::GetCoreString() const { SbxValues aRes; @@ -379,33 +386,6 @@ OUString SbxValue::GetOUString() const return aResult; } -bool SbxValue::GetBool() const -{ - SbxValues aRes; - aRes.eType = SbxBOOL; - Get( aRes ); - return aRes.nUShort != 0; -} - -#define GET( g, e, t, m ) \ -t SbxValue::g() const { SbxValues aRes(e); Get( aRes ); return aRes.m; } - -GET( GetByte, SbxBYTE, sal_uInt8, nByte ) -GET( GetChar, SbxCHAR, sal_Unicode, nChar ) -GET( GetCurrency, SbxCURRENCY, sal_Int64, nInt64 ) -GET( GetDate, SbxDATE, double, nDouble ) -GET( GetDouble, SbxDOUBLE, double, nDouble ) -GET( GetInteger, SbxINTEGER, sal_Int16, nInteger ) -GET( GetLong, SbxLONG, sal_Int32, nLong ) -GET( GetObject, SbxOBJECT, SbxBase*, pObj ) -GET( GetSingle, SbxSINGLE, float, nSingle ) -GET( GetULong, SbxULONG, sal_uInt32, nULong ) -GET( GetUShort, SbxUSHORT, sal_uInt16, nUShort ) -GET( GetInt64, SbxSALINT64, sal_Int64, nInt64 ) -GET( GetUInt64, SbxSALUINT64, sal_uInt64, uInt64 ) -GET( GetDecimal, SbxDECIMAL, SbxDecimal*, pDecimal ) - - //////////////////////////// Write data bool SbxValue::Put( const SbxValues& rVal ) |