<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Optionally disable floating header/footer menu"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=118621#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Optionally disable floating header/footer menu"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=118621">bug 118621</a>
from <span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span></b>
<pre>(In reply to Heiko Tietze from <a href="show_bug.cgi?id=118621#c10">comment #10</a>)
Sigh, I'd prefer to not solve easy hacks for "newbies", because - well, easy
hack is expected to allow a newcomer to do something not too dull, and at the
same time not too difficult, but...
The top of call stack at the breakpoint:
<span class="quote">> swlo.dll!SwHeaderFooterWin::SwHeaderFooterWin(SwEditWin * pEditWin, const SwFrame * pFrame, bool bHeader) Line 138
> at c:\lo\src\core\sw\source\uibase\docvw\headerfooterwin.cxx(138)
> swlo.dll!VclPtr<SwHeaderFooterWin>::Create<VclPtr<SwEditWin> &,SwPageFrame const * &,bool const &>(VclPtr<SwEditWin> & <arg_0>, const SwPageFrame * & <arg_1>, const bool & <arg_2>) Line 135
> at c:\lo\src\core\include\vcl\vclptr.hxx(135)
> swlo.dll!SwFrameControlsManager::SetHeaderFooterControl(const SwPageFrame * pPageFrame, FrameControlType eType, Point aOffset) Line 107
> at c:\lo\src\core\sw\source\uibase\docvw\framecontrolsmanager.cxx(107)
> swlo.dll!SwPageFrame::PaintDecorators() Line 3679
> at c:\lo\src\core\sw\source\core\layout\paintfrm.cxx(3679)
> swlo.dll!SwRootFrame::PaintSwFrame(OutputDevice & rRenderContext, const SwRect & rRect, const SwPrintData * const pPrintData) Line 3191
> at c:\lo\src\core\sw\source\core\layout\paintfrm.cxx(3191)
> ...</span >
Of course, there's no reason to change something below
SwRootFrame::PaintSwFrame, because this method is generic enough (it isn't
specific to creation of the controls, but paints the whole frame, as its name
suggests). None of its callers would have good knowledge whether (or how) to
create those controls.
SwRootFrame::PaintSwFrame itself doesn't directly create those controls, but
calls SwPageFrame::PaintDecorators, which does many other kinds of things - so
no reason to place the check in SwRootFrame::PaintSwFrame, too: too far from
the actual place of controls creation.
The latter (SwPageFrame::PaintDecorators) calls
SwFrameControlsManager::SetHeaderFooterControl, which is specifically created
to do what we want to manage. So - it's natural to think the two places for
performing the check: either in places where
SwFrameControlsManager::SetHeaderFooterControl is called (grepping for
"SetHeaderFooterControl" gives only two such places, both in the same function)
- so just calling it conditionally; or inside
SwFrameControlsManager::SetHeaderFooterControl, doing the check and exiting
early.
These two options are both acceptable, and a newbie could propose a change with
any of them (and then we'd discuss pros and contras in the gerrit change)...
just telling "I can't" and me writing all this means spoiling the whole easy
hack, effectively because me doing all that the newcomer was expected to do.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>