diff options
Diffstat (limited to 'svtools/source/filter/wmf/winmtf.cxx')
-rw-r--r-- | svtools/source/filter/wmf/winmtf.cxx | 85 |
1 files changed, 42 insertions, 43 deletions
diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx index 787e6522b890..30fc670ac22f 100644 --- a/svtools/source/filter/wmf/winmtf.cxx +++ b/svtools/source/filter/wmf/winmtf.cxx @@ -355,7 +355,7 @@ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigI SvLockBytes *pLB = pWMF->GetLockBytes(); if ( pLB ) - pLB->SetSynchronMode( TRUE ); + pLB->SetSynchronMode( sal_True ); nStartPos = pWMF->Tell(); @@ -383,7 +383,7 @@ WinMtf::~WinMtf() // ------------------------------------------------------------------------ -void WinMtf::Callback( USHORT nPercent ) +void WinMtf::Callback( sal_uInt16 nPercent ) { if ( xStatusIndicator.is() ) xStatusIndicator->setValue( nPercent ); @@ -393,9 +393,9 @@ void WinMtf::Callback( USHORT nPercent ) Color WinMtf::ReadColor() { - UINT32 nColor; + sal_uInt32 nColor; *pWMF >> nColor; - return Color( (BYTE)nColor, (BYTE)( nColor >> 8 ), (BYTE)( nColor >> 16 ) ); + return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) ); }; //----------------------------------------------------------------------------------- @@ -561,8 +561,8 @@ void WinMtfOutput::ImplMap( Font& rFont ) Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon ) { - UINT16 nPoints = rPolygon.GetSize(); - for ( UINT16 i = 0; i < nPoints; i++ ) + sal_uInt16 nPoints = rPolygon.GetSize(); + for ( sal_uInt16 i = 0; i < nPoints; i++ ) { rPolygon[ i ] = ImplMap( rPolygon[ i ] ); } @@ -573,14 +573,14 @@ Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon ) PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon ) { - UINT16 nPolys = rPolyPolygon.Count(); - for ( UINT16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ; + sal_uInt16 nPolys = rPolyPolygon.Count(); + for ( sal_uInt16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ; return rPolyPolygon; } //----------------------------------------------------------------------------------- -void WinMtfOutput::SelectObject( INT32 nIndex ) +void WinMtfOutput::SelectObject( sal_Int32 nIndex ) { GDIObj* pGDIObj = NULL; @@ -590,7 +590,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) { nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen - if ( (UINT32)nIndex < vGDIObj.size() ) + if ( (sal_uInt32)nIndex < vGDIObj.size() ) pGDIObj = vGDIObj[ nIndex ]; } @@ -599,7 +599,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) if ( nIndex & ENHMETA_STOCK_OBJECT ) { - UINT16 nStockId = (BYTE)nIndex; + sal_uInt16 nStockId = (sal_uInt8)nIndex; switch( nStockId ) { case WHITE_BRUSH : @@ -625,7 +625,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) break; case NULL_BRUSH : { - pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ) ); + pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), sal_True ) ); } break; case WHITE_PEN : @@ -640,7 +640,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) break; case NULL_PEN : { - pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ) ); + pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ) ); } break; default: @@ -701,7 +701,7 @@ sal_uInt32 WinMtfOutput::GetTextLayoutMode() const //----------------------------------------------------------------------------------- -void WinMtfOutput::SetBkMode( UINT32 nMode ) +void WinMtfOutput::SetBkMode( sal_uInt32 nMode ) { mnBkMode = nMode; } @@ -722,14 +722,14 @@ void WinMtfOutput::SetTextColor( const Color& rColor ) //----------------------------------------------------------------------------------- -void WinMtfOutput::SetTextAlign( UINT32 nAlign ) +void WinMtfOutput::SetTextAlign( sal_uInt32 nAlign ) { mnTextAlign = nAlign; } //----------------------------------------------------------------------------------- -void WinMtfOutput::ImplResizeObjectArry( UINT32 nNewEntrys ) +void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys ) { sal_uInt32 i = vGDIObj.size(); vGDIObj.resize( nNewEntrys ); @@ -795,7 +795,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle ) } } } - UINT32 nIndex; + sal_uInt32 nIndex; for ( nIndex = 0; nIndex < vGDIObj.size(); nIndex++ ) { if ( vGDIObj[ nIndex ] == NULL ) @@ -809,7 +809,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle ) //----------------------------------------------------------------------------------- -void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle ) +void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pStyle ) { if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { @@ -832,7 +832,7 @@ void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle } } } - if ( (UINT32)nIndex >= vGDIObj.size() ) + if ( (sal_uInt32)nIndex >= vGDIObj.size() ) ImplResizeObjectArry( nIndex + 16 ); if ( vGDIObj[ nIndex ] != NULL ) @@ -968,7 +968,7 @@ WinMtfOutput::~WinMtfOutput() else mpGDIMetaFile->SetPrefSize( mrclFrame.GetSize() ); - for ( UINT32 i = 0; i < vGDIObj.size(); i++ ) + for ( sal_uInt32 i = 0; i < vGDIObj.size(); i++ ) delete vGDIObj[ i ]; }; @@ -1010,7 +1010,7 @@ void WinMtfOutput::UpdateClipRegion() void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz() { Color aColor( COL_TRANSPARENT); - WinMtfLineStyle aTransparentLine( aColor, TRUE ); + WinMtfLineStyle aTransparentLine( aColor, sal_True ); if ( ! ( maLatestLineStyle == aTransparentLine ) ) { maLatestLineStyle = aTransparentLine; @@ -1044,7 +1044,7 @@ void WinMtfOutput::UpdateFillStyle() //----------------------------------------------------------------------------------- -sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp ) +sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp ) { sal_uInt32 nRetROP = mnRop; if ( nRasterOp != mnRop ) @@ -1077,8 +1077,8 @@ sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp ) { aNopFillStyle = maFillStyle; aNopLineStyle = maLineStyle; - maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ); - maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ); + maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), sal_True ); + maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ); mbNopMode = sal_True; } } @@ -1108,7 +1108,7 @@ void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ) if ( !bStroke ) { mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) ); + mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) ); } if ( aPathObj.Count() == 1 ) mpGDIMetaFile->AddAction( new MetaPolygonAction( aPathObj.GetObject( 0 ) ) ); @@ -1173,7 +1173,7 @@ void WinMtfOutput::DrawLine( const Point& rSource, const Point& rDest ) //----------------------------------------------------------------------------------- -void WinMtfOutput::DrawRect( const Rectangle& rRect, BOOL bEdge ) +void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge ) { UpdateClipRegion(); UpdateFillStyle(); @@ -1247,7 +1247,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) //----------------------------------------------------------------------------------- -void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, BOOL bTo ) +void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, sal_Bool bTo ) { UpdateClipRegion(); UpdateLineStyle(); @@ -1349,7 +1349,7 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) { if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) { - USHORT nCount = rPolygon.GetSize(); + sal_uInt16 nCount = rPolygon.GetSize(); if ( nCount ) { if ( rPolygon[ nCount - 1 ] != rPolygon[ 0 ] ) @@ -1564,7 +1564,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry pVDev->SetFont( maFont ); if( pDXArry ) { - UINT32 nLen = rText.Len(); + sal_uInt32 nLen = rText.Len(); nTextWidth = pVDev->GetTextWidth( rText.GetChar( (sal_uInt16)( nLen - 1 ) ) ); if( nLen > 1 ) nTextWidth += pDXArry[ nLen - 2 ]; @@ -1644,7 +1644,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B const Point aEmptyPoint; // #i50672# Extract whole VDev content (to match size of rBitmap) - aVDev.EnableMapMode( FALSE ); + aVDev.EnableMapMode( sal_False ); Bitmap aMask( aVDev.GetBitmap( aEmptyPoint, aSizePixel ).CreateMask( Color( COL_WHITE ) ) ); if ( aBmpEx.IsTransparent() ) @@ -1713,7 +1713,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) { // patterns aren't well supported yet sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff UpdateFillStyle(); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); SetRasterOp( nOldRop ); } else @@ -1778,7 +1778,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0x1 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1796,7 +1796,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0x7 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1805,7 +1805,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) case 0xb : { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); SetRasterOp( R2_COPYPEN ); Bitmap aMask( aBitmap ); aBitmap.Invert(); @@ -1816,7 +1816,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0xb ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1833,7 +1833,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0xd ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1845,7 +1845,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( nOperation == 0x9 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } } break; @@ -1855,7 +1855,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) { // in this case nRasterOperation is either 0 or 0xff maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) ); UpdateFillStyle(); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } break; @@ -1871,7 +1871,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) case 0x5 : // only destination is used { SetRasterOp( R2_NOT ); - DrawRect( aRect, FALSE ); + DrawRect( aRect, sal_False ); } case 0xa : // no operation break; @@ -1900,7 +1900,7 @@ void WinMtfOutput::SetDevOrg( const Point& rPoint ) //----------------------------------------------------------------------------------- -void WinMtfOutput::SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ) +void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ) { mnDevOrgX += nXAdd; mnDevOrgY += nYAdd; @@ -1942,7 +1942,7 @@ void WinMtfOutput::SetWinOrg( const Point& rPoint ) //----------------------------------------------------------------------------------- -void WinMtfOutput::SetWinOrgOffset( INT32 nXAdd, INT32 nYAdd ) +void WinMtfOutput::SetWinOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ) { mnWinOrgX += nXAdd; mnWinOrgY += nYAdd; @@ -2036,7 +2036,7 @@ void WinMtfOutput::SetWorldTransform( const XForm& rXForm ) //----------------------------------------------------------------------------------- -void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ) +void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode ) { switch( nMode ) { @@ -2200,4 +2200,3 @@ void WinMtfOutput::AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ) { rGDIMetaFile.Play( *mpGDIMetaFile, 0xFFFFFFFF ); } - |