Kaydet (Commit) 4f03eb00 authored tarafından Tsutomu Uchino's avatar Tsutomu Uchino Kaydeden (comit) Caolán McNamara

Related: #i50481# improve Select All command in Basic IDE

see also fdo#37211 i.e. commit 4bc27242

(cherry picked from commit f841659f)

Conflicts:
	basctl/source/basicide/baside2.cxx
	basctl/source/basicide/baside2b.cxx
	basctl/source/basicide/baside3.cxx

Change-Id: Id679b1e16b87ec8d81fb78039318728320b9d5bc
üst f2d1e5ef
...@@ -57,6 +57,7 @@ shell basctl_Shell ...@@ -57,6 +57,7 @@ shell basctl_Shell
SID_SELECTALL SID_SELECTALL
[ [
ExecMethod = ExecuteCurrent; ExecMethod = ExecuteCurrent;
StateMethod = GetState;
] ]
SID_CUT SID_CUT
......
...@@ -952,8 +952,13 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq) ...@@ -952,8 +952,13 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
break; break;
} }
case SID_SELECTALL: 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; break;
}
case SID_BASICRUN: case SID_BASICRUN:
{ {
BasicRun(); BasicRun();
...@@ -1170,6 +1175,12 @@ void ModulWindow::GetState( SfxItemSet &rSet ) ...@@ -1170,6 +1175,12 @@ void ModulWindow::GetState( SfxItemSet &rSet )
rSet.Put(SfxBoolItem(nWh, bSourceLinesEnabled)); rSet.Put(SfxBoolItem(nWh, bSourceLinesEnabled));
break; break;
} }
case SID_SELECTALL:
{
if ( !GetEditView() )
rSet.DisableItem( nWh );
}
break;
} }
} }
} }
......
...@@ -409,6 +409,11 @@ void DialogWindow::GetState( SfxItemSet& rSet ) ...@@ -409,6 +409,11 @@ void DialogWindow::GetState( SfxItemSet& rSet )
rSet.Put(SfxVisibilityItem(nWh, false)); rSet.Put(SfxVisibilityItem(nWh, false));
break; break;
} }
case SID_SELECTALL:
{
rSet.DisableItem( nWh );
}
break;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment