summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/control/combobox.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 77b9c2ecf57d..d5e47084bf2a 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -351,28 +351,22 @@ IMPL_LINK_TYPED(ComboBox::Impl, ImplAutocompleteHdl, Edit&, rEdit, void)
if ( nStart == LISTBOX_ENTRY_NOTFOUND )
nStart = 0;
- bool bForward = true;
-
sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if (!m_isMatchCase)
{
// Try match case insensitive from current position
- nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward );
+ nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, nStart, true);
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match case insensitive, but from start
- nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText,
- bForward ? 0 : (m_pImplLB->GetEntryList()->GetEntryCount()-1),
- bForward );
+ nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, 0, true);
}
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match full from current position
- nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, false );
+ nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, nStart, true, false);
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Match full, but from start
- nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText,
- bForward ? 0 : (m_pImplLB->GetEntryList()->GetEntryCount()-1),
- bForward, false );
+ nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, 0, true, false);
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{