summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-10-14 17:59:10 +0200
committerDavid Ostrovsky <david@ostrovsky.org>2013-10-20 11:16:39 +0200
commitb89fb0d03ead22f023f367c9a9d046d3d41ba1cf (patch)
treef36a0676bb41da47ad822949af6953762ec8b01c /connectivity
parenta8eb7a14ff4eb5adcaf169c666ff6000822670c8 (diff)
fdo#68657 bool->string conversion to 1/0, not "true"/"false
This matches what OO.org / older versions of LibreOffice did, and which was inadvertently changed in 2bd856e6 Reviewed-on: https://gerrit.libreoffice.org/6275 Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de> Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de> Conflicts: connectivity/source/commontools/FValue.cxx Change-Id: I1d45ea975a096c599a996caafc41e4aa06d35fcd
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/FValue.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 0a4a88002f83..04c740a5e753 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -1024,7 +1024,12 @@ OUString ORowSetValue::getString( ) const
aRet = OUString::number(static_cast<bool>(*this));
break;
case DataType::BOOLEAN:
- aRet = OUString::boolean(static_cast<bool>(*this));
+ // This would be the natural choice,
+ // but historically it was converted to "0" or "1".
+ // For backwards compatibility, continue doing that.
+ // aRet = OUString::boolean(static_cast<bool>(*this));
+ BOOST_STATIC_ASSERT((boost::is_same< sal_Bool, sal_uInt8 >::value));
+ aRet = OUString::number(static_cast<sal_Bool>(*this));
break;
case DataType::TINYINT:
case DataType::SMALLINT: