diff options
Diffstat (limited to 'basic/source/sbx/sbxarray.cxx')
-rw-r--r-- | basic/source/sbx/sbxarray.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index d8f16f5891c1..5f70345e6f2a 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -277,6 +277,8 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t ) return nullptr; bool bExtSearch = IsSet( SbxFlagBits::ExtSearch ); sal_uInt16 nHash = SbxVariable::MakeHashCode( rName ); + //const OUString aNameCI = SbxVariable::NameToCaseInsensitiveName(rName); + const OUString aNameCI = SbxVariable::NameToCaseInsensitiveName(rName); for (auto& rEntry : mVarEntries) { if (!rEntry.mpVar.is() || !rEntry.mpVar->IsVisible()) @@ -284,9 +286,10 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t ) // The very secure search works as well, if there is no hashcode! sal_uInt16 nVarHash = rEntry.mpVar->GetHashCode(); + // tdf#148358 - compare the names case-insensitive if ( (!nVarHash || nVarHash == nHash) && (t == SbxClassType::DontCare || rEntry.mpVar->GetClass() == t) - && (rEntry.mpVar->GetName().equalsIgnoreAsciiCase(rName))) + && (rEntry.mpVar->GetName(SbxNameType::CaseInsensitive) == aNameCI)) { p = rEntry.mpVar.get(); p->ResetFlag(SbxFlagBits::ExtFound); |