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

@@ -1009,6 +1009,11 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
rLayout.BasicRemoveWatch();
}
break;
case SID_BASICIDE_CODECOMPLETITION:
{
std::cerr << "code completition enabled" << std::endl;
}
break;
case SID_CUT:
{
if ( !IsReadOnly() )

View File

@@ -525,8 +525,8 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
aVect.push_back( aLine.copy(r.nBegin, r.nEnd - r.nBegin) );
}
OUString sBaseName = aVect[0];//variable name
OUString sVarType = aCodeCompleteCache.GetVariableType(sBaseName, aCodeCompleteCache.GLOB_KEY);
if( sVarType == aCodeCompleteCache.NOT_FOUND )
OUString sVarType = aCodeCompleteCache.GetVariableType(sBaseName, CodeCompleteDataCache::GLOB_KEY);
if( sVarType == CodeCompleteDataCache::NOT_FOUND )
sVarType = aCodeCompleteCache.GetVariableType(sBaseName, sActSub);
Reference< lang::XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), UNO_SET_THROW );
@@ -575,7 +575,6 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
}
}
}
}
if ( !bDone && ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() ) )
{
@@ -884,7 +883,7 @@ OUString EditorWindow::GetActualSubName( sal_uLong nLine )
}
}
}
return aCodeCompleteCache.GLOB_KEY;
return CodeCompleteDataCache::GLOB_KEY;
}
void EditorWindow::SetScrollBarRanges()