summaryrefslogtreecommitdiffstats
path: root/basctl/source/basicide/baside2b.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide/baside2b.cxx')
-rw-r--r--basctl/source/basicide/baside2b.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 28ed40d957ed..8ae1d5ba7d97 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2431,6 +2431,10 @@ long CodeCompleteListBox::PreNotify( NotifyEvent& rNEvt )
pCodeCompleteWindow->pParent->GetEditView()->DeleteSelected();
SetVisibleEntries();
}
+ else
+ {
+ pCodeCompleteWindow->ClearAndHide();
+ }
return 0;
case KEY_RETURN:
InsertSelectedEntry();
@@ -2443,12 +2447,13 @@ long CodeCompleteListBox::PreNotify( NotifyEvent& rNEvt )
void CodeCompleteListBox::SetVisibleEntries()
{
- Clear();
- for( unsigned int j=0; j < aEntryVect.size(); ++j )
+ for(sal_uInt16 i=0; i< GetEntryCount(); ++i)
{
- if( aEntryVect[j].startsWithIgnoreAsciiCase(aFuncBuffer.toString()) )
+ OUString sEntry = (OUString) GetEntry(i);
+ if( sEntry.startsWithIgnoreAsciiCase( aFuncBuffer.toString() ) )
{
- InsertEntry(aEntryVect[j]);
+ SelectEntry(sEntry);
+ break;
}
}
}
@@ -2467,18 +2472,17 @@ void CodeCompleteWindow::InitListBox()
pListBox->SetSizePixel( Size(150,150) ); //default, this will adopt the line length
pListBox->Show();
pListBox->GrabFocus();
+ pListBox->EnableQuickSelection( false );
}
void CodeCompleteWindow::InsertEntry( const OUString& aStr )
{
pListBox->InsertEntry( aStr );
- pListBox->aEntryVect.push_back( aStr );
}
void CodeCompleteWindow::ClearListBox()
{
pListBox->Clear();
- pListBox->aEntryVect.clear();
pListBox->aFuncBuffer.makeStringAndClear();
}