summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Power <nopower@novell.com>2011-05-18 11:15:14 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-18 11:15:14 +0200
commit4bc2724240b11ce4dfb7adafbe1f1c260fa44030 (patch)
tree360a433954fa2c7e8bd92260c6e5dc791dffcf09 /basctl
parent010a4baa37bbdca0c35dc3555f6467174e956644 (diff)
Fix 'Ctrl+A' in the Basic IDE - fdo#37211.
Signed-off-by: Jan Holesovsky <kendy@suse.cz>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/sdi/baside.sdi5
-rw-r--r--basctl/source/basicide/baside2.cxx9
-rw-r--r--basctl/source/basicide/baside2b.cxx4
3 files changed, 15 insertions, 3 deletions
diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index bc9232c08bfd..f40e239b01bf 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -57,6 +57,11 @@ shell BasicIDEShell
StateMethod = GetState;
]
+ SID_SELECTALL
+ [
+ ExecMethod = ExecuteCurrent;
+ ]
+
SID_CUT
[
ExecMethod = ExecuteCurrent;
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 325ff76c076e..aa1dd1ecd25e 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -999,6 +999,15 @@ void ModulWindow::ExecuteCommand( SfxRequest& rReq )
sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
+ case SID_DELETE:
+ {
+ KeyEvent aFakeDelete( 0, KEY_DELETE );
+ GetEditView()->KeyInput( aFakeDelete );
+ break;
+ }
+ case SID_SELECTALL:
+ GetEditView()->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) );
+ break;
case SID_BASICRUN:
{
BasicRun();
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 399f0b700f98..bbaddf089ad7 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -417,9 +417,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
if ( !bDone && ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() ) )
{
- 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() )
+ if ( ( rKEvt.GetKeyCode().GetCode() == KEY_Y ) && rKEvt.GetKeyCode().IsMod1() )
bDone = sal_True; // CTRL-Y schlucken, damit kein Vorlagenkatalog
else
{