Kaydet (Commit) b9fac576 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

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
üst e2cec503
...@@ -1075,12 +1075,12 @@ bool ORowSetValue::getBool() const ...@@ -1075,12 +1075,12 @@ bool ORowSetValue::getBool() const
const OUString sValue(m_aValue.m_pString); const OUString sValue(m_aValue.m_pString);
const static OUString s_sTrue("true"); const static OUString s_sTrue("true");
const static OUString s_sFalse("false"); const static OUString s_sFalse("false");
if ( sValue.equalsIgnoreAsciiCase(s_sTrue) ) if ( sValue.equalsIgnoreAsciiCase(s_sTrue) || (sValue == "1") )
{ {
bRet = sal_True; bRet = sal_True;
break; break;
} }
else if ( sValue.equalsIgnoreAsciiCase(s_sFalse) ) else if ( sValue.equalsIgnoreAsciiCase(s_sFalse) || (sValue == "0") )
{ {
bRet = sal_False; bRet = sal_False;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment