diff options
author | Gergo Mocsi <gmocsi91@gmail.com> | 2013-07-22 14:32:00 +0200 |
---|---|---|
committer | Gergo Mocsi <gmocsi91@gmail.com> | 2013-09-02 18:16:47 +0200 |
commit | 3ce1f554deba05eb33a928ca05674e4afa70aecc (patch) | |
tree | 0e2958befda4a3fa99eb109d64899448f58dedad /basic/source | |
parent | 1b8b4864c11955a2f59310cc58f16e509eb48a32 (diff) |
GSOC work menu entry + code fix
Fixed the definition of GLOB_KEY, NOT_FOUND from const to static const.
Added a new menu entry for code completition under View->Enable Code Completition.
Change-Id: If8ac25ee43a7ba780ccdee2e5e909777115a1f27
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/classes/codecompletecache.cxx | 7 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/basic/source/classes/codecompletecache.cxx b/basic/source/classes/codecompletecache.cxx index e45e20a512b6..fc23e7a580d4 100644 --- a/basic/source/classes/codecompletecache.cxx +++ b/basic/source/classes/codecompletecache.cxx @@ -19,6 +19,9 @@ #include <basic/codecompletecache.hxx> +const OUString CodeCompleteDataCache::GLOB_KEY = OUString("global key"); +const OUString CodeCompleteDataCache::NOT_FOUND = OUString("not found"); + std::ostream& operator<< (std::ostream& aStream, const CodeCompleteDataCache& aCache) { for( CodeCompleteVarScopes::const_iterator aIt = aCache.aVarScopes.begin(); aIt != aCache.aVarScopes.end(); ++aIt ) @@ -52,12 +55,12 @@ OUString CodeCompleteDataCache::GetVariableType( const OUString& sVarName, const { CodeCompleteVarScopes::const_iterator aIt = aVarScopes.find( sProcName ); if( aIt == aVarScopes.end() )//procedure does not exist - return NOT_FOUND; + return CodeCompleteDataCache::NOT_FOUND; CodeCompleteVarTypes aVarTypes = aIt->second; CodeCompleteVarTypes::const_iterator aOtherIt = aVarTypes.find( sVarName ); if( aOtherIt == aVarTypes.end() ) - return NOT_FOUND; + return CodeCompleteDataCache::NOT_FOUND; else return aOtherIt->second; } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 8b679c3600fc..f09291deaf00 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1821,7 +1821,7 @@ CodeCompleteDataCache SbModule::GetCodeCompleteDataFromParse() } aCache.InsertProcedure( pSymDef->GetName(), aLocVarTypes ); } - aCache.InsertProcedure( aCache.GLOB_KEY, aGlobVarTypes ); + aCache.InsertProcedure( CodeCompleteDataCache::GLOB_KEY, aGlobVarTypes ); delete pParser; return aCache; |