diff options
Diffstat (limited to 'vcl/unx/source/gdi')
-rw-r--r-- | vcl/unx/source/gdi/gcach_xpeer.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/source/gdi/pspgraphics.cxx | 58 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salbmp.cxx | 54 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salgdi.cxx | 180 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salgdi2.cxx | 28 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salgdi3.cxx | 36 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salprnpsp.cxx | 68 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salvd.cxx | 30 | ||||
-rw-r--r-- | vcl/unx/source/gdi/xfont.cxx | 6 |
9 files changed, 233 insertions, 233 deletions
diff --git a/vcl/unx/source/gdi/gcach_xpeer.cxx b/vcl/unx/source/gdi/gcach_xpeer.cxx index a69a2426b519..3d2af898c7e2 100644 --- a/vcl/unx/source/gdi/gcach_xpeer.cxx +++ b/vcl/unx/source/gdi/gcach_xpeer.cxx @@ -465,13 +465,13 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nR if( rServerFont.GetGlyphBitmap1( nGlyphIndex, maRawBitmap ) ) { // #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163 - ULONG nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1; + sal_uInt32 nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1; nPixmapWidth = Max( nPixmapWidth, maRawBitmap.mnWidth ); rGlyphData.SetSize( Size( nPixmapWidth, maRawBitmap.mnHeight ) ); rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset ); - const ULONG nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize; + const sal_uInt32 nBytes = maRawBitmap.mnHeight * maRawBitmap.mnScanlineSize; if( nBytes > 0 ) { // conversion table LSB<->MSB (for XCreatePixmapFromData) @@ -621,7 +621,7 @@ Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex ) GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 ); aGlyphId = nGlyphIndex & 0x00FFFFFF; - const ULONG nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight; + const sal_uInt32 nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight; XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId, aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes ); mnBytesUsed += nBytes; diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx index bab78b0cb2df..c7727dade852 100644 --- a/vcl/unx/source/gdi/pspgraphics.cxx +++ b/vcl/unx/source/gdi/pspgraphics.cxx @@ -278,7 +278,7 @@ void PspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) } } -USHORT PspGraphics::GetBitCount() +sal_uInt16 PspGraphics::GetBitCount() { return m_pPrinterGfx->GetBitCount(); } @@ -293,14 +293,14 @@ void PspGraphics::ResetClipRegion() m_pPrinterGfx->ResetClipRegion (); } -void PspGraphics::BeginSetClipRegion( ULONG n ) +void PspGraphics::BeginSetClipRegion( sal_uInt32 n ) { m_pPrinterGfx->BeginSetClipRegion(n); } -BOOL PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) +sal_Bool PspGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) { - return (BOOL)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY); + return (sal_Bool)m_pPrinterGfx->UnionClipRegion (nX, nY, nDX, nDY); } bool PspGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) @@ -379,12 +379,12 @@ void PspGraphics::drawRect( long nX, long nY, long nDX, long nDY ) m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY))); } -void PspGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry ) +void PspGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) { m_pPrinterGfx->DrawPolyLine (nPoints, (Point*)pPtAry); } -void PspGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) +void PspGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) { // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx m_pPrinterGfx->DrawPolygon (nPoints, (Point*)pPtAry); @@ -409,13 +409,13 @@ bool PspGraphics::drawPolyLine( const basegfx::B2DPolygon&, double /*fTransparen return false; } -sal_Bool PspGraphics::drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +sal_Bool PspGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) { m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry); return sal_True; } -sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry ) +sal_Bool PspGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) { m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry); return sal_True; @@ -424,20 +424,20 @@ sal_Bool PspGraphics::drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, sal_Bool PspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, - const BYTE* const* pFlgAry ) + const sal_uInt8* const* pFlgAry ) { // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx - m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (BYTE**)pFlgAry); + m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (sal_uInt8**)pFlgAry); return sal_True; } -void PspGraphics::invert( ULONG, +void PspGraphics::invert( sal_uInt32, const SalPoint*, SalInvert ) { DBG_ASSERT( 0, "Error: PrinterGfx::Invert() not implemented" ); } -BOOL PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ) +sal_Bool PspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize ) { return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); } @@ -448,7 +448,7 @@ void PspGraphics::copyBits( const SalTwoRect*, DBG_ERROR( "Error: PrinterGfx::CopyBits() not implemented" ); } -void PspGraphics::copyArea ( long,long,long,long,long,long,USHORT ) +void PspGraphics::copyArea ( long,long,long,long,long,long,sal_uInt16 ) { DBG_ERROR( "Error: PrinterGfx::CopyArea() not implemented" ); } @@ -784,7 +784,7 @@ const ImplFontCharMap* PspGraphics::GetImplFontCharMap() const return pIFCMap; } -USHORT PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) +sal_uInt16 PspGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) { // release all fonts that are to be overridden for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) @@ -915,10 +915,10 @@ void PspGraphics::GetFontMetric( ImplFontMetricData *pMetric, int ) } } -ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) +sal_uInt32 PspGraphics::GetKernPairs( sal_uInt32 nPairs, ImplKernPairData *pKernPairs ) { const ::std::list< ::psp::KernPair >& rPairs( m_pPrinterGfx->getKernPairs() ); - ULONG nHavePairs = rPairs.size(); + sal_uInt32 nHavePairs = rPairs.size(); if( pKernPairs && nPairs ) { ::std::list< ::psp::KernPair >::const_iterator it; @@ -937,38 +937,38 @@ ULONG PspGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) return nHavePairs; } -BOOL PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) +sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) { int nLevel = nGlyphIndex >> GF_FONTSHIFT; if( nLevel >= MAX_FALLBACK ) - return FALSE; + return sal_False; ServerFont* pSF = m_pServerFont[ nLevel ]; if( !pSF ) - return FALSE; + return sal_False; nGlyphIndex &= ~GF_FONTMASK; const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex ); rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() ); - return TRUE; + return sal_True; } -BOOL PspGraphics::GetGlyphOutline( long nGlyphIndex, +sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex, ::basegfx::B2DPolyPolygon& rB2DPolyPoly ) { int nLevel = nGlyphIndex >> GF_FONTSHIFT; if( nLevel >= MAX_FALLBACK ) - return FALSE; + return sal_False; ServerFont* pSF = m_pServerFont[ nLevel ]; if( !pSF ) - return FALSE; + return sal_False; nGlyphIndex &= ~GF_FONTMASK; if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel ) @@ -1007,7 +1007,7 @@ SalLayout* PspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel //-------------------------------------------------------------------------- -BOOL PspGraphics::CreateFontSubset( +sal_Bool PspGraphics::CreateFontSubset( const rtl::OUString& rToFile, const ImplFontData* pFont, sal_Int32* pGlyphIDs, @@ -1402,9 +1402,9 @@ bool PspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrLen bool bRet = false; bool bStarted = false; bool bStopped = false; - USHORT nPos; - USHORT nStart = 0; - USHORT nStop = rLen; + sal_uInt16 nPos; + sal_uInt16 nStart = 0; + sal_uInt16 nStop = rLen; String aPhone = rOrig.Copy( nIndex, rLen ); if( ! m_bPhoneCollectionActive ) diff --git a/vcl/unx/source/gdi/salbmp.cxx b/vcl/unx/source/gdi/salbmp.cxx index cc7934b0a798..0b93333b91c3 100644 --- a/vcl/unx/source/gdi/salbmp.cxx +++ b/vcl/unx/source/gdi/salbmp.cxx @@ -64,7 +64,7 @@ SalBitmap* X11SalInstance::CreateSalBitmap() } ImplSalBitmapCache* X11SalBitmap::mpCache = NULL; -ULONG X11SalBitmap::mnCacheInstCount = 0; +sal_uInt32 X11SalBitmap::mnCacheInstCount = 0; // ----------------------------------------------------------------------------- @@ -109,7 +109,7 @@ void X11SalBitmap::ImplRemovedFromCache() // ----------------------------------------------------------------------------- -BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) +BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) { DBG_ASSERT( nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 16 || nBitCount == 24, "Unsupported BitCount!" ); @@ -128,7 +128,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, if( pDIB ) { - const USHORT nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0; + const sal_uInt16 nColors = ( nBitCount <= 8 ) ? ( 1 << nBitCount ) : 0; pDIB->mnFormat = BMP_FORMAT_BOTTOM_UP; @@ -169,7 +169,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( const Size& rSize, USHORT nBitCount, try { - pDIB->mpBits = new BYTE[ pDIB->mnScanlineSize * pDIB->mnHeight ]; + pDIB->mpBits = new sal_uInt8[ pDIB->mnScanlineSize * pDIB->mnHeight ]; } catch(std::bad_alloc&) { @@ -214,7 +214,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable, { const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight }; BitmapBuffer aSrcBuf; - ULONG nDstFormat = BMP_FORMAT_BOTTOM_UP; + sal_uInt32 nDstFormat = BMP_FORMAT_BOTTOM_UP; const BitmapPalette* pDstPal = NULL; aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN; @@ -222,7 +222,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable, aSrcBuf.mnHeight = nHeight; aSrcBuf.mnBitCount = pImage->bits_per_pixel; aSrcBuf.mnScanlineSize = pImage->bytes_per_line; - aSrcBuf.mpBits = (BYTE*) pImage->data; + aSrcBuf.mpBits = (sal_uInt8*) pImage->data; pImage->red_mask = pSalDisp->GetVisual( nScreen ).red_mask; pImage->green_mask = pSalDisp->GetVisual( nScreen ).green_mask; @@ -304,12 +304,12 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB( Drawable aDrawable, else if( aSrcBuf.mnBitCount <= 8 ) { const SalColormap& rColMap = pSalDisp->GetColormap( nScreen ); - const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << nDrawableDepth) ); + const sal_uInt16 nCols = Min( (sal_uInt32)rColMap.GetUsed(), (sal_uInt32)(1 << nDrawableDepth) ); rPal.SetEntryCount( nCols ); pDstPal = &rPal; - for( USHORT i = 0; i < nCols; i++ ) + for( sal_uInt16 i = 0; i < nCols; i++ ) { const SalColor nColor( rColMap.GetColor( i ) ); BitmapColor& rBmpCol = rPal[ i ]; @@ -363,7 +363,7 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long if( pImage ) { BitmapBuffer* pDstBuf; - ULONG nDstFormat = BMP_FORMAT_TOP_DOWN; + sal_uInt32 nDstFormat = BMP_FORMAT_TOP_DOWN; BitmapPalette* pPal = NULL; ColorMask* pMask = NULL; @@ -430,11 +430,11 @@ XImage* X11SalBitmap::ImplCreateXImage( SalDisplay *pSalDisp, int nScreen, long else if( pImage->depth <= 8 ) { const SalColormap& rColMap = pSalDisp->GetColormap( nScreen ); - const USHORT nCols = Min( (ULONG)rColMap.GetUsed(), (ULONG)(1 << pImage->depth) ); + const sal_uInt16 nCols = Min( (sal_uInt32)rColMap.GetUsed(), (sal_uInt32)(1 << pImage->depth) ); pPal = new BitmapPalette( nCols ); - for( USHORT i = 0; i < nCols; i++ ) + for( sal_uInt16 i = 0; i < nCols; i++ ) { const SalColor nColor( rColMap.GetColor( i ) ); BitmapColor& rBmpCol = (*pPal)[ i ]; @@ -683,7 +683,7 @@ void X11SalBitmap::ImplDraw( Drawable aDrawable, // ----------------------------------------------------------------------------- -bool X11SalBitmap::Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal ) +bool X11SalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) { Destroy(); mpDIB = ImplCreateDIB( rSize, nBitCount, rPal ); @@ -706,7 +706,7 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp ) // TODO: get rid of this when BitmapBuffer gets copy constructor try { - mpDIB->mpBits = new BYTE[ mpDIB->mnScanlineSize * mpDIB->mnHeight ]; + mpDIB->mpBits = new sal_uInt8[ mpDIB->mnScanlineSize * mpDIB->mnHeight ]; } catch( std::bad_alloc& ) { @@ -732,14 +732,14 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp ) bool X11SalBitmap::Create( const SalBitmap&, SalGraphics* ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------------- -bool X11SalBitmap::Create( const SalBitmap&, USHORT ) +bool X11SalBitmap::Create( const SalBitmap&, sal_uInt16 ) { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------------- @@ -775,9 +775,9 @@ Size X11SalBitmap::GetSize() const // ----------------------------------------------------------------------------- -USHORT X11SalBitmap::GetBitCount() const +sal_uInt16 X11SalBitmap::GetBitCount() const { - USHORT nBitCount; + sal_uInt16 nBitCount; if( mpDIB ) nBitCount = mpDIB->mnBitCount; @@ -954,7 +954,7 @@ ImplSalDDB::~ImplSalDDB() bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const { - bool bRet = FALSE; + bool bRet = sal_False; if( ( maPixmap != 0 ) && ( ( mnDepth == nDepth ) || ( 1 == mnDepth ) ) && nScreen == mnScreen) { @@ -963,7 +963,7 @@ bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRe rTwoRect.mnDestWidth == maTwoRect.mnDestWidth && rTwoRect.mnDestHeight == maTwoRect.mnDestHeight ) { // absolutely indentically - bRet = TRUE; + bRet = sal_True; } else if( rTwoRect.mnSrcWidth == rTwoRect.mnDestWidth && rTwoRect.mnSrcHeight == rTwoRect.mnDestHeight && maTwoRect.mnSrcWidth == maTwoRect.mnDestWidth && maTwoRect.mnSrcHeight == maTwoRect.mnDestHeight && @@ -971,7 +971,7 @@ bool ImplSalDDB::ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRe ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) <= ( maTwoRect.mnSrcX + maTwoRect.mnSrcWidth ) && ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) <= ( maTwoRect.mnSrcY + maTwoRect.mnSrcHeight ) ) { - bRet = TRUE; + bRet = sal_True; } } @@ -1018,10 +1018,10 @@ void ImplSalDDB::ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth, struct ImplBmpObj { X11SalBitmap* mpBmp; - ULONG mnMemSize; - ULONG mnFlags; + sal_uInt32 mnMemSize; + sal_uInt32 mnFlags; - ImplBmpObj( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) : + ImplBmpObj( X11SalBitmap* pBmp, sal_uInt32 nMemSize, sal_uInt32 nFlags ) : mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {} }; @@ -1041,14 +1041,14 @@ ImplSalBitmapCache::~ImplSalBitmapCache() // ----------------------------------------------------------------------------- -void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, ULONG nMemSize, ULONG nFlags ) +void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uInt32 nMemSize, sal_uInt32 nFlags ) { ImplBmpObj* pObj; - bool bFound = FALSE; + bool bFound = sal_False; for( pObj = (ImplBmpObj*) maBmpList.Last(); pObj && !bFound; pObj = (ImplBmpObj*) maBmpList.Prev() ) if( pObj->mpBmp == pBmp ) - bFound = TRUE; + bFound = sal_True; mnTotalSize += nMemSize; diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 9215f2e25b16..3802f4f394ac 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -67,21 +67,21 @@ class SalPolyLine XPoint Points_[STATIC_POINTS]; XPoint *pFirst_; public: - inline SalPolyLine( ULONG nPoints ); - inline SalPolyLine( ULONG nPoints, const SalPoint *p ); + inline SalPolyLine( sal_uInt32 nPoints ); + inline SalPolyLine( sal_uInt32 nPoints, const SalPoint *p ); inline ~SalPolyLine(); - inline XPoint &operator [] ( ULONG n ) const + inline XPoint &operator [] ( sal_uInt32 n ) const { return pFirst_[n]; } }; -inline SalPolyLine::SalPolyLine( ULONG nPoints ) +inline SalPolyLine::SalPolyLine( sal_uInt32 nPoints ) : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ ) {} -inline SalPolyLine::SalPolyLine( ULONG nPoints, const SalPoint *p ) +inline SalPolyLine::SalPolyLine( sal_uInt32 nPoints, const SalPoint *p ) : pFirst_( nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_ ) { - for( ULONG i = 0; i < nPoints; i++ ) + for( sal_uInt32 i = 0; i < nPoints; i++ ) { pFirst_[i].x = (short)p[i].mnX; pFirst_[i].y = (short)p[i].mnY; @@ -124,7 +124,7 @@ X11SalGraphics::X11SalGraphics() #ifdef ENABLE_GRAPHITE // check if graphite fonts have been disabled static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" ); - bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : FALSE; + bDisableGraphite_ = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : sal_False; #endif pBrushGC_ = NULL; @@ -140,20 +140,20 @@ X11SalGraphics::X11SalGraphics() pStippleGC_ = NULL; pTrackingGC_ = NULL; - bWindow_ = FALSE; - bPrinter_ = FALSE; - bVirDev_ = FALSE; - bPenGC_ = FALSE; - bFontGC_ = FALSE; - bBrushGC_ = FALSE; - bMonoGC_ = FALSE; - bCopyGC_ = FALSE; - bInvertGC_ = FALSE; - bInvert50GC_ = FALSE; - bStippleGC_ = FALSE; - bTrackingGC_ = FALSE; - bXORMode_ = FALSE; - bDitherBrush_ = FALSE; + bWindow_ = sal_False; + bPrinter_ = sal_False; + bVirDev_ = sal_False; + bPenGC_ = sal_False; + bFontGC_ = sal_False; + bBrushGC_ = sal_False; + bMonoGC_ = sal_False; + bCopyGC_ = sal_False; + bInvertGC_ = sal_False; + bInvert50GC_ = sal_False; + bStippleGC_ = sal_False; + bTrackingGC_ = sal_False; + bXORMode_ = sal_False; + bDitherBrush_ = sal_False; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -241,7 +241,7 @@ void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, int nScreen ) SetDrawable( aTarget, nScreen ); #endif - bWindow_ = TRUE; + bWindow_ = sal_True; m_pFrame = pFrame; m_pVDev = NULL; } @@ -306,7 +306,7 @@ GC X11SalGraphics::SelectPen() XSetForeground( pDisplay, pPenGC_, nPenPixel_ ); XSetFunction ( pDisplay, pPenGC_, bXORMode_ ? GXxor : GXcopy ); SetClipRegion( pPenGC_ ); - bPenGC_ = TRUE; + bPenGC_ = sal_True; } return pPenGC_; @@ -359,7 +359,7 @@ GC X11SalGraphics::SelectBrush() XSetFunction ( pDisplay, pBrushGC_, bXORMode_ ? GXxor : GXcopy ); SetClipRegion( pBrushGC_ ); - bBrushGC_ = TRUE; + bBrushGC_ = sal_True; } return pBrushGC_; @@ -391,26 +391,26 @@ GC X11SalGraphics::GetTrackingGC() if( !bTrackingGC_ ) { SetClipRegion( pTrackingGC_ ); - bTrackingGC_ = TRUE; + bTrackingGC_ = sal_True; } return pTrackingGC_; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::DrawLines( ULONG nPoints, +void X11SalGraphics::DrawLines( sal_uInt32 nPoints, const SalPolyLine &rPoints, GC pGC, bool bClose ) { // errechne wie viele Linien XWindow auf einmal zeichnen kann - ULONG nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq)) + sal_uInt32 nMaxLines = (GetDisplay()->GetMaxRequestSize() - sizeof(xPolyPointReq)) / sizeof(xPoint); if( nMaxLines > nPoints ) nMaxLines = nPoints; // gebe alle Linien aus, die XWindows zeichnen kann. - ULONG n; + sal_uInt32 n; for( n = 0; nPoints - n > nMaxLines; n += nMaxLines - 1 ) XDrawLines( GetXDisplay(), GetDrawable(), @@ -454,24 +454,24 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) // test for correct depth (8bit) if( GetColormap().GetVisual().GetDepth() != 8 ) - return FALSE; + return sal_False; char pBits[64]; char *pBitsPtr = pBits; // Set the pallette-entries for the dithering tile - UINT8 nSalColorRed = SALCOLOR_RED ( nSalColor ); - UINT8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor ); - UINT8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor ); + sal_uInt8 nSalColorRed = SALCOLOR_RED ( nSalColor ); + sal_uInt8 nSalColorGreen = SALCOLOR_GREEN ( nSalColor ); + sal_uInt8 nSalColorBlue = SALCOLOR_BLUE ( nSalColor ); for( int nY = 0; nY < 8; nY++ ) { for( int nX = 0; nX < 8; nX++ ) { short nMagic = nOrdDither8Bit[nY][nX]; - UINT8 nR = P_DELTA * DMAP( nSalColorRed, nMagic ); - UINT8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic ); - UINT8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic ); + sal_uInt8 nR = P_DELTA * DMAP( nSalColorRed, nMagic ); + sal_uInt8 nG = P_DELTA * DMAP( nSalColorGreen, nMagic ); + sal_uInt8 nB = P_DELTA * DMAP( nSalColorBlue, nMagic ); *pBitsPtr++ = GetColormap().GetPixel( MAKE_SALCOLOR( nR, nG, nB ) ); } @@ -511,7 +511,7 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) pImage->data = NULL; XDestroyImage( pImage ); - return TRUE; + return sal_True; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -549,7 +549,7 @@ void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // cons } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -USHORT X11SalGraphics::GetBitCount() // const +sal_uInt16 X11SalGraphics::GetBitCount() // const { return GetVisual().GetDepth(); } @@ -581,15 +581,15 @@ void X11SalGraphics::ResetClipRegion() { if( pClipRegion_ ) { - bPenGC_ = FALSE; - bFontGC_ = FALSE; - bBrushGC_ = FALSE; - bMonoGC_ = FALSE; - bCopyGC_ = FALSE; - bInvertGC_ = FALSE; - bInvert50GC_ = FALSE; - bStippleGC_ = FALSE; - bTrackingGC_ = FALSE; + bPenGC_ = sal_False; + bFontGC_ = sal_False; + bBrushGC_ = sal_False; + bMonoGC_ = sal_False; + bCopyGC_ = sal_False; + bInvertGC_ = sal_False; + bInvert50GC_ = sal_False; + bStippleGC_ = sal_False; + bTrackingGC_ = sal_False; XDestroyRegion( pClipRegion_ ); pClipRegion_ = NULL; @@ -597,7 +597,7 @@ void X11SalGraphics::ResetClipRegion() } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::BeginSetClipRegion( ULONG ) +void X11SalGraphics::BeginSetClipRegion( sal_uInt32 ) { if( pClipRegion_ ) XDestroyRegion( pClipRegion_ ); @@ -608,7 +608,7 @@ void X11SalGraphics::BeginSetClipRegion( ULONG ) BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) { if (!nDX || !nDY) - return TRUE; + return sal_True; XRectangle aRect; aRect.x = (short)nX; @@ -618,7 +618,7 @@ BOOL X11SalGraphics::unionClipRegion( long nX, long nY, long nDX, long nDY ) XUnionRectWithRegion( &aRect, pClipRegion_, pClipRegion_ ); - return TRUE; + return sal_True; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -631,15 +631,15 @@ bool X11SalGraphics::unionClipRegion( const ::basegfx::B2DPolyPolygon& ) // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= void X11SalGraphics::EndSetClipRegion() { - bPenGC_ = FALSE; - bFontGC_ = FALSE; - bBrushGC_ = FALSE; - bMonoGC_ = FALSE; - bCopyGC_ = FALSE; - bInvertGC_ = FALSE; - bInvert50GC_ = FALSE; - bStippleGC_ = FALSE; - bTrackingGC_ = FALSE; + bPenGC_ = sal_False; + bFontGC_ = sal_False; + bBrushGC_ = sal_False; + bMonoGC_ = sal_False; + bCopyGC_ = sal_False; + bInvertGC_ = sal_False; + bInvert50GC_ = sal_False; + bStippleGC_ = sal_False; + bTrackingGC_ = sal_False; if( XEmptyRegion( pClipRegion_ ) ) { @@ -654,7 +654,7 @@ void X11SalGraphics::SetLineColor() if( nPenColor_ != SALCOLOR_NONE ) { nPenColor_ = SALCOLOR_NONE; - bPenGC_ = FALSE; + bPenGC_ = sal_False; } } @@ -665,7 +665,7 @@ void X11SalGraphics::SetLineColor( SalColor nSalColor ) { nPenColor_ = nSalColor; nPenPixel_ = GetPixel( nSalColor ); - bPenGC_ = FALSE; + bPenGC_ = sal_False; } } @@ -674,9 +674,9 @@ void X11SalGraphics::SetFillColor() { if( nBrushColor_ != SALCOLOR_NONE ) { - bDitherBrush_ = FALSE; + bDitherBrush_ = sal_False; nBrushColor_ = SALCOLOR_NONE; - bBrushGC_ = FALSE; + bBrushGC_ = sal_False; } } @@ -685,7 +685,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor ) { if( nBrushColor_ != nSalColor ) { - bDitherBrush_ = FALSE; + bDitherBrush_ = sal_False; nBrushColor_ = nSalColor; nBrushPixel_ = GetPixel( nSalColor ); if( TrueColor != GetColormap().GetVisual().GetClass() @@ -707,7 +707,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor ) && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) ) bDitherBrush_ = GetDitherPixmap(nSalColor); - bBrushGC_ = FALSE; + bBrushGC_ = sal_False; } } @@ -727,7 +727,7 @@ void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor ) break; } nPenColor_ = GetColormap().GetColor( nPenPixel_ ); - bPenGC_ = FALSE; + bPenGC_ = sal_False; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -745,9 +745,9 @@ void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor ) nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; break; } - bDitherBrush_ = FALSE; + bDitherBrush_ = sal_False; nBrushColor_ = GetColormap().GetColor( nBrushPixel_ ); - bBrushGC_ = FALSE; + bBrushGC_ = sal_False; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -756,14 +756,14 @@ void X11SalGraphics::SetXORMode( bool bSet, bool ) if( !bXORMode_ == bSet ) { bXORMode_ = bSet; - bPenGC_ = FALSE; - bBrushGC_ = FALSE; - bMonoGC_ = FALSE; - bCopyGC_ = FALSE; - bInvertGC_ = FALSE; - bInvert50GC_ = FALSE; - bStippleGC_ = FALSE; - bTrackingGC_ = FALSE; + bPenGC_ = sal_False; + bBrushGC_ = sal_False; + bMonoGC_ = sal_False; + bCopyGC_ = sal_False; + bInvertGC_ = sal_False; + bInvert50GC_ = sal_False; + bStippleGC_ = sal_False; + bTrackingGC_ = sal_False; } } @@ -839,13 +839,13 @@ void X11SalGraphics::drawRect( long nX, long nY, long nDX, long nDY ) } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry ) +void X11SalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) { drawPolyLine( nPoints, pPtAry, false ); } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool bClose ) +void X11SalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry, bool bClose ) { if( nPenColor_ != 0xFFFFFFFF ) { @@ -856,7 +856,7 @@ void X11SalGraphics::drawPolyLine( ULONG nPoints, const SalPoint *pPtAry, bool b } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::drawPolygon( ULONG nPoints, const SalPoint* pPtAry ) +void X11SalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) { if( nPoints == 0 ) return; @@ -929,7 +929,7 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, { if( nBrushColor_ != SALCOLOR_NONE ) { - ULONG i, n; + sal_uInt32 i, n; XLIB_Region pXRegA = NULL; for( i = 0; i < nPoly; i++ ) { @@ -956,7 +956,7 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, GC pGC = SelectBrush(); SetClipRegion( pGC, pXRegA ); // ??? doppelt XDestroyRegion( pXRegA ); - bBrushGC_ = FALSE; + bBrushGC_ = sal_False; XFillRectangle( GetXDisplay(), GetDrawable(), @@ -966,20 +966,20 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, } if( nPenColor_ != SALCOLOR_NONE ) - for( ULONG i = 0; i < nPoly; i++ ) + for( sal_uInt32 i = 0; i < nPoly; i++ ) drawPolyLine( pPoints[i], pPtAry[i], true ); } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -sal_Bool X11SalGraphics::drawPolyLineBezier( ULONG, const SalPoint*, const BYTE* ) +sal_Bool X11SalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const BYTE* ) { return sal_False; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -sal_Bool X11SalGraphics::drawPolygonBezier( ULONG, const SalPoint*, const BYTE* ) +sal_Bool X11SalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const BYTE* ) { return sal_False; } @@ -994,7 +994,7 @@ sal_Bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalGraphics::invert( ULONG nPoints, +void X11SalGraphics::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) { @@ -1021,9 +1021,9 @@ void X11SalGraphics::invert( ULONG nPoints, // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,ULONG ) +BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,sal_uInt32 ) { - return FALSE; + return sal_False; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -1094,22 +1094,22 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly // nothing to do for empty polypolygons const int nOrigPolyCount = rOrigPolyPoly.count(); if( nOrigPolyCount <= 0 ) - return TRUE; + return sal_True; // nothing to do if everything is transparent if( (nBrushColor_ == SALCOLOR_NONE) && (nPenColor_ == SALCOLOR_NONE) ) - return TRUE; + return sal_True; // cannot handle pencolor!=brushcolor yet if( (nPenColor_ != SALCOLOR_NONE) && (nPenColor_ != nBrushColor_) ) - return FALSE; + return sal_False; // TODO: remove the env-variable when no longer needed static const char* pRenderEnv = getenv( "SAL_DISABLE_RENDER_POLY" ); if( pRenderEnv ) - return FALSE; + return sal_False; // snap to raster if requested basegfx::B2DPolyPolygon aPolyPoly = rOrigPolyPoly; diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx index 1cb2abbedf43..018f7514dfeb 100644 --- a/vcl/unx/source/gdi/salgdi2.cxx +++ b/vcl/unx/source/gdi/salgdi2.cxx @@ -150,7 +150,7 @@ inline GC X11SalGraphics::GetMonoGC( Pixmap hPixmap ) if( !bMonoGC_ ) { SetClipRegion( pMonoGC_ ); - bMonoGC_ = TRUE; + bMonoGC_ = sal_True; } return pMonoGC_; @@ -167,7 +167,7 @@ inline GC X11SalGraphics::GetCopyGC() if( !bCopyGC_ ) { SetClipRegion( pCopyGC_ ); - bCopyGC_ = TRUE; + bCopyGC_ = sal_True; } return pCopyGC_; } @@ -185,7 +185,7 @@ GC X11SalGraphics::GetInvertGC() if( !bInvertGC_ ) { SetClipRegion( pInvertGC_ ); - bInvertGC_ = TRUE; + bInvertGC_ = sal_True; } return pInvertGC_; } @@ -233,7 +233,7 @@ GC X11SalGraphics::GetInvert50GC() if( !bInvert50GC_ ) { SetClipRegion( pInvert50GC_ ); - bInvert50GC_ = TRUE; + bInvert50GC_ = sal_True; } return pInvert50GC_; } @@ -251,7 +251,7 @@ inline GC X11SalGraphics::GetStippleGC() { XSetFunction( GetXDisplay(), pStippleGC_, bXORMode_ ? GXxor : GXcopy ); SetClipRegion( pStippleGC_ ); - bStippleGC_ = TRUE; + bStippleGC_ = sal_True; } return pStippleGC_; @@ -608,7 +608,7 @@ void X11SalGraphics::copyBits( const SalTwoRect *pPosAry, void X11SalGraphics::copyArea ( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, - USHORT ) + sal_uInt16 ) { SalTwoRect aPosAry; @@ -661,11 +661,11 @@ void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, DBG_ASSERT( !bPrinter_, "Drawing of transparent bitmaps on printer devices is strictly forbidden" ); // decide if alpha masking or transparency masking is needed - BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( TRUE ); + BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( sal_True ); if( pAlphaBuffer != NULL ) { int nMaskFormat = pAlphaBuffer->mnFormat; - const_cast<SalBitmap&>(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, TRUE ); + const_cast<SalBitmap&>(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, sal_True ); if( nMaskFormat == BMP_FORMAT_8BIT_PAL ) drawAlphaBitmap( *pPosAry, rSrcBitmap, rMaskBitmap ); } @@ -686,7 +686,7 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry, // figure work mode depth. If this is a VDev Drawable, use its // bitdepth to create pixmaps for, otherwise, XCopyArea will // refuse to work. - const USHORT nDepth( m_pVDev ? + const sal_uInt16 nDepth( m_pVDev ? m_pVDev->GetDepth() : pSalDisp->GetVisual( m_nScreen ).GetDepth() ); Pixmap aFG( XCreatePixmap( pXDisp, aDrawable, pPosAry->mnDestWidth, @@ -745,8 +745,8 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect* pPosAry, DBG_TESTTRANS( aBG ); // #105055# Disable XOR temporarily - BOOL bOldXORMode( bXORMode_ ); - bXORMode_ = FALSE; + sal_Bool bOldXORMode( bXORMode_ ); + bXORMode_ = sal_False; // copy pixmap #2 (result) to background XCopyArea( pXDisp, aBG, aDrawable, GetCopyGC(), @@ -834,7 +834,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, // TODO: use SalX11Bitmap functionality and caching for the Alpha Pixmap // problem is that they don't provide an 8bit Pixmap on a non-8bit display - BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rAlphaBmp).AcquireBuffer( TRUE ); + BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rAlphaBmp).AcquireBuffer( sal_True ); // an XImage needs its data top_down // TODO: avoid wrongly oriented images in upper layers! @@ -879,7 +879,7 @@ bool X11SalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, if( pAlphaBits != (char*)pAlphaBuffer->mpBits ) delete[] pAlphaBits; - const_cast<SalBitmap&>(rAlphaBmp).ReleaseBuffer( pAlphaBuffer, TRUE ); + const_cast<SalBitmap&>(rAlphaBmp).ReleaseBuffer( pAlphaBuffer, sal_True ); XRenderPictureAttributes aAttr; aAttr.repeat = true; @@ -1045,7 +1045,7 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY ) } X11SalBitmap* pSalBitmap = new X11SalBitmap; - USHORT nBitCount = GetBitCount(); + sal_uInt16 nBitCount = GetBitCount(); if( &GetDisplay()->GetColormap( m_nScreen ) != &GetColormap() ) nBitCount = 1; diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index 62e575ebc5ef..e570e0e02bc6 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -566,7 +566,7 @@ X11SalGraphics::SelectFont() { XSetForeground( pDisplay, pFontGC_, nTextPixel_ ); SetClipRegion( pFontGC_ ); - bFontGC_ = TRUE; + bFontGC_ = sal_True; } return pFontGC_; @@ -622,7 +622,7 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev Size aReqSize( pEntry->mnWidth, pEntry->mnHeight ); mXFont[ nFallbackLevel ] = GetDisplay()->GetFont( &rX11Font, aReqSize, bFontVertical_ ); - bFontGC_ = FALSE; + bFontGC_ = sal_False; return true; } @@ -1509,9 +1509,9 @@ const ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const // // ---------------------------------------------------------------------------- -USHORT X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) +sal_uInt16 X11SalGraphics::SetFont( ImplFontSelectData *pEntry, int nFallbackLevel ) { - USHORT nRetVal = 0; + sal_uInt16 nRetVal = 0; if( !setFont( pEntry, nFallbackLevel ) ) nRetVal |= SAL_SETFONT_BADFONT; if( bPrinter_ || (mpServerFont[ nFallbackLevel ] != NULL) ) @@ -1528,7 +1528,7 @@ X11SalGraphics::SetTextColor( SalColor nSalColor ) { nTextColor_ = nSalColor; nTextPixel_ = GetPixel( nSalColor ); - bFontGC_ = FALSE; + bFontGC_ = sal_False; } } @@ -1776,15 +1776,15 @@ X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel ) // --------------------------------------------------------------------------- -ULONG -X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) +sal_uInt32 +X11SalGraphics::GetKernPairs( sal_uInt32 nPairs, ImplKernPairData *pKernPairs ) { if( ! bPrinter_ ) { if( mpServerFont[0] != NULL ) { ImplKernPairData* pTmpKernPairs; - ULONG nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs ); + sal_uInt32 nGotPairs = mpServerFont[0]->GetKernPairs( &pTmpKernPairs ); for( unsigned int i = 0; i < nPairs && i < nGotPairs; ++i ) pKernPairs[ i ] = pTmpKernPairs[ i ]; delete[] pTmpKernPairs; @@ -1796,40 +1796,40 @@ X11SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData *pKernPairs ) // --------------------------------------------------------------------------- -BOOL X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) +sal_Bool X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect ) { int nLevel = nGlyphIndex >> GF_FONTSHIFT; if( nLevel >= MAX_FALLBACK ) - return FALSE; + return sal_False; ServerFont* pSF = mpServerFont[ nLevel ]; if( !pSF ) - return FALSE; + return sal_False; nGlyphIndex &= ~GF_FONTMASK; const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex ); rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() ); - return TRUE; + return sal_True; } // --------------------------------------------------------------------------- -BOOL X11SalGraphics::GetGlyphOutline( long nGlyphIndex, +sal_Bool X11SalGraphics::GetGlyphOutline( long nGlyphIndex, ::basegfx::B2DPolyPolygon& rPolyPoly ) { int nLevel = nGlyphIndex >> GF_FONTSHIFT; if( nLevel >= MAX_FALLBACK ) - return FALSE; + return sal_False; ServerFont* pSF = mpServerFont[ nLevel ]; if( !pSF ) - return FALSE; + return sal_False; nGlyphIndex &= ~GF_FONTMASK; if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } //-------------------------------------------------------------------------- @@ -1894,7 +1894,7 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const //-------------------------------------------------------------------------- -BOOL X11SalGraphics::CreateFontSubset( +sal_Bool X11SalGraphics::CreateFontSubset( const rtl::OUString& rToFile, const ImplFontData* pFont, sal_Int32* pGlyphIDs, diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx index ece724d717cb..c8a0f6532133 100644 --- a/vcl/unx/source/gdi/salprnpsp.cxx +++ b/vcl/unx/source/gdi/salprnpsp.cxx @@ -213,7 +213,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) if( rData.getStreamBuffer( pBuffer, nBytes ) ) { pJobSetup->mnDriverDataLen = nBytes; - pJobSetup->mpDriverData = (BYTE*)pBuffer; + pJobSetup->mpDriverData = (sal_uInt8*)pBuffer; } else { @@ -588,15 +588,15 @@ void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics ) // ----------------------------------------------------------------------- -BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) +sal_Bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) { if( ! pFrame || ! pJobSetup ) - return FALSE; + return sal_False; getPaLib(); if( ! pSetupFunction ) - return FALSE; + return sal_False; PrinterInfoManager& rManager = PrinterInfoManager::get(); @@ -616,14 +616,14 @@ BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) void* pBuffer = NULL; aInfo.getStreamBuffer( pBuffer, nBytes ); pJobSetup->mnDriverDataLen = nBytes; - pJobSetup->mpDriverData = (BYTE*)pBuffer; + pJobSetup->mpDriverData = (sal_uInt8*)pBuffer; // copy everything to job setup copyJobDataToJobSetup( pJobSetup, aInfo ); JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -633,7 +633,7 @@ BOOL PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) // data should be merged into the driver data // If pJobSetup->mpDriverData IS NULL, then the driver defaults // should be merged into the independent data -BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) +sal_Bool PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) { // set/clear backwards compatibility flag bool bStrictSO52Compatibility = false; @@ -652,7 +652,7 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) copyJobDataToJobSetup( pJobSetup, m_aJobData ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -661,8 +661,8 @@ BOOL PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) // and sets the new independ data in pJobSetup // Only the data must be changed, where the bit // in nGetDataFlags is set -BOOL PspSalInfoPrinter::SetData( - ULONG nSetDataFlags, +sal_Bool PspSalInfoPrinter::SetData( + sal_uInt32 nSetDataFlags, ImplJobSetup* pJobSetup ) { JobData aData; @@ -711,7 +711,7 @@ BOOL PspSalInfoPrinter::SetData( } if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) ) - return FALSE; + return sal_False; } // merge paperbin if necessary @@ -771,10 +771,10 @@ BOOL PspSalInfoPrinter::SetData( m_aJobData = aData; copyJobDataToJobSetup( pJobSetup, aData ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -823,7 +823,7 @@ void PspSalInfoPrinter::GetPageInfo( // ----------------------------------------------------------------------- -ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) +sal_uInt32 PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) { if( ! pJobSetup ) return 0; @@ -837,7 +837,7 @@ ULONG PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) // ----------------------------------------------------------------------- -String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG nPaperBin ) +String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uInt32 nPaperBin ) { JobData aData; JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); @@ -846,7 +846,7 @@ String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG if( aData.m_pParser ) { const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL; - if( ! pKey || nPaperBin >= (ULONG)pKey->countValues() ) + if( ! pKey || nPaperBin >= (sal_uInt32)pKey->countValues() ) aRet = aData.m_pParser->getDefaultInputSlot(); else { @@ -861,7 +861,7 @@ String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, ULONG // ----------------------------------------------------------------------- -ULONG PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, USHORT nType ) +sal_uInt32 PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, sal_uInt16 nType ) { switch( nType ) { @@ -955,11 +955,11 @@ static String getTmpName() return aSys; } -BOOL PspSalPrinter::StartJob( +sal_Bool PspSalPrinter::StartJob( const XubString* pFileName, const XubString& rJobName, const XubString& rAppName, - ULONG nCopies, + sal_uInt32 nCopies, bool bCollate, bool bDirect, ImplJobSetup* pJobSetup ) @@ -1035,16 +1035,16 @@ BOOL PspSalPrinter::StartJob( } m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility ); - return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? TRUE : FALSE; + return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? sal_True : sal_False; } // ----------------------------------------------------------------------- -BOOL PspSalPrinter::EndJob() +sal_Bool PspSalPrinter::EndJob() { - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; if( m_bIsPDFWriterJob ) - bSuccess = TRUE; + bSuccess = sal_True; else { bSuccess = m_aPrintJob.EndJob(); @@ -1072,16 +1072,16 @@ BOOL PspSalPrinter::EndJob() // ----------------------------------------------------------------------- -BOOL PspSalPrinter::AbortJob() +sal_Bool PspSalPrinter::AbortJob() { - BOOL bAbort = m_aPrintJob.AbortJob() ? TRUE : FALSE; + sal_Bool bAbort = m_aPrintJob.AbortJob() ? sal_True : sal_False; vcl_sal::PrinterUpdate::jobEnded(); return bAbort; } // ----------------------------------------------------------------------- -SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL ) +SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, sal_Bool ) { JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); m_pGraphics = new PspGraphics( &m_aJobData, &m_aPrinterGfx, m_bFax ? &m_aFaxNr : NULL, m_bSwallowFaxNo, m_pInfoPrinter ); @@ -1102,16 +1102,16 @@ SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, BOOL ) // ----------------------------------------------------------------------- -BOOL PspSalPrinter::EndPage() +sal_Bool PspSalPrinter::EndPage() { sal_Bool bResult = m_aPrintJob.EndPage(); m_aPrinterGfx.Clear(); - return bResult ? TRUE : FALSE; + return bResult ? sal_True : sal_False; } // ----------------------------------------------------------------------- -ULONG PspSalPrinter::GetErrorCode() +sal_uInt32 PspSalPrinter::GetErrorCode() { return 0; } @@ -1121,10 +1121,10 @@ ULONG PspSalPrinter::GetErrorCode() struct PDFNewJobParameters { Size maPageSize; - USHORT mnPaperBin; + sal_uInt16 mnPaperBin; PDFNewJobParameters( const Size& i_rSize = Size(), - USHORT i_nPaperBin = 0xffff ) + sal_uInt16 i_nPaperBin = 0xffff ) : maPageSize( i_rSize ), mnPaperBin( i_nPaperBin ) {} bool operator!=(const PDFNewJobParameters& rComp ) const @@ -1152,7 +1152,7 @@ struct PDFPrintFile , maParameters( i_rNewParameters ) {} }; -BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName, +sal_Bool PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName, ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController ) { OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? rtl::OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "<nil>" ); @@ -1376,7 +1376,7 @@ BOOL PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobNam } } - return TRUE; + return sal_True; } diff --git a/vcl/unx/source/gdi/salvd.cxx b/vcl/unx/source/gdi/salvd.cxx index f242fffae715..675deef90ffe 100644 --- a/vcl/unx/source/gdi/salvd.cxx +++ b/vcl/unx/source/gdi/salvd.cxx @@ -44,7 +44,7 @@ // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics, long nDX, long nDY, - USHORT nBitCount, const SystemGraphicsData *pData ) + sal_uInt16 nBitCount, const SystemGraphicsData *pData ) { X11SalVirtualDevice *pVDev = new X11SalVirtualDevice(); if( !nBitCount && pGraphics ) @@ -125,14 +125,14 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, m_pFrame = NULL; bWindow_ = pDisplay->IsDisplay(); - bVirDev_ = TRUE; + bVirDev_ = sal_True; } // -=-= SalVirDevData / SalVirtualDevice -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay, +sal_Bool X11SalVirtualDevice::Init( SalDisplay *pDisplay, long nDX, long nDY, - USHORT nBitCount, + sal_uInt16 nBitCount, int nScreen, Pixmap hDrawable, void* pRenderFormatVoid ) @@ -170,12 +170,12 @@ BOOL X11SalVirtualDevice::Init( SalDisplay *pDisplay, else { hDrawable_ = hDrawable; - bExternPixmap_ = TRUE; + bExternPixmap_ = sal_True; } pGraphics_->Init( this, pColormap, bDeleteColormap ); - return hDrawable_ != None ? TRUE : FALSE; + return hDrawable_ != None ? sal_True : sal_False; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -187,8 +187,8 @@ X11SalVirtualDevice::X11SalVirtualDevice() nDX_ = 0; nDY_ = 0; nDepth_ = 0; - bGraphics_ = FALSE; - bExternPixmap_ = FALSE; + bGraphics_ = sal_False; + bExternPixmap_ = sal_False; } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -208,18 +208,18 @@ SalGraphics* X11SalVirtualDevice::GetGraphics() return NULL; if( pGraphics_ ) - bGraphics_ = TRUE; + bGraphics_ = sal_True; return pGraphics_; } void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) -{ bGraphics_ = FALSE; } +{ bGraphics_ = sal_False; } -BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) +sal_Bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) { if( bExternPixmap_ ) - return FALSE; + return sal_False; // #144688# // the X protocol request CreatePixmap puts an upper bound @@ -229,7 +229,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) // 16 bit truncation here without noticing. if( nDX < 0 || nDX > 65535 || nDY < 0 || nDY > 65535 ) - return FALSE; + return sal_False; if( !nDX ) nDX = 1; if( !nDY ) nDY = 1; @@ -248,7 +248,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) nDX_ = 1; nDY_ = 1; } - return FALSE; + return sal_False; } if( GetDrawable() ) @@ -261,7 +261,7 @@ BOOL X11SalVirtualDevice::SetSize( long nDX, long nDY ) if( pGraphics_ ) InitGraphics( this ); - return TRUE; + return sal_True; } void X11SalVirtualDevice::GetSize( long& rWidth, long& rHeight ) diff --git a/vcl/unx/source/gdi/xfont.cxx b/vcl/unx/source/gdi/xfont.cxx index f6d19909cd4a..a4da5033e36b 100644 --- a/vcl/unx/source/gdi/xfont.cxx +++ b/vcl/unx/source/gdi/xfont.cxx @@ -275,16 +275,16 @@ ExtendedFontStruct::Match( const ExtendedXlfd *pXlfd, return false; if( bVertical != mbVertical ) - return FALSE; + return false; if( rPixelSize.Height() != maPixelSize.Height() ) - return FALSE; + return false; long nReqWidth = rPixelSize.Width(); if( !nReqWidth ) nReqWidth = rPixelSize.Height(); if( nReqWidth != maPixelSize.Width() ) - return FALSE; + return false; return true; } |