libreoffice/avoid-wrong-asserts.diff
Stephan Kulow 601058e269 Accepting request 89119 from LibreOffice:Unstable
- correctly-init-xthreads-in-qt.diff: let Qt call XInitThreads(),
  so that it knows it's been called (fdo#40298)
- avoid-wrong-asserts.diff: fix a bad assert; the following fix depends on it
- horizontal-scrollbars-with-kde-oxygen-style.diff: horizontal scrollbars with
  KDE Oxygen style (bnc#722918)

- kde4-tooltips-style.diff: tooltips are all black in KDE4 (bnc#723074,
  fdo#40461)
- do-not-display-math-in-desktop-menu.diff: do not display math in desktop
  menu (fdo#41681)
- desktop-submenu.diff: display LO application in the right desktop submenu
  (bnc#718694)
- bash-completion-for-loffice.diff: define bash completion for 'loffice'
  wrapper (bnc#719656)

- legacy-fragment-import-*.diff: legacy fragment PPTX import (bnc#699334)

OBS-URL: https://build.opensuse.org/request/show/89119
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=25
2011-10-24 10:37:06 +00:00

33 lines
1.8 KiB
Diff

commit 1db482f38fb4b0f311bd414d7c9db9f67ede5855
Author: Luboš Luňák <l.lunak@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 04f71bf..5075db4 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