diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2017-05-04 22:59:19 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2017-05-10 05:54:25 +0200 |
commit | e93cf20603e201be29691b83f02b3282b79851e4 (patch) | |
tree | 21af105630203125306abf5b49f4022444d24cdc /basic | |
parent | e5a4858e1adf5e9f0c5eb808d2155fded6a46728 (diff) |
basic: Compare strings in a case-insensitive manner
without creating temporary strings.
Change-Id: I8d0e8286089cb78fa9d8612bff6c51f6901637f1
Reviewed-on: https://gerrit.libreoffice.org/37249
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 2 | ||||
-rw-r--r-- | basic/source/inc/sbunoobj.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index fdfcb75ccf5c..c0efa32baa99 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4730,7 +4730,7 @@ SbxVariable* SbUnoStructRefObject::Find( const OUString& rName, SbxClassType t ) { if ( !mbMemberCacheInit ) initMemberCache(); - StructFieldInfo::iterator it = maFields.find( OUString( rName ).toAsciiUpperCase() ); + StructFieldInfo::iterator it = maFields.find( rName ); if ( it != maFields.end() ) { SbxDataType eSbxType; diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index 3ee8f0478f1a..a707d72a1d1e 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -68,7 +68,7 @@ class SbUnoStructRefObject: public SbxObject { bool operator() (const OUString& rProp, const OUString& rOtherProp ) const { - return rProp.toAsciiUpperCase().compareTo( rOtherProp.toAsciiUpperCase() ) < 0; + return rProp.compareToIgnoreAsciiCase( rOtherProp ) < 0; } }; typedef std::map< OUString, StructRefInfo*, caseLessComp > StructFieldInfo; |