diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-14 18:03:32 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-16 18:45:18 +0200 |
commit | b9fac5769d831989dcff7bd815ca5630a916075d (patch) | |
tree | 42dfde9be9d7b74fa8e6a3ce8688dd366391625a /connectivity/source | |
parent | e2cec503d214be6b2f6cb64bbafcad8679c7891c (diff) |
string->bool conversion recognise "1"/"0" additionally to "true"/"false"
since that is what the conversion in the other direction recognises.
It also recognises the "true"/"false" written by LibreOffice versions affected by fdo#68657
Change-Id: I213c23a19e4857905da93eeb2be1b9714215594a
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/commontools/FValue.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index 5a18711c35af..89f1f104d717 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -1075,12 +1075,12 @@ bool ORowSetValue::getBool() const const OUString sValue(m_aValue.m_pString); const static OUString s_sTrue("true"); const static OUString s_sFalse("false"); - if ( sValue.equalsIgnoreAsciiCase(s_sTrue) ) + if ( sValue.equalsIgnoreAsciiCase(s_sTrue) || (sValue == "1") ) { bRet = sal_True; break; } - else if ( sValue.equalsIgnoreAsciiCase(s_sFalse) ) + else if ( sValue.equalsIgnoreAsciiCase(s_sFalse) || (sValue == "0") ) { bRet = sal_False; break; |