diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 19:49:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:42 +0200 |
commit | d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch) | |
tree | b5a12df1fcae025715633469b75ab4c9b6f6d279 /forms | |
parent | I suspect the logic is supposed to be the other way around. (diff) | |
download | core-d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f.tar.gz core-d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f.zip |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/Filter.cxx | 6 | ||||
-rw-r--r-- | forms/source/component/ImageControl.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/datatypes.cxx | 6 | ||||
-rw-r--r-- | forms/source/xforms/model_ui.cxx | 2 |
4 files changed, 5 insertions, 11 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 4890df71b125..e947184f9197 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -588,16 +588,14 @@ namespace frm if (xVclWindow.is()) { Any aValue; - if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) ) + if ( aText == "1" || aText.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("TRUE")) || aText.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("IS TRUE")) ) { aValue <<= (sal_Int32)STATE_CHECK; } - else if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "0" ) ) - || aText.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("FALSE")) - ) + else if ( aText == "0" || aText.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("FALSE")) ) { aValue <<= (sal_Int32)STATE_NOCHECK; } diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 8c61449ebd27..55ab059c33a6 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -524,7 +524,7 @@ namespace { bool lcl_isValidDocumentURL( const ::rtl::OUString& _rDocURL ) { - return ( !_rDocURL.isEmpty() && !_rDocURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:object" ) ) ); + return ( !_rDocURL.isEmpty() && _rDocURL != "private:object" ); } } diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index b5e775123edd..083c8eea345b 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -649,11 +649,7 @@ namespace xforms if ( nInvalidityReason ) return nInvalidityReason; - bool bValid = - sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("0")) || - sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("1")) || - sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) || - sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("false")); + bool bValid = sValue == "0" || sValue == "1" || sValue == "true" || sValue == "false"; return bValid ? 0 : RID_STR_XFORMS_INVALID_VALUE; } diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index ed830954d7a0..f1e4d53a3c0e 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -1001,7 +1001,7 @@ void xforms::getInstanceData( const PropertyValue& rValue = pValues[n]; #define PROP(NAME) \ if( p##NAME != NULL && \ - rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(#NAME)) ) \ + rValue.Name == #NAME ) \ rValue.Value >>= (*p##NAME) PROP(ID); PROP(Instance); |