[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Nov 18 00:39:35 PST 2015
sw/source/core/layout/pagechg.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit a23f85f171634732359fc7e4d932a6ff11905c9a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Nov 18 09:33:55 2015 +0100
tdf#95888 sw: make click to header area show header controls again
Regression from commit 54a2c8c006e2f216e9d8c6b0ed625180c843c48b
(tdf#39080 Interactive hide-whitespace mode, 2015-08-30), the problem
was that SwPageFrm::IsOverHeaderFooterArea() checked if the header is
active before accepting that the user clicked in that area.
Don't require an active header at least in non-hide-whitespace mode, as
the member function is used in the "could there be a header here" sense
in SwEditWin::MouseButtonDown() to show the controls that allows
actually adding a header.
Change-Id: I6f905920113aed1512e333e718a8f26d88a3245d
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 4a43457..80b2846 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -2261,9 +2261,11 @@ bool SwPageFrm::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rCon
SwRect aHeaderArea( Frm().TopLeft(),
Size( Frm().Width(), nUpperLimit - Frm().Top() ) );
+ SwViewShell* pViewShell = getRootFrm()->GetCurrShell();
+ bool bHideWhitespaceMode = pViewShell->GetViewOptions()->IsHideWhitespaceMode();
if ( aHeaderArea.IsInside( rPt ) )
{
- if (static_cast<const SwFrameFormat*>(GetRegisteredIn())->GetHeader().IsActive())
+ if (static_cast<const SwFrameFormat*>(GetRegisteredIn())->GetHeader().IsActive() || !bHideWhitespaceMode)
{
rControl = Header;
return true;
@@ -2275,7 +2277,7 @@ bool SwPageFrm::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rCon
Size( Frm().Width(), Frm().Bottom() - nLowerLimit ) );
if ( aFooterArea.IsInside( rPt ) &&
- static_cast<const SwFrameFormat*>(GetRegisteredIn())->GetFooter().IsActive() )
+ (static_cast<const SwFrameFormat*>(GetRegisteredIn())->GetFooter().IsActive() || !bHideWhitespaceMode) )
{
rControl = Footer;
return true;
More information about the Libreoffice-commits
mailing list