Kaydet (Commit) 76f33f10 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Caolán McNamara

tdf#67990: Management of case in combobox

I noticed these 2 points:
1) Combobox were used with autocomplete with default (false) value for matchCase
=> so initialize autocomplete with true value for matchCase
2) FindMatchingEntry uses bLazy as !matchCase
but when bLazy = false, no autocomplete can work since you must type the whole word
so just use "entryCombo" startsWith "typed string" instead of "entryCombo" == "typed string"

(thank you Lionel for this tip: http://nabble.documentfoundation.org/Finding-the-right-location-for-tdf-67990-Base-module-td4143324.html)

Change-Id: Ib1063002c3284122fd5279f27c1ccbc177bbac7c
Reviewed-on: https://gerrit.libreoffice.org/14885Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6c4100cf
......@@ -4374,12 +4374,12 @@ void VCLXComboBox::setProperty( const OUString& PropertyName, const ::com::sun::
{
sal_Int16 n = sal_Int16();
if ( Value >>= n )
pComboBox->EnableAutocomplete( n != 0 );
pComboBox->EnableAutocomplete( n != 0, true );
else
{
bool b = bool();
if ( Value >>= b )
pComboBox->EnableAutocomplete( b );
pComboBox->EnableAutocomplete( b, true );
}
}
break;
......
......@@ -287,7 +287,7 @@ sal_Int32 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_Int32 nSta
}
else
{
bMatch = rStr.isEmpty() || (rStr == pImplEntry->maStr );
bMatch = rStr.isEmpty() || (pImplEntry->maStr.startsWith(rStr));
}
if ( bMatch )
{
......
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