diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2012-10-07 10:47:35 +0000 |
---|---|---|
committer | Ariel Constenla-Haile <arielch@apache.org> | 2012-10-07 10:47:35 +0000 |
commit | 060758a289c134548d8ad376eaca3d24ea84a0db (patch) | |
tree | 08576857274aba77796c8411491b586851624a81 | |
parent | 62589b11dbcb1e6aa557f9d7ecc284c51b281f65 (diff) |
#i108689# - Invalidate Basic IDE slots in order to trigger feature update
Notes
Notes:
merged as: cb01fc2eb0fa4728a4b7a404780cf7b04b16433b
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 9 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 12 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 3 |
3 files changed, 23 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 9003e54dc9ff..0e8569c0bb67 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -356,7 +356,11 @@ void __EXPORT EditorWindow::MouseButtonUp( const MouseEvent &rEvt ) pEditView->MouseButtonUp( rEvt ); SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) + { + pBindings->Invalidate( SID_COPY ); + pBindings->Invalidate( SID_CUT ); pBindings->Invalidate( SID_BASICIDE_STAT_POS ); + } } } @@ -454,15 +458,20 @@ void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt ) SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) { + pBindings->Invalidate( SID_CUT ); + pBindings->Invalidate( SID_COPY ); pBindings->Invalidate( SID_BASICIDE_STAT_POS ); + if ( rKEvt.GetKeyCode().GetGroup() == KEYGROUP_CURSOR ) pBindings->Update( SID_BASICIDE_STAT_POS ); + if ( !bWasModified && pEditEngine->IsModified() ) { pBindings->Invalidate( SID_SAVEDOC ); pBindings->Invalidate( SID_DOC_MODIFIED ); pBindings->Invalidate( SID_UNDO ); } + if ( rKEvt.GetKeyCode().GetCode() == KEY_INSERT ) pBindings->Invalidate( SID_ATTR_INSERT ); } diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 3bc026c0ae5c..84ece1094120 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -188,6 +188,8 @@ void DialogWindow::MouseButtonUp( const MouseEvent& rMEvt ) pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER ); pBindings->Invalidate( SID_DOC_MODIFIED ); pBindings->Invalidate( SID_SAVEDOC ); + pBindings->Invalidate( SID_COPY ); + pBindings->Invalidate( SID_CUT ); } } @@ -202,6 +204,8 @@ void DialogWindow::MouseMove( const MouseEvent& rMEvt ) void DialogWindow::KeyInput( const KeyEvent& rKEvt ) { + SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); + if( rKEvt.GetKeyCode() == KEY_BACKSPACE ) { BasicIDEShell* pIDEShell = IDE_DLL()->GetShell(); @@ -214,7 +218,6 @@ void DialogWindow::KeyInput( const KeyEvent& rKEvt ) } else { - SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if( pBindings && rKEvt.GetKeyCode() == KEY_TAB ) pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER ); @@ -224,6 +227,13 @@ void DialogWindow::KeyInput( const KeyEvent& rKEvt ) Window::KeyInput( rKEvt ); } } + + // may be KEY_TAB, KEY_BACKSPACE, KEY_ESCAPE + if( pBindings ) + { + pBindings->Invalidate( SID_COPY ); + pBindings->Invalidate( SID_CUT ); + } } void DialogWindow::Command( const CommandEvent& rCEvt ) diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index fc6d52242ee1..9a2919138a92 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -947,6 +947,9 @@ void BasicIDEShell::InvalidateBasicIDESlots() SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) { + pBindings->Invalidate( SID_COPY ); + pBindings->Invalidate( SID_CUT ); + pBindings->Invalidate( SID_PASTE ); pBindings->Invalidate( SID_UNDO ); pBindings->Invalidate( SID_REDO ); pBindings->Invalidate( SID_SAVEDOC ); |