diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-21 16:07:34 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-23 20:21:22 +0100 |
commit | 289185fd02d6d9734b6dbde01f15c4e6c5beacbb (patch) | |
tree | 56b8aafcfdd3ddf0ff431252a4a5559219cf3649 /sw/source/ui/docvw/edtwin.cxx | |
parent | e1b59fc0c4124457d4a1d29c6c4cc222ef665518 (diff) |
Header/Footer: fixed click on frames over the header/footer area.
The main problem here was due to the click to show the separator when
there is no header or footer under the frame. That code was just exiting
MouseButtonDown too early, which isn't good.
Moved the seperators showing code out of the SwCrsrShell as it has no
clue about the document-position and may lead to problems.
Change-Id: Ia62333b52c5d0659bbe7ec4fcfe6e664db132435
Diffstat (limited to 'sw/source/ui/docvw/edtwin.cxx')
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 1565d13aff4e..ab08495c07e1 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2848,8 +2848,33 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // Repaint everything Invalidate(); + } + else + { + // Make sure we have the proper Header/Footer separators shown + // as these may be changed if clicking on an empty Header/Footer + rSh.SetShowHeaderFooterSeparator( Header, eControl == Header ); + rSh.SetShowHeaderFooterSeparator( Footer, eControl == Footer ); - return; + if ( !rSh.IsHeaderFooterEdit() ) + rSh.ToggleHeaderFooterEdit(); + + // Repaint everything + rSh.GetWin()->Invalidate(); + } + } + else + { + if ( rSh.IsHeaderFooterEdit( ) ) + rSh.ToggleHeaderFooterEdit( ); + else + { + // Make sure that the separators are hidden + rSh.SetShowHeaderFooterSeparator( Header, false ); + rSh.SetShowHeaderFooterSeparator( Footer, false ); + + // Repaint everything + rSh.GetWin()->Invalidate(); } } |