masterfix DEV300: KDE vs. tooltypes
This commit is contained in:
parent
ab9a9cc0b4
commit
85161bda99
12 changed files with 40 additions and 38 deletions
|
@ -51,4 +51,4 @@ void KDEData::initNWF()
|
|||
|
||||
void KDEData::deInitNWF()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,4 +39,4 @@ class KDEData : public X11SalData
|
|||
virtual void Init();
|
||||
virtual void initNWF();
|
||||
virtual void deInitNWF();
|
||||
};
|
||||
};
|
||||
|
|
|
@ -42,4 +42,4 @@ SalKDEDisplay::~SalKDEDisplay()
|
|||
doDestruct();
|
||||
// prevent SalDisplay from closing KApplication's display
|
||||
pDisp_ = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,12 +56,12 @@
|
|||
#include <stdio.h>
|
||||
#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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
};
|
||||
virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate );
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,5 +37,5 @@ class KDESalInstance : public X11SalInstance
|
|||
public:
|
||||
KDESalInstance( SalYieldMutex* pMutex ) : X11SalInstance( pMutex ) {}
|
||||
virtual ~KDESalInstance() {}
|
||||
virtual SalFrame* CreateFrame( SalFrame* pParent, ULONG nStyle );
|
||||
};
|
||||
virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -49,4 +49,4 @@ bool VCLKDEApplication::x11EventFilter(XEvent* event)
|
|||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,4 +50,4 @@ class VCLKDEApplication : public KApplication
|
|||
virtual bool x11EventFilter(XEvent* event);
|
||||
|
||||
SalKDEDisplay* disp;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue