summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-07-12 11:18:36 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-07-12 11:18:36 +0200
commit84b18461e5fad248dc9a80f90d1e3296722fda9b (patch)
tree0f86697003fd3fa8e7333b96f17eff900e6b943e
parente83dd7cb1598b7567c3c4f5822c6132d8054d181 (diff)
GSOC work nested reflection fix
Ive fixed the parameter problem: I use the tokens created by the syntax highlighter (it's struct HighlightPortion), and put the identiiers to the vector, and reflect them. Change-Id: I08888e4a8bf00fa987a16466f4a5ac03836e5ee7
-rw-r--r--basctl/source/basicide/baside2b.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index e62bf6013a55..4d15c480959f 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -524,7 +524,16 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
OUString aLine( pEditEngine->GetText( nLine ) ); // the line being modified
OUString aStr = aLine.copy( std::max(aLine.lastIndexOf(" "), aLine.lastIndexOf("\t"))+1 ); // variable name
OUString sActSub = GetActualSubName( nLine );
- std::vector< OUString > aVect = Split( aStr, '.' );
+ std::vector< OUString > aVect; //= Split( aStr, '.' );
+
+ HighlightPortions aPortions;
+ aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
+ for ( size_t i = 0; i < aPortions.size(); i++ )
+ {
+ HighlightPortion& r = aPortions[i];
+ if( r.tokenType == 1 ) // extract the identifers(methods, base variable)
+ aVect.push_back( aLine.copy(r.nBegin, r.nEnd - r.nBegin) );
+ }
OUString sBaseName = aVect[0];
for( unsigned int i = 0; i < aCodeCompleteCache.size(); ++i)
{