Kaydet (Commit) f841659f authored tarafından Tsutomu Uchino's avatar Tsutomu Uchino

#i50481# make Select All command working through the main menu of Basic IDE

üst 352ca2f6
......@@ -101,6 +101,12 @@ shell BasicIDEShell
StateMethod = GetState;
]
SID_SELECTALL
[
ExecMethod = ExecuteCurrent;
StateMethod = GetState;
]
SID_SEARCH_ITEM
[
ExecMethod = ExecuteCurrent;
......
......@@ -1132,6 +1132,14 @@ void __EXPORT ModulWindow::ExecuteCommand( SfxRequest& rReq )
GetBreakPointWindow().Invalidate();
}
break;
case SID_SELECTALL:
{
TextSelection aSel( TextPaM( 0, 0 ), TextPaM( TEXT_PARA_ALL, 0xFFFF ) );
TextView * pView = GetEditView();
pView->SetSelection( aSel );
pView->GetWindow()->GrabFocus();
}
break;
}
}
......@@ -1198,6 +1206,12 @@ void __EXPORT ModulWindow::GetState( SfxItemSet &rSet )
}
}
break;
case SID_SELECTALL:
{
if ( !GetEditView() )
rSet.DisableItem( nWh );
}
break;
}
}
}
......
......@@ -431,9 +431,7 @@ void __EXPORT EditorWindow::KeyInput( const KeyEvent& rKEvt )
sal_Bool bWasModified = pEditEngine->IsModified();
if ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() )
{
if ( ( rKEvt.GetKeyCode().GetCode() == KEY_A) && rKEvt.GetKeyCode().IsMod1() )
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
{
......
......@@ -431,6 +431,12 @@ void __EXPORT DialogWindow::GetState( SfxItemSet& rSet )
rSet.DisableItem( nWh );
}
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