summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-19 15:17:37 +0200
committerNoel Grandin <noel@peralex.com>2014-09-29 12:50:34 +0200
commit26f2da07b1c6074e519d28557a3d1d5518ff6cb4 (patch)
tree6981a11bc7e6fc897771277a7b60a6e3a88cff29 /vcl/source/filter
parentd9632a6effabe8554c4e7e05ee24c16acd0f4f95 (diff)
loplugin: cstylecast
Change-Id: I58ec00d6f8a4cc6188877db1330c5e32c9db12e5
Diffstat (limited to 'vcl/source/filter')
-rw-r--r--vcl/source/filter/graphicfilter.cxx16
-rw-r--r--vcl/source/filter/igif/gifread.cxx4
-rw-r--r--vcl/source/filter/ixbm/xbmread.cxx2
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx2
-rw-r--r--vcl/source/filter/jpeg/jpeg.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx62
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx80
7 files changed, 84 insertions, 84 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 2f38fbf764ed..79be1aadf326 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1334,7 +1334,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
sal_uInt16 nStatus;
GraphicReader* pContext = rGraphic.GetContext();
GfxLinkType eLinkType = GFX_LINK_TYPE_NONE;
- bool bDummyContext = ( pContext == (GraphicReader*) 1 );
+ bool bDummyContext = ( pContext == reinterpret_cast<GraphicReader*>(1) );
const bool bLinkSet = rGraphic.IsLink();
FilterConfigItem* pFilterConfigItem = NULL;
@@ -1395,7 +1395,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
// if pending, return GRFILTER_OK in order to request more bytes
if( rIStream.GetError() == ERRCODE_IO_PENDING )
{
- rGraphic.SetContext( (GraphicReader*) 1 );
+ rGraphic.SetContext( reinterpret_cast<GraphicReader*>(1) );
rIStream.ResetError();
rIStream.Seek( nStreamBegin );
return (sal_uInt16) ImplSetError( GRFILTER_OK );
@@ -1425,7 +1425,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
{
if( aFilterName.equalsIgnoreAsciiCase( IMP_GIF ) )
{
- if( rGraphic.GetContext() == (GraphicReader*) 1 )
+ if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
rGraphic.SetContext( NULL );
if( !ImportGIF( rIStream, rGraphic ) )
@@ -1435,7 +1435,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
}
else if( aFilterName.equalsIgnoreAsciiCase( IMP_PNG ) )
{
- if ( rGraphic.GetContext() == (GraphicReader*) 1 )
+ if ( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
rGraphic.SetContext( NULL );
vcl::PNGReader aPNGReader( rIStream );
@@ -1486,7 +1486,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
}
else if( aFilterName.equalsIgnoreAsciiCase( IMP_JPEG ) )
{
- if( rGraphic.GetContext() == (GraphicReader*) 1 )
+ if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
rGraphic.SetContext( NULL );
// set LOGSIZE flag always, if not explicitly disabled
@@ -1501,7 +1501,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
}
else if( aFilterName.equalsIgnoreAsciiCase( IMP_SVG ) )
{
- if( rGraphic.GetContext() == (GraphicReader*) 1 )
+ if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
rGraphic.SetContext( NULL );
const sal_uInt32 nStreamPosition(rIStream.Tell());
@@ -1570,7 +1570,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
}
else if( aFilterName.equalsIgnoreAsciiCase( IMP_XBM ) )
{
- if( rGraphic.GetContext() == (GraphicReader*) 1 )
+ if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
rGraphic.SetContext( NULL );
if( !ImportXBM( rIStream, rGraphic ) )
@@ -1578,7 +1578,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
}
else if( aFilterName.equalsIgnoreAsciiCase( IMP_XPM ) )
{
- if( rGraphic.GetContext() == (GraphicReader*) 1 )
+ if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
rGraphic.SetContext( NULL );
if( !ImportXPM( rIStream, rGraphic ) )
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index a3633cd1eedf..9602e852910b 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -797,8 +797,8 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic )
bool ImportGIF( SvStream & rStm, Graphic& rGraphic )
{
- GIFReader* pGIFReader = (GIFReader*) rGraphic.GetContext();
- sal_uInt16 nOldFormat = rStm.GetNumberFormatInt();
+ GIFReader* pGIFReader = static_cast<GIFReader*>(rGraphic.GetContext());
+ sal_uInt16 nOldFormat = rStm.GetNumberFormatInt();
ReadState eReadState;
bool bRet = true;
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index b2910844843c..95603d4dc6b9 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -338,7 +338,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
bool ImportXBM( SvStream& rStm, Graphic& rGraphic )
{
- XBMReader* pXBMReader = (XBMReader*) rGraphic.GetContext();
+ XBMReader* pXBMReader = static_cast<XBMReader*>( rGraphic.GetContext() );
ReadState eReadState;
bool bRet = true;
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index 04bc86645a8d..3b4b562e3eb9 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -640,7 +640,7 @@ bool XPMReader::ImplGetString( void )
bool ImportXPM( SvStream& rStm, Graphic& rGraphic )
{
- XPMReader* pXPMReader = (XPMReader*) rGraphic.GetContext();
+ XPMReader* pXPMReader = static_cast<XPMReader*>(rGraphic.GetContext());
ReadState eReadState;
bool bRet = true;
diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx
index 2f448e141fa0..1f7d0e1ab387 100644
--- a/vcl/source/filter/jpeg/jpeg.cxx
+++ b/vcl/source/filter/jpeg/jpeg.cxx
@@ -30,7 +30,7 @@ bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, void* pCallerData, s
ReadState eReadState;
bool bReturn = true;
- JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext();
+ JPEGReader* pJPEGReader = static_cast<JPEGReader*>( rGraphic.GetContext() );
if( !pJPEGReader )
{
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 369be8b4b5d2..ac64e2bb7b82 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -989,7 +989,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
case( META_PIXEL_ACTION ):
{
- const MetaPixelAction* pA = (const MetaPixelAction*) pAction;
+ const MetaPixelAction* pA = static_cast<const MetaPixelAction*>(pAction);
ImplCheckLineAttr();
ImplBeginRecord( WIN_EMR_SETPIXELV );
@@ -1003,7 +1003,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev.IsLineColor() )
{
- const MetaPointAction* pA = (const MetaPointAction*) pAction;
+ const MetaPointAction* pA = static_cast<const MetaPointAction*>(pAction);
ImplCheckLineAttr();
ImplBeginRecord( WIN_EMR_SETPIXELV );
@@ -1018,7 +1018,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev.IsLineColor() )
{
- const MetaLineAction* pA = (const MetaLineAction*) pAction;
+ const MetaLineAction* pA = static_cast<const MetaLineAction*>(pAction);
if(pA->GetLineInfo().IsDefault())
{
@@ -1053,7 +1053,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev.IsLineColor() || maVDev.IsFillColor() )
{
- const MetaRectAction* pA = (const MetaRectAction*) pAction;
+ const MetaRectAction* pA = static_cast<const MetaRectAction*>(pAction);
ImplCheckFillAttr();
ImplCheckLineAttr();
@@ -1069,7 +1069,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev.IsLineColor() || maVDev.IsFillColor() )
{
- const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction;
+ const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pAction);
ImplCheckFillAttr();
ImplCheckLineAttr();
@@ -1086,7 +1086,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev.IsLineColor() || maVDev.IsFillColor() )
{
- const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction;
+ const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction);
ImplCheckFillAttr();
ImplCheckLineAttr();
@@ -1111,27 +1111,27 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
case( META_ARC_ACTION ):
{
- const MetaArcAction* pA = (const MetaArcAction*) pAction;
+ const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction);
aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC );
}
break;
case( META_PIE_ACTION ):
{
- const MetaPieAction* pA = (const MetaPieAction*) pAction;
+ const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction);
aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE );
}
break;
case( META_CHORD_ACTION ):
{
- const MetaChordAction* pA = (const MetaChordAction*) pAction;
+ const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction);
aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD );
}
break;
case( META_POLYGON_ACTION ):
- aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon();
+ aPoly = static_cast<const MetaPolygonAction*>(pAction)->GetPolygon();
break;
}
@@ -1144,7 +1144,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev.IsLineColor() )
{
- const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction;
+ const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction);
const Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
@@ -1166,13 +1166,13 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_POLYPOLYGON_ACTION ):
{
if( maVDev.IsLineColor() || maVDev.IsFillColor() )
- ImplWritePolyPolygonRecord( ( (const MetaPolyPolygonAction*) pAction )->GetPolyPolygon() );
+ ImplWritePolyPolygonRecord( static_cast<const MetaPolyPolygonAction*>(pAction)->GetPolyPolygon() );
}
break;
case( META_GRADIENT_ACTION ):
{
- const MetaGradientAction* pA = (const MetaGradientAction*) pAction;
+ const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pAction);
GDIMetaFile aTmpMtf;
maVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf );
@@ -1182,7 +1182,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_HATCH_ACTION:
{
- const MetaHatchAction* pA = (const MetaHatchAction*) pAction;
+ const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction);
GDIMetaFile aTmpMtf;
maVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf );
@@ -1192,9 +1192,9 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_TRANSPARENT_ACTION:
{
- const PolyPolygon& rPolyPoly = ( (MetaTransparentAction*) pAction )->GetPolyPolygon();
+ const PolyPolygon& rPolyPoly = static_cast<const MetaTransparentAction*>(pAction)->GetPolyPolygon();
if( rPolyPoly.Count() )
- ImplWritePlusFillPolygonRecord( rPolyPoly[0], ( (MetaTransparentAction*)pAction)->GetTransparence() );
+ ImplWritePlusFillPolygonRecord( rPolyPoly[0], static_cast<const MetaTransparentAction*>(pAction)->GetTransparence() );
ImplCheckFillAttr();
ImplCheckLineAttr();
ImplWritePolyPolygonRecord( rPolyPoly );
@@ -1207,7 +1207,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_FLOATTRANSPARENT_ACTION:
{
- const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction;
+ const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() );
Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() );
@@ -1238,7 +1238,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_EPS_ACTION ):
{
- const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
+ const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
const GDIMetaFile aSubstitute( pA->GetSubstitute() );
for( size_t i = 0, nCount = aSubstitute.GetActionSize(); i < nCount; i++ )
@@ -1270,21 +1270,21 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMP_ACTION:
{
- const MetaBmpAction* pA = (const MetaBmpAction *) pAction;
+ const MetaBmpAction* pA = static_cast<const MetaBmpAction *>(pAction);
ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), maVDev.PixelToLogic( pA->GetBitmap().GetSizePixel() ), WIN_SRCCOPY );
}
break;
case META_BMPSCALE_ACTION:
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY );
}
break;
case META_BMPSCALEPART_ACTION:
{
- const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction;
+ const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction);
Bitmap aTmp( pA->GetBitmap() );
if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
@@ -1294,7 +1294,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMPEX_ACTION:
{
- const MetaBmpExAction* pA = (const MetaBmpExAction *) pAction;
+ const MetaBmpExAction* pA = static_cast<const MetaBmpExAction *>(pAction);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
Bitmap aMsk( pA->GetBitmapEx().GetMask() );
@@ -1312,7 +1312,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMPEXSCALE_ACTION:
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
Bitmap aMsk( pA->GetBitmapEx().GetMask() );
@@ -1330,7 +1330,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMPEXSCALEPART_ACTION:
{
- const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction;
+ const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction);
BitmapEx aBmpEx( pA->GetBitmapEx() );
aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Bitmap aBmp( aBmpEx.GetBitmap() );
@@ -1350,7 +1350,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_TEXT_ACTION:
{
- const MetaTextAction* pA = (const MetaTextAction*) pAction;
+ const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
ImplCheckTextAttr();
@@ -1360,7 +1360,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_TEXTRECT_ACTION:
{
- const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
+ const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
const OUString aText( pA->GetText() );
ImplCheckTextAttr();
@@ -1370,7 +1370,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_TEXTARRAY_ACTION:
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
ImplCheckTextAttr();
@@ -1380,7 +1380,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_STRETCHTEXT_ACTION:
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
ImplCheckTextAttr();
@@ -1418,7 +1418,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
( (MetaAction*) pAction )->Execute( &maVDev );
ImplBeginRecord( WIN_EMR_INTERSECTCLIPRECT );
- ImplWriteRect( ( (MetaISectRectClipRegionAction*) pAction )->GetRect() );
+ ImplWriteRect( static_cast<const MetaISectRectClipRegionAction*>(pAction)->GetRect() );
ImplEndRecord();
}
break;
@@ -1461,13 +1461,13 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_RASTEROP_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
- ImplWriteRasterOp( ( (MetaRasterOpAction*) pAction )->GetRasterOp() );
+ ImplWriteRasterOp( static_cast<const MetaRasterOpAction*>(pAction)->GetRasterOp() );
}
break;
case( META_LAYOUTMODE_ACTION ):
{
- ComplexTextLayoutMode nLayoutMode = ( (MetaLayoutModeAction*) pAction )->GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = static_cast<const MetaLayoutModeAction*>(pAction)->GetLayoutMode();
mnHorTextAlign = 0;
if ((nLayoutMode & TEXT_LAYOUT_BIDI_RTL) != TEXT_LAYOUT_DEFAULT)
{
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 8538d932a63d..a4b0b67ebd81 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1020,7 +1020,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
case META_PIXEL_ACTION:
{
- const MetaPixelAction* pA = (const MetaPixelAction *) pMA;
+ const MetaPixelAction* pA = static_cast<const MetaPixelAction *>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_SetPixel( pA->GetPoint(), pA->GetColor() );
@@ -1029,7 +1029,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_POINT_ACTION:
{
- const MetaPointAction* pA = (const MetaPointAction*) pMA;
+ const MetaPointAction* pA = static_cast<const MetaPointAction*>(pMA);
const Point& rPt = pA->GetPoint();
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
@@ -1040,7 +1040,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_LINE_ACTION:
{
- const MetaLineAction* pA = (const MetaLineAction *) pMA;
+ const MetaLineAction* pA = static_cast<const MetaLineAction *>(pMA);
if(pA->GetLineInfo().IsDefault())
{
aSrcLineInfo = pA->GetLineInfo();
@@ -1061,7 +1061,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_RECT_ACTION:
{
- const MetaRectAction* pA = (const MetaRectAction*) pMA;
+ const MetaRectAction* pA = static_cast<const MetaRectAction*>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_Rectangle( pA->GetRect() );
@@ -1070,7 +1070,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_ROUNDRECT_ACTION:
{
- const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pMA;
+ const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_RoundRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() );
@@ -1079,7 +1079,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_ELLIPSE_ACTION:
{
- const MetaEllipseAction* pA = (const MetaEllipseAction*) pMA;
+ const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_Ellipse( pA->GetRect() );
@@ -1088,7 +1088,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_ARC_ACTION:
{
- const MetaArcAction* pA = (const MetaArcAction*) pMA;
+ const MetaArcAction* pA = static_cast<const MetaArcAction*>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_Arc( pA->GetRect(),pA->GetStartPoint(),pA->GetEndPoint() );
@@ -1097,7 +1097,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_PIE_ACTION:
{
- const MetaPieAction* pA = (const MetaPieAction*) pMA;
+ const MetaPieAction* pA = static_cast<const MetaPieAction*>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_Pie( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() );
@@ -1106,7 +1106,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_CHORD_ACTION:
{
- const MetaChordAction* pA = (const MetaChordAction*) pMA;
+ const MetaChordAction* pA = static_cast<const MetaChordAction*>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_Chord( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() );
@@ -1115,7 +1115,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_POLYLINE_ACTION:
{
- const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA;
+ const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pMA);
const Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
@@ -1137,7 +1137,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_POLYGON_ACTION:
{
- const MetaPolygonAction* pA = (const MetaPolygonAction*) pMA;
+ const MetaPolygonAction* pA = static_cast<const MetaPolygonAction*>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_Polygon( pA->GetPolygon() );
@@ -1146,7 +1146,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_POLYPOLYGON_ACTION:
{
- const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pMA;
+ const MetaPolyPolygonAction* pA = static_cast<const MetaPolyPolygonAction*>(pMA);
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
WMFRecord_PolyPolygon( pA->GetPolyPolygon() );
@@ -1155,7 +1155,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_TEXTRECT_ACTION:
{
- const MetaTextRectAction * pA = (const MetaTextRectAction*)pMA;
+ const MetaTextRectAction * pA = static_cast<const MetaTextRectAction*>(pMA);
OUString aTemp( pA->GetText() );
aSrcLineInfo = LineInfo();
SetAllAttr();
@@ -1168,7 +1168,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_TEXT_ACTION:
{
- const MetaTextAction * pA = (const MetaTextAction*) pMA;
+ const MetaTextAction * pA = static_cast<const MetaTextAction*>(pMA);
OUString aTemp = pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
aSrcLineInfo = LineInfo();
SetAllAttr();
@@ -1179,7 +1179,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_TEXTARRAY_ACTION:
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pMA);
OUString aTemp = pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
aSrcLineInfo = LineInfo();
@@ -1191,7 +1191,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_STRETCHTEXT_ACTION:
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction *) pMA;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction *>(pMA);
OUString aTemp = pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
sal_uInt16 nLen,i;
@@ -1214,21 +1214,21 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_BMP_ACTION:
{
- const MetaBmpAction* pA = (const MetaBmpAction *) pMA;
+ const MetaBmpAction* pA = static_cast<const MetaBmpAction *>(pMA);
WMFRecord_StretchDIB( pA->GetPoint(), pA->GetBitmap().GetSizePixel(), pA->GetBitmap() );
}
break;
case META_BMPSCALE_ACTION:
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pMA;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pMA);
WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), pA->GetBitmap() );
}
break;
case META_BMPSCALEPART_ACTION:
{
- const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pMA;
+ const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pMA);
Bitmap aTmp( pA->GetBitmap() );
if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
@@ -1238,7 +1238,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_BMPEX_ACTION:
{
- const MetaBmpExAction* pA = (const MetaBmpExAction *) pMA;
+ const MetaBmpExAction* pA = static_cast<const MetaBmpExAction *>(pMA);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
Bitmap aMsk( pA->GetBitmapEx().GetMask() );
@@ -1256,7 +1256,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_BMPEXSCALE_ACTION:
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pMA);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
Bitmap aMsk( pA->GetBitmapEx().GetMask() );
@@ -1274,7 +1274,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_BMPEXSCALEPART_ACTION:
{
- const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA;
+ const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pMA);
BitmapEx aBmpEx( pA->GetBitmapEx() );
aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Bitmap aBmp( aBmpEx.GetBitmap() );
@@ -1294,7 +1294,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_GRADIENT_ACTION:
{
- const MetaGradientAction* pA = (const MetaGradientAction*) pMA;
+ const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pMA);
GDIMetaFile aTmpMtf;
pVirDev->AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf );
@@ -1304,7 +1304,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_HATCH_ACTION:
{
- const MetaHatchAction* pA = (const MetaHatchAction*) pMA;
+ const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pMA);
GDIMetaFile aTmpMtf;
pVirDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf );
@@ -1314,7 +1314,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_WALLPAPER_ACTION:
{
- const MetaWallpaperAction* pA = (const MetaWallpaperAction*) pMA;
+ const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pMA);
const Color& rColor = pA->GetWallpaper().GetColor();
const Color aOldLineColor( aSrcLineColor );
const Color aOldFillColor( aSrcFillColor );
@@ -1331,14 +1331,14 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_ISECTRECTCLIPREGION_ACTION:
{
- const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA;
+ const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pMA);
WMFRecord_IntersectClipRect( pA->GetRect() );
}
break;
case META_LINECOLOR_ACTION:
{
- const MetaLineColorAction* pA = (const MetaLineColorAction*) pMA;
+ const MetaLineColorAction* pA = static_cast<const MetaLineColorAction*>(pMA);
if( pA->IsSetting() )
aSrcLineColor = pA->GetColor();
@@ -1349,7 +1349,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_FILLCOLOR_ACTION:
{
- const MetaFillColorAction* pA = (const MetaFillColorAction*) pMA;
+ const MetaFillColorAction* pA = static_cast<const MetaFillColorAction*>(pMA);
if( pA->IsSetting() )
aSrcFillColor = pA->GetColor();
@@ -1360,14 +1360,14 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_TEXTCOLOR_ACTION:
{
- const MetaTextColorAction* pA = (const MetaTextColorAction*) pMA;
+ const MetaTextColorAction* pA = static_cast<const MetaTextColorAction*>(pMA);
aSrcTextColor = pA->GetColor();
}
break;
case META_TEXTFILLCOLOR_ACTION:
{
- const MetaTextFillColorAction* pA = (const MetaTextFillColorAction*) pMA;
+ const MetaTextFillColorAction* pA = static_cast<const MetaTextFillColorAction*>(pMA);
if( pA->IsSetting() )
aSrcFont.SetFillColor( pA->GetColor() );
else
@@ -1377,14 +1377,14 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_TEXTALIGN_ACTION:
{
- const MetaTextAlignAction* pA = (const MetaTextAlignAction*) pMA;
+ const MetaTextAlignAction* pA = static_cast<const MetaTextAlignAction*>(pMA);
eSrcTextAlign = pA->GetTextAlign();
}
break;
case META_MAPMODE_ACTION:
{
- const MetaMapModeAction* pA = (const MetaMapModeAction*) pMA;
+ const MetaMapModeAction* pA = static_cast<const MetaMapModeAction*>(pMA);
if (aSrcMapMode!=pA->GetMapMode())
{
@@ -1438,7 +1438,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_FONT_ACTION:
{
- const MetaFontAction* pA = (const MetaFontAction*) pMA;
+ const MetaFontAction* pA = static_cast<const MetaFontAction*>(pMA);
aSrcFont = pA->GetFont();
if ( (aSrcFont.GetCharSet() == RTL_TEXTENCODING_DONTKNOW)
@@ -1455,7 +1455,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_PUSH_ACTION:
{
- const MetaPushAction* pA = (const MetaPushAction*)pMA;
+ const MetaPushAction* pA = static_cast<const MetaPushAction*>(pMA);
WMFWriterAttrStackMember* pAt = new WMFWriterAttrStackMember;
pAt->nFlags = pA->GetFlags();
@@ -1517,7 +1517,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_EPS_ACTION :
{
- const MetaEPSAction* pA = (const MetaEPSAction*)pMA;
+ const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pMA);
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
size_t nCount = aGDIMetaFile.GetActionSize();
@@ -1526,7 +1526,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i );
if ( pMetaAct->GetType() == META_BMPSCALE_ACTION )
{
- const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*)pMetaAct;
+ const MetaBmpScaleAction* pBmpScaleAction = static_cast<const MetaBmpScaleAction*>(pMetaAct);
WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap() );
break;
}
@@ -1536,7 +1536,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case META_RASTEROP_ACTION:
{
- const MetaRasterOpAction* pA = (const MetaRasterOpAction*) pMA;
+ const MetaRasterOpAction* pA = static_cast<const MetaRasterOpAction*>(pMA);
eSrcRasterOp=pA->GetRasterOp();
}
break;
@@ -1545,13 +1545,13 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
- WMFRecord_PolyPolygon( ( (MetaTransparentAction*) pMA )->GetPolyPolygon() );
+ WMFRecord_PolyPolygon( static_cast<const MetaTransparentAction*>(pMA)->GetPolyPolygon() );
}
break;
case META_FLOATTRANSPARENT_ACTION:
{
- const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pMA;
+ const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pMA);
GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() );
Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() );
@@ -1582,7 +1582,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case( META_LAYOUTMODE_ACTION ):
{
- ComplexTextLayoutMode nLayoutMode = ( (MetaLayoutModeAction*) pMA )->GetLayoutMode();
+ ComplexTextLayoutMode nLayoutMode = static_cast<const MetaLayoutModeAction*>(pMA)->GetLayoutMode();
eSrcHorTextAlign = 0; // TA_LEFT
if ((nLayoutMode & TEXT_LAYOUT_BIDI_RTL) != TEXT_LAYOUT_DEFAULT)
{