diff options
author | Gergo Mocsi <gmocsi91@gmail.com> | 2013-07-29 16:08:13 +0200 |
---|---|---|
committer | Gergo Mocsi <gmocsi91@gmail.com> | 2013-09-02 18:16:51 +0200 |
commit | 59055f24cb3dee9ffa21f11fc77ef0cd252b8858 (patch) | |
tree | 11ae8dc66dd0118134d760cecc3f2f6d2ae301fb /basctl | |
parent | 2a87d09bc87af84aee9e1986ebb4888264c99dd7 (diff) |
GSOC work, nested reflection fix - again
Fixed the issue when an invalid method was typed, listbox showed tha methods of the base variable.
Change-Id: I88576645b373e76112103055d547f713af1fc153
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 95beacd46738..b65e6d10dd1b 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -598,6 +598,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) { unsigned int j = 1; OUString sMethName; + bool bReflect = true; while( j != aVect.size() ) { sMethName = aVect[j]; @@ -610,43 +611,47 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) } else { + bReflect = false; break; } j++; } - Sequence< Reference< reflection::XIdlMethod > > aMethods = xClass->getMethods(); - Sequence< Reference< reflection::XIdlField > > aFields = xClass->getFields(); - std::vector< OUString > aEntryVect; - - if( aMethods.getLength() != 0 ) + if( bReflect ) { - for(sal_Int32 l = 0; l < aMethods.getLength(); ++l) + Sequence< Reference< reflection::XIdlMethod > > aMethods = xClass->getMethods(); + Sequence< Reference< reflection::XIdlField > > aFields = xClass->getFields(); + std::vector< OUString > aEntryVect; + + if( aMethods.getLength() != 0 ) { - aEntryVect.push_back(OUString(aMethods[l]->getName())); + for(sal_Int32 l = 0; l < aMethods.getLength(); ++l) + { + aEntryVect.push_back(OUString(aMethods[l]->getName())); + } } - } - if( aFields.getLength() != 0 ) - { - for(sal_Int32 l = 0; l < aFields.getLength(); ++l) + if( aFields.getLength() != 0 ) { - aEntryVect.push_back(OUString(aFields[l]->getName())); + for(sal_Int32 l = 0; l < aFields.getLength(); ++l) + { + aEntryVect.push_back(OUString(aFields[l]->getName())); + } } - } - if( aEntryVect.size() > 0 ) - { - Rectangle aRect = ( (TextEngine*) GetEditEngine() )->PaMtoEditCursor( aSel.GetEnd() , false ); - aSel.GetStart().GetIndex() += 1; - aSel.GetEnd().GetIndex() += 1; - pCodeCompleteWnd->ClearListBox(); - pCodeCompleteWnd->SetTextSelection(aSel); - for(unsigned int l = 0; l < aEntryVect.size(); ++l) + if( aEntryVect.size() > 0 ) { - pCodeCompleteWnd->InsertEntry( aEntryVect[l] ); + Rectangle aRect = ( (TextEngine*) GetEditEngine() )->PaMtoEditCursor( aSel.GetEnd() , false ); + aSel.GetStart().GetIndex() += 1; + aSel.GetEnd().GetIndex() += 1; + pCodeCompleteWnd->ClearListBox(); + pCodeCompleteWnd->SetTextSelection(aSel); + for(unsigned int l = 0; l < aEntryVect.size(); ++l) + { + pCodeCompleteWnd->InsertEntry( aEntryVect[l] ); + } + pCodeCompleteWnd->SetPosPixel( aRect.BottomRight() ); + pCodeCompleteWnd->Show(); + pCodeCompleteWnd->ResizeListBox(); + pCodeCompleteWnd->SelectFirstEntry(); } - pCodeCompleteWnd->SetPosPixel( aRect.BottomRight() ); - pCodeCompleteWnd->Show(); - pCodeCompleteWnd->ResizeListBox(); - pCodeCompleteWnd->SelectFirstEntry(); } } } |