diff options
Diffstat (limited to 'vcl/source/control/imp_listbox.cxx')
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index d60ebfcaece5..1c866149eabc 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -732,13 +732,13 @@ void ImplListBoxWindow::ImplCallSelect() mbSelectionChanged = false; } -sal_Int32 ImplListBoxWindow::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry ) +sal_Int32 ImplListBoxWindow::InsertEntry(sal_Int32 nPos, ImplEntryType* pNewEntry, bool bSort) { assert(nPos >= 0); assert(mpEntryList->GetEntryCount() < LISTBOX_MAX_ENTRIES); ImplClearLayoutData(); - sal_Int32 nNewPos = mpEntryList->InsertEntry( nPos, pNewEntry, mbSort ); + sal_Int32 nNewPos = mpEntryList->InsertEntry( nPos, pNewEntry, bSort ); if( GetStyle() & WB_WORDBREAK ) pNewEntry->mnFlags |= ListBoxEntryFlags::MultiLine; @@ -747,6 +747,11 @@ sal_Int32 ImplListBoxWindow::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEnt return nNewPos; } +sal_Int32 ImplListBoxWindow::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry ) +{ + return InsertEntry(nPos, pNewEntry, mbSort); +} + void ImplListBoxWindow::RemoveEntry( sal_Int32 nPos ) { ImplClearLayoutData(); @@ -2551,7 +2556,7 @@ void ImplListBox::SetMRUEntries( const OUString& rEntries, sal_Unicode cSep ) if ( GetEntryList()->FindEntry( aEntry ) != LISTBOX_ENTRY_NOTFOUND ) { ImplEntryType* pNewEntry = new ImplEntryType( aEntry ); - maLBWindow->GetEntryList()->InsertEntry( nMRUCount++, pNewEntry, false ); + maLBWindow->InsertEntry(nMRUCount++, pNewEntry, false); bChanges = true; } } |