[PATCH] follow-up of fdo#30788: fix showing of unnecessary empty horizontal scrollbar
Ivan Timofeev
timofeev.i.s at gmail.com
Thu Feb 9 09:38:26 PST 2012
Hi,
actually there was not a scrollbar appearing at the bottom, there was a
border. :)
The root cause lives in sw/source/ui/uiview/viewport.cxx,
SwView::CalcAndSetBorderPixel.
The code is:
//#i32913# in browse mode the visibility of the horizontal scrollbar
// depends on the content (fixed width tables may require a scrollbar)
if (
pHScrollbar->IsVisible(pWrtShell->GetViewOptions()->getBrowseMode()) )
rToFill.Bottom() = nTmp;
so in normal mode we use IsVisible(false), that checks for
SwScrollbar::bVisible, regardless of the real visibility. The next line:
SetBorderPixel( rToFill );
passes rToFill to SfxViewFrame::SetBorderPixelImpl, where it is used for
some window size manipulations... Use of IsVisible(true), that checks
for the real visibility, fixes the problem. The patch is attached.
Please tell me what do you think about it. :)
Another question is why in the code above there is
pVScrollbar->IsVisible(sal_False)
for the vertical scrollbar. I don't know. If this condition is true,
then the right border should be set:
rToFill.Right() = nTmp;
But even if you move that line to the outside of the condition, there is
no any visual effect, no any right border. What fun! :)
Best Regards,
Ivan
More information about the LibreOffice
mailing list