[Libreoffice-commits] .: 2 commits - vcl/unx

Lubos Lunak llunak at kemper.freedesktop.org
Mon Mar 21 08:48:57 PDT 2011


 vcl/unx/kde4/KDESalFrame.cxx    |   10 +++++-----
 vcl/unx/kde4/KDESalFrame.hxx    |    2 +-
 vcl/unx/kde4/KDESalGraphics.cxx |   30 +++++++++++++++---------------
 vcl/unx/kde4/KDESalGraphics.hxx |   12 ++++++------
 4 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 28b621637fc9fc60cda91d248d66706b04afdde3
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Mar 21 16:48:35 2011 +0100

    pClipRegion_ has been apparently renamed to mpClipRegion

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 7e703bf..3b9a13c 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -626,12 +626,12 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
         // See XRegionToQRegion() comment for a small catch (although not real hopefully).
         QPixmap destPixmap = QPixmap::fromX11Pixmap( GetDrawable(), QPixmap::ExplicitlyShared );
         QPainter paint( &destPixmap );
-        if( clipRegion && pClipRegion_ )
-            paint.setClipRegion( clipRegion->intersected( XRegionToQRegion( pClipRegion_ )));
+        if( clipRegion && mpClipRegion )
+            paint.setClipRegion( clipRegion->intersected( XRegionToQRegion( mpClipRegion )));
         else if( clipRegion )
             paint.setClipRegion( *clipRegion );
-        else if( pClipRegion_ )
-            paint.setClipRegion( XRegionToQRegion( pClipRegion_ ));
+        else if( mpClipRegion )
+            paint.setClipRegion( XRegionToQRegion( mpClipRegion ));
         paint.drawImage( widgetRect.left(), widgetRect.top(), *m_image,
             0, 0, widgetRect.width(), widgetRect.height(),
             Qt::ColorOnly | Qt::OrderedDither | Qt::OrderedAlphaDither );
@@ -652,8 +652,8 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
                     xr.height = r.height();
                     XUnionRectWithRegion( &xr, pTempClipRegion, pTempClipRegion );
                 }
-                if( pClipRegion_ )
-                    XIntersectRegion( pTempClipRegion, pClipRegion_, pTempClipRegion );
+                if( mpClipRegion )
+                    XIntersectRegion( pTempClipRegion, mpClipRegion, pTempClipRegion );
                 XSetRegion( GetXDisplay(), gc, pTempClipRegion );
             }
             QPixmap pixmap = QPixmap::fromImage(*m_image, Qt::ColorOnly | Qt::OrderedDither | Qt::OrderedAlphaDither);
