diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2012-10-07 10:47:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-15 16:04:17 +0100 |
commit | cb01fc2eb0fa4728a4b7a404780cf7b04b16433b (patch) | |
tree | 8d2bc67f0c777dd4387299f0d2b732d1edb196c2 /basctl | |
parent | 0d61e5dcdbe2cec9df33ac22e3f0e4fbd6a07517 (diff) |
Related: #i108689# Invalidate Basic IDE slots to trigger feature update
(cherry picked from commit 060758a289c134548d8ad376eaca3d24ea84a0db)
Conflicts:
basctl/source/basicide/baside2b.cxx
basctl/source/basicide/baside3.cxx
Change-Id: I2bbe4eeae9b2e4d3ad257b26a6a9694deeaaa87c
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 9 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 16 | ||||
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 3 |
3 files changed, 25 insertions, 3 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 7b7e3c7396dd..f5f8c1d92f54 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -424,7 +424,11 @@ void EditorWindow::MouseButtonUp( const MouseEvent &rEvt ) { pEditView->MouseButtonUp( rEvt ); if (SfxBindings* pBindings = GetBindingsPtr()) + { + pBindings->Invalidate( SID_COPY ); + pBindings->Invalidate( SID_CUT ); pBindings->Invalidate( SID_BASICIDE_STAT_POS ); + } } } @@ -511,15 +515,20 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) { if (SfxBindings* pBindings = GetBindingsPtr()) { + 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 25bb1ea32265..528e3acc9133 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -156,6 +156,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 ); } } @@ -170,6 +172,8 @@ void DialogWindow::MouseMove( const MouseEvent& rMEvt ) void DialogWindow::KeyInput( const KeyEvent& rKEvt ) { + SfxBindings* pBindings = GetBindingsPtr(); + if( rKEvt.GetKeyCode() == KEY_BACKSPACE ) { if (SfxDispatcher* pDispatcher = GetDispatcher()) @@ -177,9 +181,8 @@ void DialogWindow::KeyInput( const KeyEvent& rKEvt ) } else { - if (rKEvt.GetKeyCode() == KEY_TAB) - if (SfxBindings* pBindings = GetBindingsPtr()) - pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER ); + if( pBindings && rKEvt.GetKeyCode() == KEY_TAB ) + pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER ); if( !pEditor->KeyInput( rKEvt ) ) { @@ -187,6 +190,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 fddf8bbb03c5..674775b79d77 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -863,6 +863,9 @@ void Shell::InvalidateBasicIDESlots() { if (SfxBindings* pBindings = GetBindingsPtr()) { + pBindings->Invalidate( SID_COPY ); + pBindings->Invalidate( SID_CUT ); + pBindings->Invalidate( SID_PASTE ); pBindings->Invalidate( SID_UNDO ); pBindings->Invalidate( SID_REDO ); pBindings->Invalidate( SID_SAVEDOC ); |