summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-07-29 16:08:13 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-09-02 18:16:51 +0200
commit59055f24cb3dee9ffa21f11fc77ef0cd252b8858 (patch)
tree11ae8dc66dd0118134d760cecc3f2f6d2ae301fb /basic
parent2a87d09bc87af84aee9e1986ebb4888264c99dd7 (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 'basic')
-rw-r--r--basic/source/classes/codecompletecache.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx
index 728dcb4a1d81..b174d1e7149d 100644
--- a/basic/source/classes/codecompletecache.cxx
+++ b/basic/source/classes/codecompletecache.cxx
@@ -142,18 +142,23 @@ void CodeCompleteDataCache::InsertLocalVar( const OUString& sProcName, const OUS
}
}
-OUString CodeCompleteDataCache::GetVarType( const OUString& sVarName )
+OUString CodeCompleteDataCache::GetVarType( const OUString& sVarName ) const
{
for( CodeCompleteVarScopes::const_iterator aIt = aVarScopes.begin(); aIt != aVarScopes.end(); ++aIt )
{
CodeCompleteVarTypes aTypes = aIt->second;
- if( aTypes[sVarName] != OUString("") )
- return aTypes[sVarName];
+ for( CodeCompleteVarTypes::const_iterator aOtherIt = aTypes.begin(); aOtherIt != aTypes.end(); ++aOtherIt )
+ {
+ if( aOtherIt->first.equalsIgnoreAsciiCase( sVarName ) )
+ {
+ return aOtherIt->second;
+ }
+ }
}
//not a local, search global scope
for( CodeCompleteVarTypes::const_iterator aIt = aGlobalVars.begin(); aIt != aGlobalVars.end(); ++aIt )
{
- if( aIt->first == sVarName )
+ if( aIt->first.equalsIgnoreAsciiCase( sVarName ) )
return aIt->second;
}
return OUString(""); //not found