Kaydet (Commit) b0240bf1 authored tarafından Vitaliy Anderson's avatar Vitaliy Anderson Kaydeden (comit) Mike Kaganski

tdf#106047 Fix case-insensitive search in autofilter

Change-Id: I67899789b0a51a3a04c2085cbab8c0ed62903413
Reviewed-on: https://gerrit.libreoffice.org/35030Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 657a7913
...@@ -1209,7 +1209,7 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, TriStateHdl, Button*, void) ...@@ -1209,7 +1209,7 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, TriStateHdl, Button*, void)
IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void) IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void)
{ {
OUString aSearchText = maEdSearch->GetText(); OUString aSearchText = maEdSearch->GetText();
aSearchText = aSearchText.toAsciiLowerCase(); aSearchText = ScGlobal::pCharClass->lowercase( aSearchText );
bool bSearchTextEmpty = aSearchText.isEmpty(); bool bSearchTextEmpty = aSearchText.isEmpty();
size_t n = maMembers.size(); size_t n = maMembers.size();
size_t nSelCount = 0; size_t nSelCount = 0;
...@@ -1228,10 +1228,10 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void) ...@@ -1228,10 +1228,10 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void)
if ( !bSearchTextEmpty ) if ( !bSearchTextEmpty )
{ {
if ( !bIsDate ) if ( !bIsDate )
bPartialMatch = ( aLabelDisp.toAsciiLowerCase().indexOf( aSearchText ) != -1 ); bPartialMatch = ( ScGlobal::pCharClass->lowercase( aLabelDisp ).indexOf( aSearchText ) != -1 );
else if ( maMembers[i].meDatePartType == ScCheckListMember::DAY ) // Match with both numerical and text version of month else if ( maMembers[i].meDatePartType == ScCheckListMember::DAY ) // Match with both numerical and text version of month
bPartialMatch = bPartialMatch || ( OUString( maMembers[i].maRealName + maMembers[i].maDateParts[1] ) bPartialMatch = bPartialMatch || ( ScGlobal::pCharClass->lowercase( OUString( maMembers[i].maRealName + maMembers[i].maDateParts[1] ) )
.toAsciiLowerCase().indexOf( aSearchText ) != -1 ); .indexOf( aSearchText ) != -1 );
else else
continue; continue;
} }
......
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