[Libreoffice-commits] .: vcl/unx
Lubos Lunak
llunak at kemper.freedesktop.org
Fri Apr 15 04:22:41 PDT 2011
vcl/unx/kde4/KDESalGraphics.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 991d492b84c342c85d0126ca9a2f080f1d511ad5
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Fri Apr 15 13:18:50 2011 +0200
avoid OSL_ASSERT that is actually never true
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 749fbf0..8334a52 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -901,14 +901,14 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart p
if( part == PART_TRACK_VERT_AREA || part == PART_TRACK_HORZ_AREA )
{
QStyleOptionSlider option;
- OSL_ASSERT( val.getType() == CTRL_SCROLLBAR );
- const ScrollbarValue* sbVal = static_cast<const ScrollbarValue *>(&val);
option.orientation = ( part == PART_TRACK_HORZ_AREA ) ? Qt::Horizontal : Qt::Vertical;
- option.minimum = sbVal->mnMin;
- option.maximum = sbVal->mnMax;
- option.sliderValue = sbVal->mnCur;
- option.sliderPosition = sbVal->mnCur;
- option.pageStep = sbVal->mnVisibleSize;
+ // getNativeControlRegion usually gets ImplControlValue as 'val' (i.e. not the proper
+ // subclass), so use random sensible values (doesn't matter anyway, as the wanted
+ // geometry here depends only on button sizes)
+ option.maximum = 10;
+ option.minimum = 0;
+ option.sliderPosition = option.sliderValue = 4;
+ option.pageStep = 2;
// Adjust coordinates to make the widget appear to be at (0,0), i.e. make
// widget and screen coordinates the same. QStyle functions should use screen
// coordinates but at least QPlastiqueStyle::subControlRect() is buggy
More information about the Libreoffice-commits
mailing list