[Libreoffice-commits] .: vcl/unx
Lubos Lunak
llunak at kemper.freedesktop.org
Wed Nov 3 07:19:15 PDT 2010
vcl/unx/kde4/KDESalGraphics.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit d42051f432e18a9fef601dba50b873740ce15258
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Wed Nov 3 15:17:33 2010 +0100
use sane scrollbar sizes when drawing
bnc#619772 leads to a crash because maximum = minimum = 0, and this
strange (but for whatever reason needed) '- mnVisibleSize' hack
makes maximum be -1, eventually leading to a crash
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 1689b28..fb8b3b9 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -441,6 +441,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
//setup parameters from the OO values
option.minimum = sbVal->mnMin;
option.maximum = sbVal->mnMax - sbVal->mnVisibleSize;
+ option.maximum = qMax( option.maximum, option.minimum ); // bnc#619772
option.sliderValue = sbVal->mnCur;
option.sliderPosition = sbVal->mnCur;
option.pageStep = sbVal->mnVisibleSize;
More information about the Libreoffice-commits
mailing list