[Libreoffice] [PATCH] follow-up of fdo#30788: fix showing of unnecessary empty horizontal scrollbar

Ivan Timofeev timofeev.i.s at gmail.com
Sun Jan 29 03:01:22 PST 2012


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


More information about the LibreOffice mailing list