[libreoffice] fix patch to apply

Caolán McNamara caolanm at fedoraproject.org
Fri Nov 11 15:07:33 UTC 2011


commit 1f9e5c7746267730f9aefc4b6e90ff47aa3dd032
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 11 15:07:28 2011 +0000

    fix patch to apply

 ...tal-scrollbars-with-KDE-oxygen-style-bnc-.patch |   22 ++++++++++----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/0001-fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch b/0001-fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch
index 223f582..60ea617 100644
--- a/0001-fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch
+++ b/0001-fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch
@@ -1,4 +1,4 @@
-From 936d19e606cbf29d41bff42db559a01f5deb240c Mon Sep 17 00:00:00 2001
+From 082ecb53a9077b6ae01ce66237f48d88bcb0cc00 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak at suse.cz>
 Date: Thu, 20 Oct 2011 19:05:13 +0200
 Subject: [PATCH] fix horizontal scrollbars with KDE oxygen style (bnc#722918)
@@ -10,13 +10,13 @@ is horizontal.
  1 files changed, 13 insertions(+), 6 deletions(-)
 
 diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
-index 5dbe491..60cd4ed 100644
+index 749fbf0..b09fe53 100644
 --- a/vcl/unx/kde4/KDESalGraphics.cxx
 +++ b/vcl/unx/kde4/KDESalGraphics.cxx
 @@ -493,10 +493,9 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
              if (sbVal->mnVisibleSize < sbVal->mnMax)
                  option.state = QStyle::State_MouseOver;
- 
+             
 -            //horizontal or vertical
 -            if (part == PART_DRAW_BACKGROUND_VERT)
 -                option.orientation = Qt::Vertical;
@@ -25,7 +25,7 @@ index 5dbe491..60cd4ed 100644
 +            option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical;
 +            if( horizontal )
                  option.state |= QStyle::State_Horizontal;
- 
+             
              //setup parameters from the OO values
 @@ -592,7 +591,10 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
          option.maximum     = slVal->mnMax;
@@ -36,21 +36,21 @@ index 5dbe491..60cd4ed 100644
 +        option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical;
 +        if( horizontal )
 +            option.state |= QStyle::State_Horizontal;
- 
+         
          draw( QStyle::CC_Slider, &option, m_image, vclStateValue2StateFlag(nControlState, value) );
      }
-@@ -901,7 +903,10 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart p
-             if( part == PART_TRACK_VERT_AREA || part == PART_TRACK_HORZ_AREA )
-             {
+@@ -903,7 +905,10 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart p
                  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;
 +                bool horizontal = ( part == PART_TRACK_HORZ_AREA ); //horizontal or vertical
 +                option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical;
 +                if( horizontal )
 +                    option.state |= QStyle::State_Horizontal;
-                 // 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.minimum = sbVal->mnMin;
+                 option.maximum = sbVal->mnMax;
+                 option.sliderValue = sbVal->mnCur;
 @@ -971,6 +976,8 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP
          rect.moveTo( 0, 0 );
          QStyleOptionSlider options;


More information about the scm-commits mailing list