n#676858: ESC key to escape the header / footer edit mode
Fixed another minor issue: * cursor remained in header / footer when escaping with a flying object selected. Cleared the flys selection before toggling the edition mode in the SwFEShell
This commit is contained in:
parent
b521123119
commit
3442247f17
3 changed files with 20 additions and 1 deletions
|
@ -772,6 +772,7 @@ public:
|
|||
bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode,
|
||||
const Point& _rDocPos ) const;
|
||||
|
||||
virtual void ToggleHeaderFooterEdit( );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1314,4 +1314,16 @@ void SwFEShell::MoveObjectIfActive( svt::EmbeddedObjectRef&, const Point& )
|
|||
// does not do anything, only avoids crash if the method is used for wrong shell
|
||||
}
|
||||
|
||||
void SwFEShell::ToggleHeaderFooterEdit()
|
||||
{
|
||||
// Clear objects selection
|
||||
if ( Imp()->GetDrawView()->AreObjectsMarked() )
|
||||
{
|
||||
Imp()->GetDrawView()->UnmarkAll();
|
||||
ClearMark();
|
||||
}
|
||||
|
||||
SwCrsrShell::ToggleHeaderFooterEdit();
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -1252,6 +1252,8 @@ void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
|
|||
|
||||
void SwEditWin::KeyInput(const KeyEvent &rKEvt)
|
||||
{
|
||||
SwWrtShell &rSh = rView.GetWrtShell();
|
||||
|
||||
if( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE &&
|
||||
pApplyTempl && pApplyTempl->pFormatClipboard )
|
||||
{
|
||||
|
@ -1259,6 +1261,11 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
|
|||
SetApplyTemplate(SwApplyTemplate());
|
||||
rView.GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
|
||||
}
|
||||
else if ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE &&
|
||||
rSh.IsHeaderFooterEdit( ) )
|
||||
{
|
||||
rSh.ToggleHeaderFooterEdit();
|
||||
}
|
||||
|
||||
SfxObjectShell *pObjSh = (SfxObjectShell*)rView.GetViewFrame()->GetObjectShell();
|
||||
if ( bLockInput || (pObjSh && pObjSh->GetProgress()) )
|
||||
|
@ -1270,7 +1277,6 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
|
|||
delete pShadCrsr, pShadCrsr = 0;
|
||||
aKeyInputFlushTimer.Stop();
|
||||
|
||||
SwWrtShell &rSh = rView.GetWrtShell();
|
||||
sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
|
||||
rSh.IsCrsrReadonly();
|
||||
|
||||
|
|
Loading…
Reference in a new issue