diff options
author | Tsutomu Uchino <hanya@apache.org> | 2014-01-22 07:41:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-22 10:31:27 +0000 |
commit | 4f03eb00fcb6b1c3a06709edab56c8e2508241d5 (patch) | |
tree | 95b715f87ff230f1b909d6e7919998d69cbc0336 /basctl | |
parent | VML import: parse shape text run inside w:smartTag (diff) | |
download | core-4f03eb00fcb6b1c3a06709edab56c8e2508241d5.tar.gz core-4f03eb00fcb6b1c3a06709edab56c8e2508241d5.zip |
Related: #i50481# improve Select All command in Basic IDE
see also fdo#37211 i.e. commit 4bc2724240b11ce4dfb7adafbe1f1c260fa44030
(cherry picked from commit f841659faf09fec69c962959b9da032fa0bc2b16)
Conflicts:
basctl/source/basicide/baside2.cxx
basctl/source/basicide/baside2b.cxx
basctl/source/basicide/baside3.cxx
Change-Id: Id679b1e16b87ec8d81fb78039318728320b9d5bc
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/sdi/baside.sdi | 1 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 13 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 5 |
3 files changed, 18 insertions, 1 deletions
diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi index 271441c6b499..586b328347d4 100644 --- a/basctl/sdi/baside.sdi +++ b/basctl/sdi/baside.sdi @@ -57,6 +57,7 @@ shell basctl_Shell SID_SELECTALL [ ExecMethod = ExecuteCurrent; + StateMethod = GetState; ] SID_CUT diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 2f8744e1dc4e..c9719ffd13e4 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -952,8 +952,13 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq) break; } case SID_SELECTALL: - GetEditView()->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) ); + { + TextSelection aSel( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, 0xFFFF ) ); + TextView * pView = GetEditView(); + pView->SetSelection( aSel ); + pView->GetWindow()->GrabFocus(); break; + } case SID_BASICRUN: { BasicRun(); @@ -1170,6 +1175,12 @@ void ModulWindow::GetState( SfxItemSet &rSet ) rSet.Put(SfxBoolItem(nWh, bSourceLinesEnabled)); break; } + case SID_SELECTALL: + { + if ( !GetEditView() ) + rSet.DisableItem( nWh ); + } + break; } } } diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index a7b0b20b147d..14ef27f6cb53 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -409,6 +409,11 @@ void DialogWindow::GetState( SfxItemSet& rSet ) rSet.Put(SfxVisibilityItem(nWh, false)); break; } + case SID_SELECTALL: + { + rSet.DisableItem( nWh ); + } + break; } } } |