diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-23 11:08:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-23 12:28:49 +0100 |
commit | a9c8ac3632bcc3499cb0e6fe1b4a358ecb4a41b6 (patch) | |
tree | c5bd847d8eb5367d5b059462fa1a873387a4dbdf /include/connectivity | |
parent | fa54bca695f6d17e871e43db75f06a63aec7b739 (diff) |
remove ORowSetValue implicit conversion methods
in favour of the existing get*() methods.
The get*() methods 0 or false or empty in the case of "null", which
is exactly the same behaviour as the conversion methods.
These implicit conversion methods cause lookup problems when combined
with some upcoming OUString changes.
And the code looks cleaner this way too, and has less magic when calling
methods.
Change-Id: Ieb4756bf693e83b996a32667fc1b955f89193496
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125690
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/connectivity')
-rw-r--r-- | include/connectivity/FValue.hxx | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/include/connectivity/FValue.hxx b/include/connectivity/FValue.hxx index 9740b6712ac3..1fe2b9d5fe34 100644 --- a/include/connectivity/FValue.hxx +++ b/include/connectivity/FValue.hxx @@ -310,47 +310,6 @@ namespace connectivity // with the possibility to save an any for bookmarks ORowSetValue& operator=(const css::uno::Any& _rAny); - operator bool() const { return !isNull() && getBool(); } - operator sal_Bool() const = delete; // aka sal_uInt8 - operator sal_Int8() const { return isNull() ? static_cast<sal_Int8>(0) : getInt8(); } - - operator sal_Int16() const { return isNull() ? static_cast<sal_Int16>(0) : getInt16(); } - operator sal_uInt16() const { return isNull() ? static_cast<sal_uInt16>(0) : getUInt16(); } - - operator sal_Int32() const { return isNull() ? 0 : getInt32(); } - operator sal_uInt32() const { return isNull() ? 0 : getUInt32(); } - - operator sal_Int64() const { return isNull() ? 0 : getLong(); } - operator sal_uInt64() const { return isNull() ? 0 : getULong(); } - - operator float() const { return isNull() ? float(0.0): getFloat(); } - operator double() const { return isNull() ? 0.0 : getDouble(); } - - operator OUString() const - { - return isNull() ? OUString() : getString(); - } - - operator css::util::Date() const - { - return isNull() ? css::util::Date() : getDate(); - } - - operator css::util::Time() const - { - return isNull() ? css::util::Time() : getTime(); - } - - operator css::util::DateTime() const - { - return isNull() ? css::util::DateTime() : getDateTime(); - } - - operator css::uno::Sequence<sal_Int8>() const - { - return isNull() ? css::uno::Sequence<sal_Int8>() : getSequence(); - } - bool operator==(const ORowSetValue& _rRH) const; bool operator!=(const ORowSetValue& _rRH) const { @@ -380,7 +339,6 @@ namespace connectivity sal_Int32 getTypeKind() const { return m_eTypeKind; } void setTypeKind(sal_Int32 _eType); - // before calling one of this methods, be sure that the value is not null bool getBool() const; sal_Int8 getInt8() const; |