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
From 7130fb70b63e076c493932966b3b4139ae236b6d Mon Sep 17 00:00:00 2001
From: Ivan Timofeev <timofeev.i.s@gmail.com>
Date: Thu, 9 Feb 2012 21:06:06 +0400
Subject: [PATCH] always use the *real* visibility of the SwScrollbar
---
sw/source/ui/uiview/viewport.cxx | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 2591b50..0e09076 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -840,9 +840,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
else
rToFill.Right() = nTmp;
}
- //#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()) )
+ if ( pHScrollbar->IsVisible(sal_True) )
rToFill.Bottom() = nTmp;
SetBorderPixel( rToFill );
--
1.7.8.3
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.