@@ -664,8 +664,8 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
             
             if( pTempClipRegion )
             {
-                if( pClipRegion_ )
-                    XSetRegion( GetXDisplay(), gc, pClipRegion_ );
+                if( mpClipRegion )
+                    XSetRegion( GetXDisplay(), gc, mpClipRegion );
                 else
                     XSetClipMask( GetXDisplay(), gc, None );
                 XDestroyRegion( pTempClipRegion );
commit bb87041fe5f6cf4e91f1228b2f49a4d20378ac1c
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Mar 21 16:30:57 2011 +0100

    BOOL -> sal_Bool, get rid of useless and removed BYTE

diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 879d28a..cde99fc 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -62,7 +62,7 @@ KDESalFrame::KDESalFrame( SalFrame* pParent, sal_uLong nState ) :
 {
 }
 
-void KDESalFrame::Show( BOOL bVisible, BOOL bNoActivate )
+void KDESalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
 {
     if ( !GetParent() && ! (GetStyle() & SAL_FRAME_STYLE_INTRO) )
     {
@@ -180,7 +180,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
 void KDESalFrame::UpdateSettings( AllSettings& rSettings )
 {
     StyleSettings style( rSettings.GetStyleSettings() );
-    BOOL bSetTitleFont = false;
+    sal_Bool bSetTitleFont = false;
     
     // General settings
     QPalette pal = kapp->palette();
@@ -275,9 +275,9 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
     {
         Color aColor2 = style.GetLightColor();
         style.
-            SetCheckedColor( Color( (BYTE)(((sal_uInt16)aBack.GetRed()+(sal_uInt16)aColor2.GetRed())/2),
-                        (BYTE)(((sal_uInt16)aBack.GetGreen()+(sal_uInt16)aColor2.GetGreen())/2),
-                        (BYTE)(((sal_uInt16)aBack.GetBlue()+(sal_uInt16)aColor2.GetBlue())/2)
+            SetCheckedColor( Color( (((sal_uInt16)aBack.GetRed()+(sal_uInt16)aColor2.GetRed())/2),
+                        (((sal_uInt16)aBack.GetGreen()+(sal_uInt16)aColor2.GetGreen())/2),
+                        (((sal_uInt16)aBack.GetBlue()+(sal_uInt16)aColor2.GetBlue())/2)
                         ) );
     }
 
diff --git a/vcl/unx/kde4/KDESalFrame.hxx b/vcl/unx/kde4/KDESalFrame.hxx
index 58cf308..699a0df 100644
--- a/vcl/unx/kde4/KDESalFrame.hxx
+++ b/vcl/unx/kde4/KDESalFrame.hxx
@@ -55,7 +55,7 @@ class KDESalFrame : public X11SalFrame
         virtual void ReleaseGraphics( SalGraphics *pGraphics );
         virtual void updateGraphics( bool bClear );
         virtual void UpdateSettings( AllSettings& rSettings );
-        virtual void Show( BOOL bVisible, BOOL bNoActivate );
+        virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate );
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 9c16ff9..7e703bf 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -102,7 +102,7 @@ KDESalGraphics::~KDESalGraphics()
         delete m_image;
 }
 
-BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
+sal_Bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
 {
     if (type == CTRL_PUSHBUTTON) return true;
     
@@ -161,9 +161,9 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
     aPos was or was not inside the native widget specified by the
     nType/nPart combination.
 */
-BOOL KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
+sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
                                            const Rectangle& rControlRegion, const Point& rPos,
-                                           BOOL& rIsInside )
+                                           sal_Bool& rIsInside )
 {
     if ( nType == CTRL_SCROLLBAR )
     {
@@ -303,7 +303,7 @@ static QRegion XRegionToQRegion( XLIB_Region xr )
 }
 #endif
 
-BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
+sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
                                         const Rectangle& rControlRegion, ControlState nControlState,
                                         const ImplControlValue& value,
                                         const OUString& )
@@ -314,7 +314,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
         return false;
     }
     
-    BOOL returnVal = true;
+    sal_Bool returnVal = true;
 
     QRect widgetRect = region2QRect(rControlRegion);
     if( type == CTRL_SPINBOX && part == PART_ALL_BUTTONS )
@@ -679,13 +679,13 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
     return returnVal;
 }
 
-BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
+sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
                                              const Rectangle& controlRegion, ControlState controlState,
                                              const ImplControlValue& val,
                                              const OUString&,
                                              Rectangle &nativeBoundingRegion, Rectangle &nativeContentRegion )
 {
-    bool retVal = false;
+    sal_Bool retVal = false;
     
     QRect boundingRect = region2QRect( controlRegion );
     QRect contentRect = boundingRect;
diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx
index b9f4ec1..55697e4 100644
--- a/vcl/unx/kde4/KDESalGraphics.hxx
+++ b/vcl/unx/kde4/KDESalGraphics.hxx
@@ -51,16 +51,16 @@ class KDESalGraphics : public X11SalGraphics
             @param part Specification of the widget's part if it consists of more than one.
             @return true if the platform supports native drawing of the widget type defined by part.
         */
-        virtual BOOL IsNativeControlSupported( ControlType type, ControlPart part );
+        virtual sal_Bool IsNativeControlSupported( ControlType type, ControlPart part );
         
         /** Test whether the position is in the native widget.
             If the return value is TRUE, bIsInside contains information whether
             aPos was or was not inside the native widget specified by the
             type/part combination.
         */
-        virtual BOOL hitTestNativeControl( ControlType type, ControlPart part,
+        virtual sal_Bool hitTestNativeControl( ControlType type, ControlPart part,
                                         const Rectangle& rControlRegion, const Point& aPos,
-                                        BOOL& rIsInside );
+                                        sal_Bool& rIsInside );
         /** Draw the requested control described by part/nControlState.
         
             @param rControlRegion
@@ -72,7 +72,7 @@ class KDESalGraphics : public X11SalGraphics
             @param aCaption
             A caption or title string (like button text etc.)
         */
-        virtual BOOL drawNativeControl( ControlType type, ControlPart part,
+        virtual sal_Bool drawNativeControl( ControlType type, ControlPart part,
                                         const Rectangle& rControlRegion, ControlState nControlState,
                                         const ImplControlValue& aValue,
                                         const rtl::OUString& aCaption );
@@ -85,7 +85,7 @@ class KDESalGraphics : public X11SalGraphics
             @param aValue An optional value (tristate/numerical/string)
             @param aCaption	A caption or title string (like button text etc.)
         */
-        virtual BOOL drawNativeControlText( ControlType, ControlPart,
+        virtual sal_Bool drawNativeControlText( ControlType, ControlPart,
                                             const Rectangle&, ControlState,
                                             const ImplControlValue&,
                                             const rtl::OUString& ) { return false; }
@@ -106,7 +106,7 @@ class KDESalGraphics : public X11SalGraphics
             @param aCaption
             A caption or title string (like button text etc.)
         */
-        virtual BOOL getNativeControlRegion( ControlType type, ControlPart part,
+        virtual sal_Bool getNativeControlRegion( ControlType type, ControlPart part,
                                             const Rectangle& rControlRegion, ControlState nControlState,
                                             const ImplControlValue& aValue,
                                             const rtl::OUString& aCaption,


More information about the Libreoffice-commits mailing list