summaryrefslogtreecommitdiff
path: root/include/basic
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-10-27 11:15:54 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-10-27 11:22:46 +0100
commit94044b8981b9fd861c28c0bf2537b29a8461e0b5 (patch)
tree08a59a35acb73e9abe7b8b33e0f1c37cb9a9186e /include/basic
parent4a35c118a3a6b954827953674cc9bad435c394ee (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 'include/basic')
-rw-r--r--include/basic/sbxvar.hxx33
1 files changed, 18 insertions, 15 deletions
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index 4ab7052cc2dd..14c3eb97a788 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -135,27 +135,27 @@ public:
SbxValues * data() { return &aData; }
- sal_Unicode GetChar() const;
- sal_Int16 GetInteger() const;
- sal_Int32 GetLong() const;
- sal_Int64 GetInt64() const;
- sal_uInt64 GetUInt64() const;
+ sal_Unicode GetChar() const { return Get(SbxCHAR).nChar; }
+ sal_Int16 GetInteger() const { return Get(SbxINTEGER).nInteger; }
+ sal_Int32 GetLong() const { return Get(SbxLONG).nLong; }
+ sal_Int64 GetInt64() const { return Get(SbxSALINT64).nInt64; }
+ sal_uInt64 GetUInt64() const { return Get(SbxSALUINT64).uInt64; }
- sal_Int64 GetCurrency() const;
- SbxDecimal* GetDecimal() const;
+ sal_Int64 GetCurrency() const { return Get(SbxCURRENCY).nInt64; }
+ SbxDecimal* GetDecimal() const { return Get(SbxDECIMAL).pDecimal; }
- float GetSingle() const;
- double GetDouble() const;
- double GetDate() const;
+ float GetSingle() const { return Get(SbxSINGLE).nSingle; }
+ double GetDouble() const { return Get(SbxDOUBLE).nDouble; }
+ double GetDate() const { return Get(SbxDATE).nDouble; }
- bool GetBool() const;
+ bool GetBool() const { return Get(SbxBOOL).nUShort != 0; }
const OUString& GetCoreString() const;
OUString GetOUString() const;
- SbxBase* GetObject() const;
- sal_uInt8 GetByte() const;
- sal_uInt16 GetUShort() const;
- sal_uInt32 GetULong() const;
+ SbxBase* GetObject() const { return Get(SbxOBJECT).pObj; }
+ sal_uInt8 GetByte() const { return Get(SbxBYTE).nByte; }
+ sal_uInt16 GetUShort() const { return Get(SbxUSHORT).nUShort; }
+ sal_uInt32 GetULong() const { return Get(SbxULONG).nULong; }
bool PutInteger( sal_Int16 );
bool PutLong( sal_Int32 );
@@ -202,6 +202,9 @@ public:
inline SbxValue& operator /=( const SbxValue& );
inline SbxValue& operator +=( const SbxValue& );
inline SbxValue& operator -=( const SbxValue& );
+
+private:
+ SbxValues Get(SbxDataType t) const;
};
inline bool SbxValue::operator<=( const SbxValue& r ) const