From 85161bda9987a54d60ecefaed7d5ca47da17356d Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 4 Mar 2011 16:37:53 +0100 Subject: [PATCH] masterfix DEV300: KDE vs. tooltypes --- vcl/unx/kde4/KDEData.cxx | 2 +- vcl/unx/kde4/KDEData.hxx | 2 +- vcl/unx/kde4/KDESalDisplay.cxx | 2 +- vcl/unx/kde4/KDESalFrame.cxx | 16 +++++++++------- vcl/unx/kde4/KDESalFrame.hxx | 6 +++--- vcl/unx/kde4/KDESalGraphics.cxx | 22 +++++++++++----------- vcl/unx/kde4/KDESalGraphics.hxx | 14 +++++++------- vcl/unx/kde4/KDESalInstance.cxx | 4 ++-- vcl/unx/kde4/KDESalInstance.hxx | 4 ++-- vcl/unx/kde4/KDEXLib.cxx | 2 +- vcl/unx/kde4/VCLKDEApplication.cxx | 2 +- vcl/unx/kde4/VCLKDEApplication.hxx | 2 +- 12 files changed, 40 insertions(+), 38 deletions(-) diff --git a/vcl/unx/kde4/KDEData.cxx b/vcl/unx/kde4/KDEData.cxx index 99871edadae3..dcf1db32068e 100644 --- a/vcl/unx/kde4/KDEData.cxx +++ b/vcl/unx/kde4/KDEData.cxx @@ -51,4 +51,4 @@ void KDEData::initNWF() void KDEData::deInitNWF() { -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/KDEData.hxx b/vcl/unx/kde4/KDEData.hxx index 7cf5836c9688..6daa0c81a4fb 100644 --- a/vcl/unx/kde4/KDEData.hxx +++ b/vcl/unx/kde4/KDEData.hxx @@ -39,4 +39,4 @@ class KDEData : public X11SalData virtual void Init(); virtual void initNWF(); virtual void deInitNWF(); -}; \ No newline at end of file +}; diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx index d67399528a7c..41fa9fedde3f 100644 --- a/vcl/unx/kde4/KDESalDisplay.cxx +++ b/vcl/unx/kde4/KDESalDisplay.cxx @@ -42,4 +42,4 @@ SalKDEDisplay::~SalKDEDisplay() doDestruct(); // prevent SalDisplay from closing KApplication's display pDisp_ = NULL; -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx index 0c8f04f9fe41..abd1dc993f9e 100644 --- a/vcl/unx/kde4/KDESalFrame.cxx +++ b/vcl/unx/kde4/KDESalFrame.cxx @@ -56,12 +56,12 @@ #include #endif -KDESalFrame::KDESalFrame( SalFrame* pParent, ULONG nState ) : +KDESalFrame::KDESalFrame( SalFrame* pParent, sal_uLong nState ) : X11SalFrame( pParent, nState ) { } -void KDESalFrame::Show( BOOL bVisible, BOOL bNoActivate ) +void KDESalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate ) { if ( !GetParent() && ! (GetStyle() & SAL_FRAME_STYLE_INTRO) ) { @@ -86,12 +86,14 @@ static OUString readEntryUntranslated( KConfigGroup *pGroup, const char *pKey ) return OUString::createFromAscii( (const char *) pGroup->readEntryUntranslated( pKey ).toAscii() ); } +#if 0 /** Helper function to read color from KConfig configuration repository. */ static Color readColor( KConfigGroup *pGroup, const char *pKey ) { return toColor( pGroup->readEntry( pKey, QColor(Qt::white) ) ); } +#endif /** Helper function to add information to Font from QFont. @@ -179,7 +181,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; + bool bSetTitleFont = false; // General settings QPalette pal = kapp->palette(); @@ -272,9 +274,9 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) { Color aColor2 = style.GetLightColor(); style. - SetCheckedColor( Color( (BYTE)(((USHORT)aBack.GetRed()+(USHORT)aColor2.GetRed())/2), - (BYTE)(((USHORT)aBack.GetGreen()+(USHORT)aColor2.GetGreen())/2), - (BYTE)(((USHORT)aBack.GetBlue()+(USHORT)aColor2.GetBlue())/2) + SetCheckedColor( Color( (sal_uInt8)(((sal_uInt16)aBack.GetRed()+(sal_uInt16)aColor2.GetRed())/2), + (sal_uInt8)(((sal_uInt16)aBack.GetGreen()+(sal_uInt16)aColor2.GetGreen())/2), + (sal_uInt8)(((sal_uInt16)aBack.GetBlue()+(sal_uInt16)aColor2.GetBlue())/2) ) ); } @@ -402,4 +404,4 @@ SalGraphics* KDESalFrame::GetGraphics() } return NULL; -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/KDESalFrame.hxx b/vcl/unx/kde4/KDESalFrame.hxx index 643be72c27f3..6ea6f6ef283e 100644 --- a/vcl/unx/kde4/KDESalFrame.hxx +++ b/vcl/unx/kde4/KDESalFrame.hxx @@ -47,12 +47,12 @@ class KDESalFrame : public X11SalFrame GraphicsHolder m_aGraphics[ nMaxGraphics ]; public: - KDESalFrame( SalFrame* pParent, ULONG nStyle ); + KDESalFrame( SalFrame* pParent, sal_uLong nStyle ); virtual ~KDESalFrame(); virtual SalGraphics* GetGraphics(); virtual void ReleaseGraphics( SalGraphics *pGraphics ); virtual void updateGraphics( bool bClear ); virtual void UpdateSettings( AllSettings& rSettings ); - virtual void Show( BOOL bVisible, BOOL bNoActivate ); -}; \ No newline at end of file + virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate ); +}; diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index 5a5cd11c52d9..9b37bf5e8e2a 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -100,7 +100,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; @@ -154,9 +154,9 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par return false; } -BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart, +sal_Bool KDESalGraphics::hitTestNativeControl( ControlType, ControlPart, const Rectangle&, const Point&, - BOOL& ) + sal_Bool& ) { return FALSE; } @@ -232,7 +232,7 @@ namespace } } -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& ) @@ -243,7 +243,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 ) @@ -562,8 +562,8 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, { if( 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); @@ -574,8 +574,8 @@ 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 ); } @@ -589,7 +589,7 @@ 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&, @@ -769,7 +769,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, if( part == PART_BORDER ) { int nFrameWidth = getFrameWidth(); - USHORT nStyle = val.getNumericVal(); + sal_uInt16 nStyle = val.getNumericVal(); if( nStyle & FRAME_DRAW_NODRAW ) { // in this case the question is: how thick would a frame be diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx index 0bce1700f1fc..92b9a6b676a0 100644 --- a/vcl/unx/kde4/KDESalGraphics.hxx +++ b/vcl/unx/kde4/KDESalGraphics.hxx @@ -50,16 +50,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 @@ -71,7 +71,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 ); @@ -84,7 +84,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; } @@ -105,9 +105,9 @@ 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, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); -}; \ No newline at end of file +}; diff --git a/vcl/unx/kde4/KDESalInstance.cxx b/vcl/unx/kde4/KDESalInstance.cxx index 01c4723bd530..c8d0858279f3 100644 --- a/vcl/unx/kde4/KDESalInstance.cxx +++ b/vcl/unx/kde4/KDESalInstance.cxx @@ -29,7 +29,7 @@ #include "KDESalFrame.hxx" -SalFrame* KDESalInstance::CreateFrame( SalFrame *pParent, ULONG nState ) +SalFrame* KDESalInstance::CreateFrame( SalFrame *pParent, sal_uLong nState ) { return new KDESalFrame( pParent, nState ); -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/KDESalInstance.hxx b/vcl/unx/kde4/KDESalInstance.hxx index 7d050fe6819e..91907e586b0c 100644 --- a/vcl/unx/kde4/KDESalInstance.hxx +++ b/vcl/unx/kde4/KDESalInstance.hxx @@ -37,5 +37,5 @@ class KDESalInstance : public X11SalInstance public: KDESalInstance( SalYieldMutex* pMutex ) : X11SalInstance( pMutex ) {} virtual ~KDESalInstance() {} - virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle ); -}; \ No newline at end of file + virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle ); +}; diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index 6a2793b8abe3..3fb2bcaf487d 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -102,7 +102,7 @@ void KDEXLib::Init() //kAboutData->setProgramIconName("OpenOffice"); m_nFakeCmdLineArgs = 1; - USHORT nIdx; + int nIdx; vos::OExtCommandLine aCommandLine; int nParams = aCommandLine.getCommandArgCount(); rtl::OString aDisplay; diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx index 2cfb071e96ae..5e3a85256313 100644 --- a/vcl/unx/kde4/VCLKDEApplication.cxx +++ b/vcl/unx/kde4/VCLKDEApplication.cxx @@ -49,4 +49,4 @@ bool VCLKDEApplication::x11EventFilter(XEvent* event) } return false; -} \ No newline at end of file +} diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx index 2edfddd69a9c..7cbbe38b61df 100644 --- a/vcl/unx/kde4/VCLKDEApplication.hxx +++ b/vcl/unx/kde4/VCLKDEApplication.hxx @@ -50,4 +50,4 @@ class VCLKDEApplication : public KApplication virtual bool x11EventFilter(XEvent* event); SalKDEDisplay* disp; -}; \ No newline at end of file +};