Kaydet (Commit) a60c0d79 authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#95888 sw: make click to header area show header controls again

Regression from commit 54a2c8c0
(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
(cherry picked from commit a23f85f1)
üst 7ffb5349
......@@ -2254,9 +2254,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;
......@@ -2268,7 +2270,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;
......
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