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

Caolán McNamara caolanm at redhat.com
Mon Jan 30 09:08:08 PST 2012

On Sun, 2012-01-29 at 15:01 +0400, Ivan Timofeev wrote:
> 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.)

Digging into the git history it looks like a collection of various
cumulative errors.

The original code with...
git show 7b0b5cdf source/ui/inc/scroll.hxx source/ui/uiview/scroll.cxx
it seems that this SwScrollbar had its own SwScrollbar::Show method and
inherits from Window which has a Window::Show method as well. The
Window::Show isn't virtual, so it was just an unfortunately named
wrapper method that only works if called directly.

git show 5eeb54d5 then appears to replace a lot of "Show" with
Scrollbar::Show so various code paths that used to go through the
Wrapper method no longer do, but go direct to the baseclass Show.

02a9026b then comes along and fixes the warning that SwScrollbar::Show
hides the Window::Show by renaming it ExtendedShow

So... at the lines where we currently have ScrollBar::Show, where your
patch adds bVisible = ..., the code used to call what is now
"ExtendedShow" which sets bVisible = ... as well as some other stuff.

At this stage it's a mangled train-wreck and e.g. changing the
SwScrollbar::Show lines (except the one inside SwScrollbar::Show itself)
back to ExtendedShow might trigger another pile of bugs.


More information about the LibreOffice mailing list