Kaydet (Commit) 1cd94207 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: rhbz#1175142 nStarts ends up as an invalid -1

Change-Id: Ic67c5562d0e9936cd6a524ecd4f798aaf885a6e8
üst d1cf3626
...@@ -292,7 +292,7 @@ void ComboBox::ImplAutocompleteHandler( Edit* pEdit ) ...@@ -292,7 +292,7 @@ void ComboBox::ImplAutocompleteHandler( Edit* pEdit )
{ {
OUString aFullText = pEdit->GetText(); OUString aFullText = pEdit->GetText();
OUString aStartText = aFullText.copy( 0, (sal_Int32)aSel.Max() ); OUString aStartText = aFullText.copy( 0, (sal_Int32)aSel.Max() );
sal_Int32 nStart = mpImplLB->GetCurrentPos(); sal_Int32 nStart = mpImplLB->GetCurrentPos();
if ( nStart == LISTBOX_ENTRY_NOTFOUND ) if ( nStart == LISTBOX_ENTRY_NOTFOUND )
nStart = 0; nStart = 0;
...@@ -303,7 +303,10 @@ void ComboBox::ImplAutocompleteHandler( Edit* pEdit ) ...@@ -303,7 +303,10 @@ void ComboBox::ImplAutocompleteHandler( Edit* pEdit )
else if ( eAction == AUTOCOMPLETE_TABBACKWARD ) else if ( eAction == AUTOCOMPLETE_TABBACKWARD )
{ {
bForward = false; bForward = false;
nStart = nStart ? nStart - 1 : mpImplLB->GetEntryList()->GetEntryCount()-1; if (nStart)
nStart = nStart - 1;
else if (mpImplLB->GetEntryList()->GetEntryCount())
nStart = mpImplLB->GetEntryList()->GetEntryCount()-1;
} }
sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND; sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
......
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