Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi all,

perhaps you have noted, that Writer shows unnecessary empty horizontal scrollbar, when you run it:
https://bugs.freedesktop.org/attachment.cgi?id=55581

Previously, Writer didn't show horizontal scrollbar at the start when it was needed, then Cedric had fixed this bug with
http://cgit.freedesktop.org/libreoffice/core/commit/?id=d38a56fcf0cd3052f44d6de5157fe8ef8cec3e36
but that caused the mentioned defect.


I have created the patch, but there are some obscure things, that I'm unable to understand (yes, I have said it once again):

sw/source/ui/inc/scroll.hxx:

    sal_Bool    bVisible    :1;     // show/hide should only set this flag

what is the reason to have this flag? Why only set this flag without actually showing? And why not change this flag accordingly when actually showing? (This is what the patch fixes.)

and

sal_Bool IsVisible(sal_Bool bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }

Is really visible or just set bVisible. What is the madness?


I hope that my patches & questions don't cause your desire for tell me to get lost. :)

Best Wishes,
Ivan
From 1f1972b3c8cfe20c9b2eb49749d9944a24e15b00 Mon Sep 17 00:00:00 2001
From: Ivan Timofeev <timofeev.i.s@gmail.com>
Date: Sun, 29 Jan 2012 14:08:54 +0400
Subject: [PATCH] follow-up of fdo#30788: fix showing of unnecessary empty
 horizontal scrollbar

---
 sw/source/ui/uiview/scroll.cxx |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index 2bf1d6d..8160852 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -131,10 +131,12 @@ void SwScrollbar::AutoShow()
         {
             if(ScrollBar::IsVisible())
                 ScrollBar::Show(sal_False);
+            bVisible = sal_False;
         }
         else if ( !ScrollBar::IsVisible() )
         {
             ScrollBar::Show(sal_True);
+            bVisible = sal_True;
         }
 }
 
-- 
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.