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 /basctl | |
parent | GSOC work window hide when clicking out (diff) | |
download | core-3ce1f554deba05eb33a928ca05674e4afa70aecc.tar.gz core-3ce1f554deba05eb33a928ca05674e4afa70aecc.zip |
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 'basctl')
-rw-r--r-- | basctl/sdi/baside.sdi | 6 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 5 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 7 | ||||
-rw-r--r-- | basctl/uiconfig/basicide/menubar/menubar.xml | 1 |
4 files changed, 15 insertions, 4 deletions
diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi index 5582c1d343d5..7dfe68a8a798 100644 --- a/basctl/sdi/baside.sdi +++ b/basctl/sdi/baside.sdi @@ -138,6 +138,12 @@ shell basctl_Shell StateMethod = GetState; ] + SID_BASICIDE_CODECOMPLETITION + [ + ExecMethod = ExecuteCurrent; + StateMethod = GetState; + ] + SID_BASICIDE_LIBSELECTED [ ExecMethod = ExecuteGlobal; diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 386a3ab72875..04d27f6f261b 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -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() ) diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 880578d742f0..7433a389a939 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -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() diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml b/basctl/uiconfig/basicide/menubar/menubar.xml index 2c12262e28c1..2e161305e628 100644 --- a/basctl/uiconfig/basicide/menubar/menubar.xml +++ b/basctl/uiconfig/basicide/menubar/menubar.xml @@ -61,6 +61,7 @@ <menu:menuitem menu:id=".uno:StatusBarVisible"/> <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/> <menu:menuitem menu:id=".uno:ShowLines"/> + <menu:menuitem menu:id=".uno:BasicCodeCompletition"/> <menu:menuitem menu:id=".uno:GotoLine"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:FullScreen"/> |