[Libreoffice-commits] core.git: basic/source

Takeshi Abe tabe at fixedpoint.jp
Wed May 10 03:55:05 UTC 2017


 basic/source/classes/sbunoobj.cxx |    2 +-
 basic/source/inc/sbunoobj.hxx     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e93cf20603e201be29691b83f02b3282b79851e4
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu May 4 22:59:19 2017 +0900

    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 at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

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;


More information about the Libreoffice-commits mailing list