From ded180d825d00b24ad8ec063bfeff4dd5bc46ac4 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 5 May 2011 19:02:59 +0100 Subject: fix for #fdo35706 - ( Ctrl-F & Ctrl-Alt-F don't work in basic IDE ) --- basctl/source/basicide/baside2b.cxx | 9 +++++---- basctl/uiconfig/basicide/toolbar/findbar.xml | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 basctl/uiconfig/basicide/toolbar/findbar.xml (limited to 'basctl') diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 7454b1b83358..399f0b700f98 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -411,11 +411,13 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) long nLinSz = pModulWindow->GetHScrollBar()->GetLineSize(); (void)nLinSz; long nThumb = pModulWindow->GetHScrollBar()->GetThumbPos(); (void)nThumb; #endif - sal_Bool bDone = sal_False; sal_Bool bWasModified = pEditEngine->IsModified(); - if ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() ) + // see if there is an accelerator to be processed first + sal_Bool bDone = SfxViewShell::Current()->KeyInput( rKEvt ); + + if ( !bDone && ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() ) ) { - if ( ( rKEvt.GetKeyCode().GetCode() == KEY_A) && rKEvt.GetKeyCode().IsMod1() ) + if ( ( rKEvt.GetKeyCode().GetCode() == KEY_A) && rKEvt.GetKeyCode().IsMod1() && !rKEvt.GetKeyCode().IsMod2() ) pEditView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) ); else if ( ( rKEvt.GetKeyCode().GetCode() == KEY_Y ) && rKEvt.GetKeyCode().IsMod1() ) bDone = sal_True; // CTRL-Y schlucken, damit kein Vorlagenkatalog @@ -442,7 +444,6 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) } if ( !bDone ) { - if ( !SfxViewShell::Current()->KeyInput( rKEvt ) ) Window::KeyInput( rKEvt ); } else diff --git a/basctl/uiconfig/basicide/toolbar/findbar.xml b/basctl/uiconfig/basicide/toolbar/findbar.xml new file mode 100644 index 000000000000..0338d3156195 --- /dev/null +++ b/basctl/uiconfig/basicide/toolbar/findbar.xml @@ -0,0 +1,8 @@ + + + + + + + + -- cgit