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
This commit is contained in:
Gergo Mocsi
2013-07-22 14:32:00 +02:00
parent 1b8b4864c1
commit 3ce1f554de
10 changed files with 53 additions and 9 deletions

View File

@@ -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;
}