diff options
author | Gergo Mocsi <gmocsi91@gmail.com> | 2013-07-25 16:15:27 +0200 |
---|---|---|
committer | Gergo Mocsi <gmocsi91@gmail.com> | 2013-09-02 18:16:49 +0200 |
commit | d5aa9c3b23f6c9b5ff0b6af11ff6d6827c5f24bd (patch) | |
tree | 7459b7b96eb233133c18f3fa53d2c76cff6aba68 /basctl | |
parent | remove strange added Invalidate bits (diff) | |
download | core-d5aa9c3b23f6c9b5ff0b6af11ff6d6827c5f24bd.tar.gz core-d5aa9c3b23f6c9b5ff0b6af11ff6d6827c5f24bd.zip |
GSOC work, disable QuickSelectionEngine+ListBox navigation modification
Added a function to disable QuickSelectionEngine in ListBox, beacuse it's not needed.
ListBox navigation changed: it is not hiding/showing entries, instead of it, jumps to the longest match without filtering.
Arrow behavior remains the same.
Change-Id: I8982c280f20929c74f9630cbaa95010820d2e234
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 16 | ||||
-rw-r--r-- | basctl/source/basicide/codecompleteoptionsdlg.cxx | 5 |
3 files changed, 13 insertions, 12 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 8737091ce614..42904b2478a9 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -476,10 +476,6 @@ class CodeCompleteListBox: public ListBox { friend class CodeCompleteWindow; private: - std::vector< OUString > aEntryVect; - /* vector to hold all entries for showing/hiding - * when typing a letter/word - * */ OUStringBuffer aFuncBuffer; /* a buffer to build up function name when typing * a function name, used for showing/hiding listbox values 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(); } diff --git a/basctl/source/basicide/codecompleteoptionsdlg.cxx b/basctl/source/basicide/codecompleteoptionsdlg.cxx index 96d1ca732f73..6dcde740f214 100644 --- a/basctl/source/basicide/codecompleteoptionsdlg.cxx +++ b/basctl/source/basicide/codecompleteoptionsdlg.cxx @@ -41,8 +41,9 @@ CodeCompleteOptionsDlg::CodeCompleteOptionsDlg( Window* pWindow ) pCancelBtn->SetClickHdl( LINK( this, CodeCompleteOptionsDlg, CancelHdl ) ); pCodeCompleteChk->Check( CodeCompleteOptions::IsCodeCompleteOn() ); - pAutocloseProcChk->Check( CodeCompleteOptions::IsProcedureAutoCompleteOn() ); + //pAutocloseProcChk->Check( CodeCompleteOptions::IsProcedureAutoCompleteOn() ); + pAutocloseProcChk->Enable( false ); pAutocloseBracesChk->Enable( false ); pAutocloseQuotesChk->Enable( false ); } @@ -54,7 +55,7 @@ CodeCompleteOptionsDlg::~CodeCompleteOptionsDlg() IMPL_LINK_NOARG(CodeCompleteOptionsDlg, OkHdl) { CodeCompleteOptions::SetCodeCompleteOn( pCodeCompleteChk->IsChecked() ); - CodeCompleteOptions::SetProcedureAutoCompleteOn( pCodeCompleteChk->IsChecked() ); + //CodeCompleteOptions::SetProcedureAutoCompleteOn( pCodeCompleteChk->IsChecked() ); Close(); return 0; } |