summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-02 15:23:28 +0200
committerNoel Grandin <noel@peralex.com>2014-10-06 07:52:55 +0200
commit0745982dc53cce65e63bd05a757aec8e96bcd564 (patch)
tree54a76476f85c93b2421a0e9fa22135f207784580
parent0096426086e52b962ba53aed2132c2f4d0942aed (diff)
loplugin: cstylecast
Change-Id: I88a106081b7413bff6313d1e07f53e39d8350002
-rw-r--r--filter/source/config/cache/basecontainer.cxx2
-rw-r--r--filter/source/config/cache/configflush.cxx2
-rw-r--r--filter/source/flash/swfexporter.cxx2
-rw-r--r--filter/source/flash/swfwriter1.cxx70
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx94
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx68
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx150
-rw-r--r--filter/source/graphicfilter/icgm/class5.cxx10
-rw-r--r--filter/source/graphicfilter/icgm/elements.cxx10
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx40
-rw-r--r--filter/source/graphicfilter/idxf/dxfreprd.cxx20
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx6
-rw-r--r--filter/source/msfilter/escherex.cxx24
-rw-r--r--filter/source/msfilter/msdffimp.cxx55
-rw-r--r--filter/source/msfilter/svdfppt.cxx60
-rw-r--r--filter/source/pdf/impdialog.cxx24
-rw-r--r--filter/source/svg/svgexport.cxx10
-rw-r--r--filter/source/svg/svgfontexport.cxx8
-rw-r--r--filter/source/svg/svgwriter.cxx100
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx2
-rw-r--r--include/svx/extrud3d.hxx16
-rw-r--r--include/svx/obj3d.hxx24
-rw-r--r--include/svx/scene3d.hxx62
-rw-r--r--include/svx/sdasitm.hxx1
-rw-r--r--svx/source/items/customshapeitem.cxx9
25 files changed, 441 insertions, 428 deletions
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index 00d85e062d27..cbf6e4685a67 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -538,7 +538,7 @@ void SAL_CALL BaseContainer::flush()
{
// ... this pointer can be interesting to find out, where will be called as listener
// Dont optimize it to a direct iterator cast :-)
- css::util::XFlushListener* pListener = (css::util::XFlushListener*)pIterator.next();
+ css::util::XFlushListener* pListener = static_cast<css::util::XFlushListener*>(pIterator.next());
pListener->flushed(aSource);
}
catch(const css::uno::Exception&)
diff --git a/filter/source/config/cache/configflush.cxx b/filter/source/config/cache/configflush.cxx
index 595efe44af4a..0f7d6ccefdeb 100644
--- a/filter/source/config/cache/configflush.cxx
+++ b/filter/source/config/cache/configflush.cxx
@@ -75,7 +75,7 @@ void SAL_CALL ConfigFlush::refresh()
{
// ... this pointer can be interesting to find out, where will be called as listener
// Dont optimize it to a direct iterator cast :-)
- css::util::XRefreshListener* pListener = (css::util::XRefreshListener*)pIterator.next();
+ css::util::XRefreshListener* pListener = static_cast<css::util::XRefreshListener*>(pIterator.next());
pListener->refreshed(aSource);
}
catch(const css::uno::Exception&)
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index 083b1589e8e5..b2bc39b6ae1c 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -718,7 +718,7 @@ bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile
{
case( META_ISECTRECTCLIPREGION_ACTION ):
{
- const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pAction;
+ const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pAction);
clipRect = pA->GetRect();
i = nCount;
break;
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index f2cf9e65b6b5..b90b3c9c397f 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -1389,7 +1389,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
{
case( META_PIXEL_ACTION ):
{
- const MetaPixelAction* pA = (const MetaPixelAction*) pAction;
+ const MetaPixelAction* pA = static_cast<const MetaPixelAction*>(pAction);
Impl_writeLine( pA->GetPoint(), pA->GetPoint(), &pA->GetColor() );
}
@@ -1397,7 +1397,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_POINT_ACTION ):
{
- const MetaPointAction* pA = (const MetaPointAction*) pAction;
+ const MetaPointAction* pA = static_cast<const MetaPointAction*>(pAction);
Impl_writeLine( pA->GetPoint(), pA->GetPoint() );
}
@@ -1405,7 +1405,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_LINE_ACTION ):
{
- const MetaLineAction* pA = (const MetaLineAction*) pAction;
+ const MetaLineAction* pA = static_cast<const MetaLineAction*>(pAction);
if(pA->GetLineInfo().IsDefault())
{
@@ -1424,13 +1424,13 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_RECT_ACTION ):
{
- Impl_writeRect( ( (const MetaRectAction*) pAction )->GetRect(), 0, 0 );
+ Impl_writeRect( static_cast<const MetaRectAction*>(pAction)->GetRect(), 0, 0 );
}
break;
case( META_ROUNDRECT_ACTION ):
{
- const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction;
+ const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pAction);
Impl_writeRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() );
}
@@ -1438,7 +1438,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_ELLIPSE_ACTION ):
{
- const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction;
+ const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction);
const Rectangle& rRect = pA->GetRect();
Impl_writeEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1 );
@@ -1456,27 +1456,27 @@ void Writer::Impl_writeActions( 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;
}
@@ -1489,7 +1489,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_POLYLINE_ACTION ):
{
- const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction;
+ const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction);
const Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
@@ -1509,7 +1509,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_POLYPOLYGON_ACTION ):
{
- const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pAction;
+ const MetaPolyPolygonAction* pA = static_cast<const MetaPolyPolygonAction*>(pAction);
const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
if( rPolyPoly.Count() )
@@ -1519,7 +1519,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_GRADIENT_ACTION ):
{
- const MetaGradientAction* pA = (const MetaGradientAction*) pAction;
+ const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pAction);
Polygon aPoly( pA->GetRect() );
Impl_writeGradientEx( aPoly, pA->GetGradient() );
@@ -1528,14 +1528,14 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_GRADIENTEX_ACTION ):
{
- const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction;
+ const MetaGradientExAction* pA = static_cast<const MetaGradientExAction*>(pAction);
Impl_writeGradientEx( pA->GetPolyPolygon(), pA->GetGradient() );
}
break;
case META_HATCH_ACTION:
{
- const MetaHatchAction* pA = (const MetaHatchAction*) pAction;
+ const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction);
GDIMetaFile aTmpMtf;
mpVDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf );
@@ -1545,7 +1545,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_TRANSPARENT_ACTION ):
{
- const MetaTransparentAction* pA = (const MetaTransparentAction*) pAction;
+ const MetaTransparentAction* pA = static_cast<const MetaTransparentAction*>(pAction);
const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
if( rPolyPoly.Count() )
@@ -1559,7 +1559,7 @@ void Writer::Impl_writeActions( 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() );
const Size aSrcSize( aTmpMtf.GetPrefSize() );
@@ -1597,7 +1597,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_EPS_ACTION ):
{
- const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
+ const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
bool bFound = false;
@@ -1608,7 +1608,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
{
bFound = true;
- const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*) pSubstAct;
+ const MetaBmpScaleAction* pBmpScaleAction = static_cast<const MetaBmpScaleAction*>(pSubstAct);
Impl_writeImage( pBmpScaleAction->GetBitmap(),
pA->GetPoint(), pA->GetSize(),
Point(), pBmpScaleAction->GetBitmap().GetSizePixel(), clipRect, 1 == bMap );
@@ -1619,7 +1619,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_COMMENT_ACTION ):
{
- const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
+ const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
const sal_uInt8* pData = pA->GetData();
if( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") )
@@ -1632,9 +1632,9 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
pAction = rMtf.GetAction( i );
if( pAction->GetType() == META_GRADIENTEX_ACTION )
- pGradAction = (const MetaGradientExAction*) pAction;
+ pGradAction = static_cast<const MetaGradientExAction*>(pAction);
else if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) )
+ ( static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) )
{
bDone = true;
}
@@ -1666,7 +1666,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
pAction = rMtf.GetAction( i );
if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCase("XPATHFILL_SEQ_END") ) )
+ ( static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("XPATHFILL_SEQ_END") ) )
{
bDone = true;
}
@@ -1696,7 +1696,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
pAction = rMtf.GetAction( i );
if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_END") ) )
+ ( static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_END") ) )
{
bDone = true;
}
@@ -1708,7 +1708,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_BMPSCALE_ACTION ):
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
Impl_writeImage( pA->GetBitmap(),
pA->GetPoint(), pA->GetSize(),
@@ -1718,7 +1718,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_BMP_ACTION ):
{
- const MetaBmpAction* pA = (const MetaBmpAction*) pAction;
+ const MetaBmpAction* pA = static_cast<const MetaBmpAction*>(pAction);
Impl_writeImage( pA->GetBitmap(),
pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmap().GetSizePixel()),
Point(), pA->GetBitmap().GetSizePixel(), clipRect, 1 ==bMap );
@@ -1727,7 +1727,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_BMPSCALEPART_ACTION ):
{
- const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction;
+ const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction);
Impl_writeImage( pA->GetBitmap(),
pA->GetDestPoint(), pA->GetDestSize(),
pA->GetSrcPoint(), pA->GetSrcSize(), clipRect, 1 == bMap );
@@ -1736,7 +1736,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_BMPEX_ACTION ):
{
- const MetaBmpExAction* pA = (const MetaBmpExAction*) pAction;
+ const MetaBmpExAction* pA = static_cast<const MetaBmpExAction*>(pAction);
Impl_writeImage( pA->GetBitmapEx(),
pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmapEx().GetSizePixel() ),
Point(), pA->GetBitmapEx().GetSizePixel(), clipRect, 1 == bMap );
@@ -1745,7 +1745,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_BMPEXSCALE_ACTION ):
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
Impl_writeImage( pA->GetBitmapEx(),
pA->GetPoint(), pA->GetSize(),
Point(), pA->GetBitmapEx().GetSizePixel(), clipRect, 1 == bMap );
@@ -1754,7 +1754,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_BMPEXSCALEPART_ACTION ):
{
- const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction;
+ const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction);
Impl_writeImage( pA->GetBitmapEx(),
pA->GetDestPoint(), pA->GetDestSize(),
pA->GetSrcPoint(), pA->GetSrcSize(), clipRect, 1 == bMap );
@@ -1763,35 +1763,35 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( META_TEXT_ACTION ):
{
- const MetaTextAction* pA = (const MetaTextAction*) pAction;
+ const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction);
Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), NULL, 0);
}
break;
case( META_TEXTRECT_ACTION ):
{
- const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
+ const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
Impl_writeText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0 );
}
break;
case( META_TEXTARRAY_ACTION ):
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction);
Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), pA->GetDXArray(), 0 );
}
break;
case( META_STRETCHTEXT_ACTION ):
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction);
Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), NULL, pA->GetWidth() );
}
break;
case( META_ISECTRECTCLIPREGION_ACTION ):
{
- const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pAction;
+ const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pAction);
clipRect = pA->GetRect();
}
// fall-through
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 8aaa5b2c8b74..d1a145941272 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -318,7 +318,7 @@ void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF)
{
case META_EPS_ACTION :
{
- const GDIMetaFile aGDIMetaFile( ((const MetaEPSAction*)pMA)->GetSubstitute() );
+ const GDIMetaFile aGDIMetaFile( static_cast<const MetaEPSAction*>(pMA)->GetSubstitute() );
size_t nCount = aGDIMetaFile.GetActionSize();
size_t i;
for ( i = 0; i < nCount; i++ )
@@ -413,7 +413,7 @@ void METWriter::CreateChrSets(const GDIMetaFile * pMTF)
{
case META_FONT_ACTION:
{
- const MetaFontAction* pA = (const MetaFontAction*) pMA;
+ const MetaFontAction* pA = static_cast<const MetaFontAction*>(pMA);
CreateChrSet( pA->GetFont() );
}
break;
@@ -748,48 +748,48 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
case META_BMP_ACTION:
{
METSetMix( eGDIRasterOp );
- WriteImageObject( ( (MetaBmpAction*) pMA )->GetBitmap() );
+ WriteImageObject( static_cast<const MetaBmpAction*>(pMA)->GetBitmap() );
}
break;
case META_BMPSCALE_ACTION:
{
METSetMix( eGDIRasterOp );
- WriteImageObject( ( (MetaBmpScaleAction*) pMA )->GetBitmap() );
+ WriteImageObject( static_cast<const MetaBmpScaleAction*>(pMA)->GetBitmap() );
}
break;
case META_BMPSCALEPART_ACTION:
{
METSetMix( eGDIRasterOp );
- WriteImageObject( ( (MetaBmpScalePartAction*) pMA )->GetBitmap() );
+ WriteImageObject( static_cast<const MetaBmpScalePartAction*>(pMA)->GetBitmap() );
}
break;
case META_BMPEX_ACTION:
{
METSetMix( eGDIRasterOp );
- WriteImageObject( Graphic( ( (MetaBmpExAction*) pMA )->GetBitmapEx() ).GetBitmap() );
+ WriteImageObject( Graphic( static_cast<const MetaBmpExAction*>(pMA)->GetBitmapEx() ).GetBitmap() );
}
break;
case META_BMPEXSCALE_ACTION:
{
METSetMix( eGDIRasterOp );
- WriteImageObject( Graphic( ( (MetaBmpExScaleAction*) pMA )->GetBitmapEx() ).GetBitmap() );
+ WriteImageObject( Graphic( static_cast<const MetaBmpExScaleAction*>(pMA)->GetBitmapEx() ).GetBitmap() );
}
break;
case META_BMPEXSCALEPART_ACTION:
{
METSetMix( eGDIRasterOp );
- WriteImageObject( Graphic( ( (MetaBmpExScalePartAction*) pMA )->GetBitmapEx() ).GetBitmap() );
+ WriteImageObject( Graphic( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetBitmapEx() ).GetBitmap() );
}
break;
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();
@@ -798,7 +798,7 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
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);
METSetMix( eGDIRasterOp );
WriteImageObject( pBmpScaleAction->GetBitmap() );
break;
@@ -1502,7 +1502,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
{
case META_PIXEL_ACTION:
{
- const MetaPixelAction* pA = (const MetaPixelAction*) pMA;
+ const MetaPixelAction* pA = static_cast<const MetaPixelAction*>(pMA);
METSetMix( eGDIRasterOp );
METSetColor( pA->GetColor() );
METLine( pA->GetPoint(),pA->GetPoint() );
@@ -1511,7 +1511,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_POINT_ACTION:
{
- const MetaPointAction* pA = (const MetaPointAction*) pMA;
+ const MetaPointAction* pA = static_cast<const MetaPointAction*>(pMA);
METSetArcParams(1,1,0,0);
METSetMix(eGDIRasterOp);
@@ -1524,7 +1524,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_LINE_ACTION:
{
- const MetaLineAction* pA = (const MetaLineAction*) pMA;
+ const MetaLineAction* pA = static_cast<const MetaLineAction*>(pMA);
if( aGDILineColor != Color( COL_TRANSPARENT ) )
{
@@ -1547,7 +1547,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_RECT_ACTION:
{
- const MetaRectAction* pA = (const MetaRectAction*) pMA;
+ const MetaRectAction* pA = static_cast<const MetaRectAction*>(pMA);
if( aGDIFillColor != Color( COL_TRANSPARENT ) )
{
@@ -1568,7 +1568,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_ROUNDRECT_ACTION:
{
- const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pMA;
+ const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pMA);
if( aGDIFillColor != Color( COL_TRANSPARENT ) )
{
@@ -1589,7 +1589,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_ELLIPSE_ACTION:
{
- const MetaEllipseAction* pA = (const MetaEllipseAction*) pMA;
+ const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pMA);
Point aCenter;
aCenter.X()=(pA->GetRect().Left()+pA->GetRect().Right())/2;
@@ -1618,7 +1618,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_ARC_ACTION:
{
- const MetaArcAction* pA = (const MetaArcAction*) pMA;
+ const MetaArcAction* pA = static_cast<const MetaArcAction*>(pMA);
Point aStartPos,aCenter;
double fdx,fdy,fa1,fa2;
@@ -1655,7 +1655,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_PIE_ACTION:
{
- const MetaPieAction* pA = (const MetaPieAction*) pMA;
+ const MetaPieAction* pA = static_cast<const MetaPieAction*>(pMA);
Point aCenter;
double fdx,fdy,fa1,fa2;
@@ -1705,7 +1705,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_CHORD_ACTION:
{
- const MetaChordAction* pA = (const MetaChordAction*) pMA;
+ const MetaChordAction* pA = static_cast<const MetaChordAction*>(pMA);
Point aStartPos,aCenter;
double fdx,fdy,fa1,fa2;
@@ -1755,7 +1755,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_POLYLINE_ACTION:
{
- const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA;
+ const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pMA);
if( aGDILineColor != Color( COL_TRANSPARENT ) )
{
@@ -1784,7 +1784,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_POLYGON_ACTION:
{
- const MetaPolygonAction* pA = (const MetaPolygonAction*) pMA;
+ const MetaPolygonAction* pA = static_cast<const MetaPolygonAction*>(pMA);
Polygon aSimplePoly;
const Polygon& rPoly = pA->GetPolygon();
if ( rPoly.HasFlags() )
@@ -1816,7 +1816,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_POLYPOLYGON_ACTION:
{
- const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pMA;
+ const MetaPolyPolygonAction* pA = static_cast<const MetaPolyPolygonAction*>(pMA);
tools::PolyPolygon aSimplePolyPoly( pA->GetPolyPolygon() );
sal_uInt16 i, nCount = aSimplePolyPoly.Count();
@@ -1854,7 +1854,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_TEXT_ACTION:
{
- const MetaTextAction* pA = (const MetaTextAction*) pMA;
+ const MetaTextAction* pA = static_cast<const MetaTextAction*>(pMA);
Point aPt( pA->GetPoint() );
if( aGDIFont.GetAlign() != ALIGN_BASELINE)
@@ -1879,8 +1879,8 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_TEXTARRAY_ACTION:
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA;
- sal_uInt16 i;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pMA);
+ sal_uInt16 i;
OUString aStr;
Polygon aPolyDummy(1);
short nOrientation;
@@ -1930,7 +1930,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_STRETCHTEXT_ACTION:
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pMA;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pMA);
VirtualDevice aVDev;
sal_uInt16 i;
sal_Int32 nNormSize;
@@ -1986,7 +1986,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_BMP_ACTION:
{
- const MetaBmpAction* pA = (const MetaBmpAction*) pMA;
+ const MetaBmpAction* pA = static_cast<const MetaBmpAction*>(pMA);
const Size aSizePixel( pA->GetBitmap().GetSizePixel() );
METSetMix(eGDIRasterOp);
@@ -1996,7 +1996,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_BMPSCALE_ACTION:
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pMA;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pMA);
METSetMix(eGDIRasterOp);
METBitBlt( pA->GetPoint(), pA->GetSize(), pA->GetBitmap().GetSizePixel() );
@@ -2005,7 +2005,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_BMPSCALEPART_ACTION:
{
- const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pMA;
+ const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pMA);
Bitmap aTmp( pA->GetBitmap() );
aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
@@ -2016,7 +2016,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_BMPEX_ACTION:
{
- const MetaBmpExAction* pA = (const MetaBmpExAction*) pMA;
+ const MetaBmpExAction* pA = static_cast<const MetaBmpExAction*>(pMA);
const Size aSizePixel( pA->GetBitmapEx().GetSizePixel() );
METSetMix( eGDIRasterOp );
@@ -2026,7 +2026,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_BMPEXSCALE_ACTION:
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pMA);
const Size aSizePixel( pA->GetBitmapEx().GetSizePixel() );
METSetMix( eGDIRasterOp );
@@ -2036,7 +2036,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_BMPEXSCALEPART_ACTION:
{
- const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA;
+ const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pMA);
Bitmap aTmp( Graphic( pA->GetBitmapEx() ).GetBitmap() );
aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
@@ -2047,7 +2047,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
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();
@@ -2056,7 +2056,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
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);
METSetMix(eGDIRasterOp);
METBitBlt( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap().GetSizePixel() );
break;
@@ -2078,7 +2078,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
{
VirtualDevice aVDev;
GDIMetaFile aTmpMtf;
- const MetaGradientAction* pA = (const MetaGradientAction*) pMA;
+ const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pMA);
aVDev.SetMapMode( aTargetMapMode );
aVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf );
@@ -2090,7 +2090,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
{
VirtualDevice aVDev;
GDIMetaFile aTmpMtf;
- const MetaHatchAction* pA = (const MetaHatchAction*) pMA;
+ const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pMA);
aVDev.SetMapMode( aTargetMapMode );
aVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf );
@@ -2106,7 +2106,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_ISECTRECTCLIPREGION_ACTION:
{
- const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA;
+ const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pMA);
WriteClipRect( pA->GetRect() );
}
break;
@@ -2119,7 +2119,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_LINECOLOR_ACTION:
{
- const MetaLineColorAction* pA = (const MetaLineColorAction*) pMA;
+ const MetaLineColorAction* pA = static_cast<const MetaLineColorAction*>(pMA);
if( pA->IsSetting() )
aGDILineColor = pA->GetColor();
@@ -2130,7 +2130,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_FILLCOLOR_ACTION:
{
- const MetaFillColorAction* pA = (const MetaFillColorAction*) pMA;
+ const MetaFillColorAction* pA = static_cast<const MetaFillColorAction*>(pMA);
if( pA->IsSetting() )
aGDIFillColor = pA->GetColor();
@@ -2141,14 +2141,14 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_TEXTCOLOR_ACTION:
{
- const MetaTextColorAction* pA = (const MetaTextColorAction*) pMA;
+ const MetaTextColorAction* pA = static_cast<const MetaTextColorAction*>(pMA);
aGDIFont.SetColor( pA->GetColor() );
}
break;
case META_TEXTFILLCOLOR_ACTION:
{
- const MetaTextFillColorAction* pA = (const MetaTextFillColorAction*) pMA;
+ const MetaTextFillColorAction* pA = static_cast<const MetaTextFillColorAction*>(pMA);
if( pA->IsSetting() )
aGDIFont.SetFillColor( pA->GetColor() );
@@ -2162,7 +2162,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_MAPMODE_ACTION:
{
- const MetaMapModeAction* pA = (const MetaMapModeAction*) pMA;
+ const MetaMapModeAction* pA = static_cast<const MetaMapModeAction*>(pMA);
if( aPictureMapMode != pA->GetMapMode() )
{
@@ -2229,7 +2229,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_FONT_ACTION:
{
- aGDIFont = ( (const MetaFontAction*) pMA )->GetFont();
+ aGDIFont = static_cast<const MetaFontAction*>(pMA)->GetFont();
}
break;
@@ -2268,7 +2268,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
case META_RASTEROP_ACTION:
{
- eGDIRasterOp = ( (const MetaRasterOpAction*) pMA )->GetRasterOp();
+ eGDIRasterOp = static_cast<const MetaRasterOpAction*>(pMA)->GetRasterOp();
}
break;
@@ -2280,7 +2280,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
METSetColor(aGDIFillColor);
METSetBackgroundColor(aGDIFillColor);
METBeginPath(1);
- METLine(( (const MetaTransparentAction*) pMA )->GetPolyPolygon());
+ METLine( static_cast<const MetaTransparentAction*>(pMA)->GetPolyPolygon());
METEndPath();
METFillPath(1);
}
@@ -2290,7 +2290,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
METSetMix(eGDIRasterOp);
METSetColor(aGDILineColor);
METBeginPath(1);
- METLine(( (const MetaTransparentAction*) pMA )->GetPolyPolygon());
+ METLine( static_cast<const MetaTransparentAction*>(pMA)->GetPolyPolygon());
METEndPath();
METOutlinePath(1);
}
@@ -2299,7 +2299,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
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() );
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index e5fee90e9bdd..1aad8c1e22db 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -1411,7 +1411,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
{
case META_PIXEL_ACTION:
{
- const MetaPixelAction* pA = (const MetaPixelAction*) pMA;
+ const MetaPixelAction* pA = static_cast<const MetaPixelAction*>(pMA);
WriteOpcode_PnMode(eSrcRasterOp);
WriteOpcode_PnSize(1);
WriteOpcode_RGBFgCol(pA->GetColor());
@@ -1422,7 +1422,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_POINT_ACTION:
{
- const MetaPointAction* pA = (const MetaPointAction*) pMA;
+ const MetaPointAction* pA = static_cast<const MetaPointAction*>(pMA);
if( aLineColor != Color( COL_TRANSPARENT ) )
{
@@ -1434,7 +1434,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_LINE_ACTION:
{
- const MetaLineAction* pA = (const MetaLineAction*) pMA;
+ const MetaLineAction* pA = static_cast<const MetaLineAction*>(pMA);
if( aLineColor != Color( COL_TRANSPARENT ) )
{
@@ -1457,7 +1457,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_RECT_ACTION:
{
- const MetaRectAction* pA = (const MetaRectAction*) pMA;
+ const MetaRectAction* pA = static_cast<const MetaRectAction*>(pMA);
if (aFillColor!=Color( COL_TRANSPARENT ))
{
@@ -1479,7 +1479,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_ROUNDRECT_ACTION:
{
- const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pMA;
+ const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pMA);
WriteOpcode_OvSize( Size( pA->GetHorzRound(), pA->GetVertRound() ) );
@@ -1503,7 +1503,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_ELLIPSE_ACTION:
{
- const MetaEllipseAction* pA = (const MetaEllipseAction*) pMA;
+ const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pMA);
if (aFillColor!=Color( COL_TRANSPARENT ))
{
@@ -1525,7 +1525,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_ARC_ACTION:
{
- const MetaArcAction* pA = (const MetaArcAction*) pMA;
+ const MetaArcAction* pA = static_cast<const MetaArcAction*>(pMA);
if (aLineColor!=Color( COL_TRANSPARENT ))
{
@@ -1537,7 +1537,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_PIE_ACTION:
{
- const MetaPieAction* pA = (const MetaPieAction *) pMA;
+ const MetaPieAction* pA = static_cast<const MetaPieAction *>(pMA);
if (aFillColor!=Color( COL_TRANSPARENT ))
{
@@ -1597,7 +1597,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_POLYLINE_ACTION:
{
- const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA;
+ const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pMA);
if( aLineColor!=Color( COL_TRANSPARENT ) )
{
@@ -1640,7 +1640,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_POLYGON_ACTION:
{
- const MetaPolygonAction* pA = (const MetaPolygonAction*) pMA;
+ const MetaPolygonAction* pA = static_cast<const MetaPolygonAction*>(pMA);
const Polygon& rPoly = pA->GetPolygon();
@@ -1665,7 +1665,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_POLYPOLYGON_ACTION:
{
- const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pMA;
+ const MetaPolyPolygonAction* pA = static_cast<const MetaPolyPolygonAction*>(pMA);
const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
sal_uInt16 nPolyCount = rPolyPoly.Count();
@@ -1698,7 +1698,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_TEXT_ACTION:
{
- const MetaTextAction* pA = (const MetaTextAction*) pMA;
+ const MetaTextAction* pA = static_cast<const MetaTextAction*>(pMA);
Point aPt( pA->GetPoint() );
if ( aSrcFont.GetAlign() != ALIGN_BASELINE )
@@ -1719,7 +1719,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_TEXTARRAY_ACTION:
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pMA);
Point aPt( pA->GetPoint() );
if (aSrcFont.GetAlign()!=ALIGN_BASELINE)
@@ -1739,7 +1739,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_STRETCHTEXT_ACTION:
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pMA;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pMA);
Point aPt( pA->GetPoint() );
OUString aStr = pA->GetText().copy( pA->GetIndex(),pA->GetLen() );
VirtualDevice aVirDev;
@@ -1771,7 +1771,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_BMP_ACTION:
{
- const MetaBmpAction* pA = (const MetaBmpAction*) pMA;
+ const MetaBmpAction* pA = static_cast<const MetaBmpAction*>(pMA);
const Bitmap aBmp( pA->GetBitmap() );
VirtualDevice aVirDev;
@@ -1781,14 +1781,14 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_BMPSCALE_ACTION:
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pMA;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pMA);
WriteOpcode_BitsRect( 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 aBmp( pA->GetBitmap() );
aBmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
@@ -1798,7 +1798,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_BMPEX_ACTION:
{
- const MetaBmpExAction* pA = (const MetaBmpExAction*) pMA;
+ const MetaBmpExAction* pA = static_cast<const MetaBmpExAction*>(pMA);
const Bitmap aBmp( Graphic( pA->GetBitmapEx() ).GetBitmap() );
VirtualDevice aVirDev;
@@ -1808,7 +1808,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_BMPEXSCALE_ACTION:
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pMA);
const Bitmap aBmp( Graphic( pA->GetBitmapEx() ).GetBitmap() );
WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), aBmp );
@@ -1817,7 +1817,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_BMPEXSCALEPART_ACTION:
{
- const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA;
+ const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pMA);
Bitmap aBmp( Graphic( pA->GetBitmapEx() ).GetBitmap() );
aBmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
@@ -1827,7 +1827,7 @@ void PictWriter::WriteOpcodes( 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();
@@ -1836,7 +1836,7 @@ void PictWriter::WriteOpcodes( 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);
WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap() );
break;
}
@@ -1856,7 +1856,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
{
VirtualDevice aVDev;
GDIMetaFile aTmpMtf;
- const MetaGradientAction* pA = (const MetaGradientAction*) pMA;
+ const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pMA);
aVDev.SetMapMode( aTargetMapMode );
aVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf );
@@ -1868,7 +1868,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
{
VirtualDevice aVDev;
GDIMetaFile aTmpMtf;
- const MetaHatchAction* pA = (const MetaHatchAction*) pMA;
+ const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pMA);
aVDev.SetMapMode( aTargetMapMode );
aVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf );
@@ -1890,7 +1890,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_ISECTRECTCLIPREGION_ACTION:
{
- const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA;
+ const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pMA);
WriteOpcode_ClipRect( pA->GetRect() );
}
break;
@@ -1909,7 +1909,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_LINECOLOR_ACTION:
{
- const MetaLineColorAction* pA = (const MetaLineColorAction*) pMA;
+ const MetaLineColorAction* pA = static_cast<const MetaLineColorAction*>(pMA);
if( pA->IsSetting() )
aLineColor = pA->GetColor();
@@ -1920,7 +1920,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_FILLCOLOR_ACTION:
{
- const MetaFillColorAction* pA = (const MetaFillColorAction*) pMA;
+ const MetaFillColorAction* pA = static_cast<const MetaFillColorAction*>(pMA);
if( pA->IsSetting() )
aFillColor = pA->GetColor();
@@ -1931,14 +1931,14 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_TEXTCOLOR_ACTION:
{
- const MetaTextColorAction* pA = (const MetaTextColorAction*) pMA;
+ const MetaTextColorAction* pA = static_cast<const MetaTextColorAction*>(pMA);
aSrcFont.SetColor( 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() );
@@ -1955,7 +1955,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_MAPMODE_ACTION:
{
- const MetaMapModeAction* pA = (const MetaMapModeAction*) pMA;
+ const MetaMapModeAction* pA = static_cast<const MetaMapModeAction*>(pMA);
if (aSrcMapMode!=pA->GetMapMode())
{
@@ -2020,7 +2020,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
case META_FONT_ACTION:
{
- const MetaFontAction* pA = (const MetaFontAction*) pMA;
+ const MetaFontAction* pA = static_cast<const MetaFontAction*>(pMA);
aSrcFont=pA->GetFont();
}
break;
@@ -2067,14 +2067,14 @@ void PictWriter::WriteOpcodes( 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;
case META_TRANSPARENT_ACTION:
{
- const tools::PolyPolygon& rPolyPoly = ( (const MetaTransparentAction*) pMA )->GetPolyPolygon();
+ const tools::PolyPolygon& rPolyPoly = static_cast<const MetaTransparentAction*>(pMA)->GetPolyPolygon();
if (aFillColor!=Color( COL_TRANSPARENT ))
{
@@ -2093,7 +2093,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
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() );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index c9b8dd5beea5..19465a6505bd 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -668,10 +668,10 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_PIXEL_ACTION :
{
Color aOldLineColor( aLineColor );
- aLineColor = ( (const MetaPixelAction*) pMA )->GetColor();
+ aLineColor = static_cast<const MetaPixelAction*>(pMA)->GetColor();
ImplWriteLineColor( PS_SPACE );
- ImplMoveTo( ( (const MetaPixelAction*)pMA )->GetPoint() );
- ImplLineTo( ( (const MetaPixelAction*)pMA )->GetPoint() );
+ ImplMoveTo( static_cast<const MetaPixelAction*>(pMA)->GetPoint() );
+ ImplLineTo( static_cast<const MetaPixelAction*>(pMA)->GetPoint() );
ImplPathDraw();
aLineColor = aOldLineColor;
}
@@ -680,21 +680,21 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_POINT_ACTION :
{
ImplWriteLineColor( PS_SPACE );
- ImplMoveTo( ( (const MetaPointAction*)pMA )->GetPoint() );
- ImplLineTo( ( (const MetaPointAction*)pMA )->GetPoint() );
+ ImplMoveTo( static_cast<const MetaPointAction*>(pMA)->GetPoint() );
+ ImplLineTo( static_cast<const MetaPointAction*>(pMA)->GetPoint() );
ImplPathDraw();
}
break;
case META_LINE_ACTION :
{
- const LineInfo& rLineInfo = ( ( const MetaLineAction*)pMA )->GetLineInfo();
+ const LineInfo& rLineInfo = static_cast<const MetaLineAction*>(pMA)->GetLineInfo();
ImplWriteLineInfo( rLineInfo );
if ( bLineColor )
{
ImplWriteLineColor( PS_SPACE );
- ImplMoveTo( ( (const MetaLineAction*) pMA )->GetStartPoint() );
- ImplLineTo( ( (const MetaLineAction*) pMA )->GetEndPoint() );
+ ImplMoveTo( static_cast<const MetaLineAction*>(pMA)->GetStartPoint() );
+ ImplLineTo( static_cast<const MetaLineAction*>(pMA )->GetEndPoint() );
ImplPathDraw();
}
}
@@ -702,17 +702,17 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_RECT_ACTION :
{
- ImplRect( ( (const MetaRectAction*) pMA )->GetRect() );
+ ImplRect( static_cast<const MetaRectAction*>(pMA)->GetRect() );
}
break;
case META_ROUNDRECT_ACTION :
- ImplRect( ( (const MetaRoundRectAction*) pMA )->GetRect() );
+ ImplRect( static_cast<const MetaRoundRectAction*>(pMA)->GetRect() );
break;
case META_ELLIPSE_ACTION :
{
- Rectangle aRect = ( ( (const MetaEllipseAction*) pMA )->GetRect() );
+ Rectangle aRect = static_cast<const MetaEllipseAction*>(pMA)->GetRect();
Point aCenter = aRect.Center();
Polygon aPoly( aCenter, aRect.GetWidth() / 2, aRect.GetHeight() / 2 );
tools::PolyPolygon aPolyPoly( aPoly );
@@ -722,8 +722,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_ARC_ACTION :
{
- Polygon aPoly( ( (const MetaArcAction*)pMA )->GetRect(), ( (const MetaArcAction*)pMA )->GetStartPoint(),
- ( (const MetaArcAction*)pMA )->GetEndPoint(), POLY_ARC );
+ Polygon aPoly( static_cast<const MetaArcAction*>(pMA)->GetRect(), static_cast<const MetaArcAction*>(pMA)->GetStartPoint(),
+ static_cast<const MetaArcAction*>(pMA)->GetEndPoint(), POLY_ARC );
tools::PolyPolygon aPolyPoly( aPoly );
ImplPolyPoly( aPolyPoly );
}
@@ -731,8 +731,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_PIE_ACTION :
{
- Polygon aPoly( ( (const MetaPieAction*)pMA )->GetRect(), ( (const MetaPieAction*)pMA )->GetStartPoint(),
- ( (const MetaPieAction*)pMA )->GetEndPoint(), POLY_PIE );
+ Polygon aPoly( static_cast<const MetaPieAction*>(pMA)->GetRect(), static_cast<const MetaPieAction*>(pMA)->GetStartPoint(),
+ static_cast<const MetaPieAction*>(pMA)->GetEndPoint(), POLY_PIE );
tools::PolyPolygon aPolyPoly( aPoly );
ImplPolyPoly( aPolyPoly );
}
@@ -740,8 +740,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_CHORD_ACTION :
{
- Polygon aPoly( ( (const MetaChordAction*)pMA )->GetRect(), ( (const MetaChordAction*)pMA )->GetStartPoint(),
- ( (const MetaChordAction*)pMA )->GetEndPoint(), POLY_CHORD );
+ Polygon aPoly( static_cast<const MetaChordAction*>(pMA)->GetRect(), static_cast<const MetaChordAction*>(pMA)->GetStartPoint(),
+ static_cast<const MetaChordAction*>(pMA)->GetEndPoint(), POLY_CHORD );
tools::PolyPolygon aPolyPoly( aPoly );
ImplPolyPoly( aPolyPoly );
}
@@ -749,8 +749,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_POLYLINE_ACTION :
{
- Polygon aPoly( ( (const MetaPolyLineAction*) pMA )->GetPolygon() );
- const LineInfo& rLineInfo = ( ( const MetaPolyLineAction*)pMA )->GetLineInfo();
+ Polygon aPoly( static_cast<const MetaPolyLineAction*>(pMA)->GetPolygon() );
+ const LineInfo& rLineInfo = static_cast<const MetaPolyLineAction*>(pMA)->GetLineInfo();
ImplWriteLineInfo( rLineInfo );
if(basegfx::B2DLINEJOIN_NONE == rLineInfo.GetLineJoin()
@@ -791,20 +791,20 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_POLYGON_ACTION :
{
- tools::PolyPolygon aPolyPoly( ( (const MetaPolygonAction*) pMA )->GetPolygon() );
+ tools::PolyPolygon aPolyPoly( static_cast<const MetaPolygonAction*>(pMA)->GetPolygon() );
ImplPolyPoly( aPolyPoly );
}
break;
case META_POLYPOLYGON_ACTION :
{
- ImplPolyPoly( ( (const MetaPolyPolygonAction*) pMA )->GetPolyPolygon() );
+ ImplPolyPoly( static_cast<const MetaPolyPolygonAction*>(pMA)->GetPolyPolygon() );
}
break;
case META_TEXT_ACTION:
{
- const MetaTextAction * pA = (const MetaTextAction*) pMA;
+ const MetaTextAction * pA = static_cast<const MetaTextAction*>(pMA);
OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
Point aPoint( pA->GetPoint() );
@@ -821,7 +821,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_STRETCHTEXT_ACTION :
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*)pMA;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pMA);
OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
Point aPoint( pA->GetPoint() );
@@ -831,7 +831,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_TEXTARRAY_ACTION:
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*)pMA;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pMA);
OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
Point aPoint( pA->GetPoint() );
@@ -841,10 +841,10 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_BMP_ACTION :
{
- Bitmap aBitmap = ( (const MetaBmpAction*)pMA )->GetBitmap();
+ Bitmap aBitmap = static_cast<const MetaBmpAction*>(pMA)->GetBitmap();
if ( mbGrayScale )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
- Point aPoint = ( (const MetaBmpAction*) pMA )->GetPoint();
+ Point aPoint = static_cast<const MetaBmpAction*>(pMA)->GetPoint();
Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() );
}
@@ -852,36 +852,36 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_BMPSCALE_ACTION :
{
- Bitmap aBitmap = ( (const MetaBmpScaleAction*)pMA )->GetBitmap();
+ Bitmap aBitmap = static_cast<const MetaBmpScaleAction*>(pMA)->GetBitmap();
if ( mbGrayScale )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
- Point aPoint = ( (const MetaBmpScaleAction*) pMA )->GetPoint();
- Size aSize = ( (const MetaBmpScaleAction*)pMA )->GetSize();
+ Point aPoint = static_cast<const MetaBmpScaleAction*>(pMA)->GetPoint();
+ Size aSize = static_cast<const MetaBmpScaleAction*>(pMA)->GetSize();
ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() );
}
break;
case META_BMPSCALEPART_ACTION :
{
- Bitmap aBitmap( ( (const MetaBmpScalePartAction*)pMA )->GetBitmap() );
- aBitmap.Crop( Rectangle( ( (const MetaBmpScalePartAction*)pMA )->GetSrcPoint(),
- ( (const MetaBmpScalePartAction*)pMA )->GetSrcSize() ) );
+ Bitmap aBitmap( static_cast<const MetaBmpScalePartAction*>(pMA)->GetBitmap() );
+ aBitmap.Crop( Rectangle( static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcPoint(),
+ static_cast<const MetaBmpScalePartAction*>(pMA)->GetSrcSize() ) );
if ( mbGrayScale )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
- Point aPoint = ( (const MetaBmpScalePartAction*) pMA)->GetDestPoint();
- Size aSize = ( (const MetaBmpScalePartAction*)pMA )->GetDestSize();
+ Point aPoint = static_cast<const MetaBmpScalePartAction*>(pMA)->GetDestPoint();
+ Size aSize = static_cast<const MetaBmpScalePartAction*>(pMA)->GetDestSize();
ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() );
}
break;
case META_BMPEX_ACTION :
{
- BitmapEx aBitmapEx( ( (MetaBmpExAction*)pMA)->GetBitmapEx() );
+ BitmapEx aBitmapEx( static_cast<MetaBmpExAction*>(pMA)->GetBitmapEx() );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
Bitmap aMask( aBitmapEx.GetMask() );
- Point aPoint( ( (const MetaBmpExAction*) pMA )->GetPoint() );
+ Point aPoint( static_cast<const MetaBmpExAction*>(pMA)->GetPoint() );
Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
}
@@ -889,28 +889,28 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_BMPEXSCALE_ACTION :
{
- BitmapEx aBitmapEx( ( (MetaBmpExScaleAction*)pMA)->GetBitmapEx() );
+ BitmapEx aBitmapEx( static_cast<MetaBmpExScaleAction*>(pMA)->GetBitmapEx() );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
Bitmap aMask( aBitmapEx.GetMask() );
- Point aPoint = ( (const MetaBmpExScaleAction*) pMA)->GetPoint();
- Size aSize( ( (const MetaBmpExScaleAction*)pMA )->GetSize() );
+ Point aPoint = static_cast<const MetaBmpExScaleAction*>(pMA)->GetPoint();
+ Size aSize( static_cast<const MetaBmpExScaleAction*>(pMA)->GetSize() );
ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
}
break;
case META_BMPEXSCALEPART_ACTION :
{
- BitmapEx aBitmapEx( ( (const MetaBmpExScalePartAction*)pMA )->GetBitmapEx() );
- aBitmapEx.Crop( Rectangle( ( (const MetaBmpExScalePartAction*)pMA )->GetSrcPoint(),
- ( (const MetaBmpExScalePartAction*)pMA )->GetSrcSize() ) );
+ BitmapEx aBitmapEx( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetBitmapEx() );
+ aBitmapEx.Crop( Rectangle( static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcPoint(),
+ static_cast<const MetaBmpExScalePartAction*>(pMA)->GetSrcSize() ) );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
Bitmap aMask( aBitmapEx.GetMask() );
- Point aPoint = ( (const MetaBmpExScalePartAction*) pMA)->GetDestPoint();
- Size aSize = ( (const MetaBmpExScalePartAction*)pMA )->GetDestSize();
+ Point aPoint = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestPoint();
+ Size aSize = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestSize();
ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
}
break;
@@ -926,15 +926,15 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_GRADIENT_ACTION :
{
- tools::PolyPolygon aPolyPoly( ( (const MetaGradientAction*)pMA)->GetRect() );
- ImplWriteGradient( aPolyPoly, ( (const MetaGradientAction*) pMA )->GetGradient(), rVDev );
+ tools::PolyPolygon aPolyPoly( static_cast<const MetaGradientAction*>(pMA)->GetRect() );
+ ImplWriteGradient( aPolyPoly, static_cast<const MetaGradientAction*>(pMA)->GetGradient(), rVDev );
}
break;
case META_GRADIENTEX_ACTION :
{
- tools::PolyPolygon aPolyPoly( ( (const MetaGradientExAction*)pMA)->GetPolyPolygon() );
- ImplWriteGradient( aPolyPoly, ( (const MetaGradientExAction*) pMA )->GetGradient(), rVDev );
+ tools::PolyPolygon aPolyPoly( static_cast<const MetaGradientExAction*>(pMA)->GetPolyPolygon() );
+ ImplWriteGradient( aPolyPoly, static_cast<const MetaGradientExAction*>(pMA)->GetGradient(), rVDev );
}
break;
@@ -944,15 +944,15 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
GDIMetaFile aTmpMtf;
l_aVDev.SetMapMode( rVDev.GetMapMode() );
- l_aVDev.AddHatchActions( ( (const MetaHatchAction*)pMA)->GetPolyPolygon(),
- ( (const MetaHatchAction*)pMA )->GetHatch(), aTmpMtf );
+ l_aVDev.AddHatchActions( static_cast<const MetaHatchAction*>(pMA)->GetPolyPolygon(),
+ static_cast<const MetaHatchAction*>(pMA)->GetHatch(), aTmpMtf );
ImplWriteActions( aTmpMtf, rVDev );
}
break;
case META_WALLPAPER_ACTION :
{
- const MetaWallpaperAction* pA = (const MetaWallpaperAction*)pMA;
+ const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pMA);
Rectangle aRect = pA->GetRect();
Wallpaper aWallpaper = pA->GetWallpaper();
@@ -993,7 +993,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_ISECTRECTCLIPREGION_ACTION:
{
- const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA;
+ const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pMA);
vcl::Region aRegion( pA->GetRect() );
ImplSetClipRegion( aRegion );
}
@@ -1001,7 +1001,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_CLIPREGION_ACTION:
{
- const MetaClipRegionAction* pA = (const MetaClipRegionAction*) pMA;
+ const MetaClipRegionAction* pA = static_cast<const MetaClipRegionAction*>(pMA);
vcl::Region aRegion( pA->GetRegion() );
ImplSetClipRegion( aRegion );
}
@@ -1009,7 +1009,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_ISECTREGIONCLIPREGION_ACTION:
{
- const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pMA;
+ const MetaISectRegionClipRegionAction* pA = static_cast<const MetaISectRegionClipRegionAction*>(pMA);
vcl::Region aRegion( pA->GetRegion() );
ImplSetClipRegion( aRegion );
}
@@ -1020,7 +1020,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
/*
if ( !aClipRegion.IsEmpty() )
{
- const MetaMoveClipRegionAction* pA = (const MetaMoveClipRegionAction*) pMA;
+ const MetaMoveClipRegionAction* pA = static_cast<const MetaMoveClipRegionAction*>(pMA);
aClipRegion.Move( pA->GetHorzMove(), pA->GetVertMove() );
ImplSetClipRegion();
}
@@ -1030,10 +1030,10 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_LINECOLOR_ACTION :
{
- if ( ( (const MetaLineColorAction*) pMA)->IsSetting() )
+ if ( static_cast<const MetaLineColorAction*>(pMA)->IsSetting() )
{
bLineColor = true;
- aLineColor = ( (const MetaLineColorAction*) pMA )->GetColor();
+ aLineColor = static_cast<const MetaLineColorAction*>(pMA)->GetColor();
}
else
bLineColor = false;
@@ -1042,10 +1042,10 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_FILLCOLOR_ACTION :
{
- if ( ( (const MetaFillColorAction*) pMA )->IsSetting() )
+ if ( static_cast<const MetaFillColorAction*>(pMA)->IsSetting() )
{
bFillColor = true;
- aFillColor = ( (const MetaFillColorAction*) pMA )->GetColor();
+ aFillColor = static_cast<const MetaFillColorAction*>(pMA)->GetColor();
}
else
bFillColor = false;
@@ -1054,16 +1054,16 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_TEXTCOLOR_ACTION :
{
- aTextColor = ( (const MetaTextColorAction*) pMA )->GetColor();
+ aTextColor = static_cast<const MetaTextColorAction*>(pMA)->GetColor();
}
break;
case META_TEXTFILLCOLOR_ACTION :
{
- if ( ( (const MetaTextFillColorAction*) pMA )->IsSetting() )
+ if ( static_cast<const MetaTextFillColorAction*>(pMA)->IsSetting() )
{
bTextFillColor = true;
- aTextFillColor = ( (const MetaTextFillColorAction*) pMA )->GetColor();
+ aTextFillColor = static_cast<const MetaTextFillColorAction*>(pMA)->GetColor();
}
else
bTextFillColor = false;
@@ -1072,7 +1072,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_TEXTALIGN_ACTION :
{
- eTextAlign = ( (const MetaTextAlignAction*) pMA )->GetTextAlign();
+ eTextAlign = static_cast<const MetaTextAlignAction*>(pMA)->GetTextAlign();
}
break;
@@ -1085,14 +1085,14 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_FONT_ACTION :
{
- maFont = ((const MetaFontAction*)pMA)->GetFont();
+ maFont = static_cast<const MetaFontAction*>(pMA)->GetFont();
rVDev.SetFont( maFont );
}
break;
case META_PUSH_ACTION :
{
- rVDev.Push(((const MetaPushAction*)pMA)->GetFlags() );
+ rVDev.Push(static_cast<const MetaPushAction*>(pMA)->GetFlags() );
StackMember* pGS = new StackMember;
pGS->pSucc = pGDIStack;
pGDIStack = pGS;
@@ -1159,8 +1159,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_EPS_ACTION :
{
- GfxLink aGfxLink = ( (const MetaEPSAction*) pMA )->GetLink();
- const GDIMetaFile aSubstitute( ( ( const MetaEPSAction*) pMA )->GetSubstitute() );
+ GfxLink aGfxLink = static_cast<const MetaEPSAction*>(pMA)->GetLink();
+ const GDIMetaFile aSubstitute( static_cast<const MetaEPSAction*>(pMA)->GetSubstitute() );
bool bLevelConflict = false;
sal_uInt8* pSource = (sal_uInt8*) aGfxLink.GetData();
@@ -1198,8 +1198,8 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
double nBoundingBox[4];
if ( pSource && ImplGetBoundingBox( nBoundingBox, pSource, nParseThis ) )
{
- Point aPoint = ( (const MetaEPSAction*) pMA )->GetPoint();
- Size aSize = ( (const MetaEPSAction*) pMA )->GetSize();
+ Point aPoint = static_cast<const MetaEPSAction*>(pMA)->GetPoint();
+ Size aSize = static_cast<const MetaEPSAction*>(pMA)->GetSize();
MapMode aMapMode( aSubstitute.GetPrefMapMode() );
Size aOutSize( OutputDevice::LogicToLogic( aSize, rVDev.GetMapMode(), aMapMode ) );
@@ -1232,7 +1232,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
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() );
@@ -1260,7 +1260,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case META_COMMENT_ACTION:
{
- const MetaCommentAction* pA = (const MetaCommentAction*) pMA;
+ const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pMA);
if ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") )
{
const MetaGradientExAction* pGradAction = NULL;
@@ -1268,9 +1268,9 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
MetaAction* pAction = rMtf.GetAction( nCurAction );
if( pAction->GetType() == META_GRADIENTEX_ACTION )
- pGradAction = (const MetaGradientExAction*) pAction;
+ pGradAction = static_cast<const MetaGradientExAction*>(pAction);
else if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) )
+ ( static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) )
{
break;
}
@@ -1402,7 +1402,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
break;
case META_COMMENT_ACTION :
{
- if (((const MetaCommentAction*)pAction)->GetComment().equals("XPATHFILL_SEQ_END"))
+ if (static_cast<const MetaCommentAction*>(pAction)->GetComment().equals("XPATHFILL_SEQ_END"))
bOk = false;
}
break;
@@ -1443,7 +1443,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
pMA = rMtf.GetAction( nCurAction );
if ( pMA->GetType() == META_COMMENT_ACTION )
{
- OString sComment( ((MetaCommentAction*)pMA)->GetComment() );
+ OString sComment( static_cast<MetaCommentAction*>(pMA)->GetComment() );
if ( sComment.equals( sSeqEnd ) )
break;
}
diff --git a/filter/source/graphicfilter/icgm/class5.cxx b/filter/source/graphicfilter/icgm/class5.cxx
index 86237a5413e4..99c2a814414e 100644
--- a/filter/source/graphicfilter/icgm/class5.cxx
+++ b/filter/source/graphicfilter/icgm/class5.cxx
@@ -30,7 +30,7 @@ void CGM::ImplDoClass5()
switch ( mnElementID )
{
case 0x01 : /*Line Bundle Index*/
- pElement->pLineBundle = (LineBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aLineList, pElement->aLineBundle );
+ pElement->pLineBundle = static_cast<LineBundle*>(pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aLineList, pElement->aLineBundle ));
break;
case 0x02 : /*Line Type*/
{
@@ -67,7 +67,7 @@ void CGM::ImplDoClass5()
}
break;
case 0x05 : /*Marker Bundle Index*/
- pElement->pMarkerBundle = (MarkerBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aMarkerList, pElement->aMarkerBundle );
+ pElement->pMarkerBundle = static_cast<MarkerBundle*>(pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aMarkerList, pElement->aMarkerBundle ));
break;
case 0x06 : /*Marker Type*/
{
@@ -104,7 +104,7 @@ void CGM::ImplDoClass5()
}
break;
case 0x09 : /*Text Bundle Index*/
- pElement->pTextBundle = (TextBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aTextList, pElement->aTextBundle );
+ pElement->pTextBundle = static_cast<TextBundle*>(pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aTextList, pElement->aTextBundle ));
break;
case 0x0a : /*Text Font Index*/
{
@@ -209,7 +209,7 @@ void CGM::ImplDoClass5()
pElement->nAlternateCharacterSetIndex = ImplGetI( pElement->nIndexPrecision );
break;
case 0x15 : /*Fill Bundle Index*/
- pElement->pFillBundle = (FillBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aFillList, pElement->aFillBundle );
+ pElement->pFillBundle = static_cast<FillBundle*>(pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aFillList, pElement->aFillBundle ));
break;
case 0x16 : /*Fill Interior Style*/
{
@@ -244,7 +244,7 @@ void CGM::ImplDoClass5()
}
break;
case 0x1a : /*Edge Bundle Index*/
- pElement->pEdgeBundle = (EdgeBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aEdgeList, pElement->aEdgeBundle );
+ pElement->pEdgeBundle = static_cast<EdgeBundle*>(pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aEdgeList, pElement->aEdgeBundle ));
break;
case 0x1b : /*Edge Type*/
{
diff --git a/filter/source/graphicfilter/icgm/elements.cxx b/filter/source/graphicfilter/icgm/elements.cxx
index f4c10dc86cba..fc85f2870ac3 100644
--- a/filter/source/graphicfilter/icgm/elements.cxx
+++ b/filter/source/graphicfilter/icgm/elements.cxx
@@ -91,25 +91,25 @@ CGMElements& CGMElements::operator=( CGMElements& rSource )
CopyAllBundles( rSource.aLineList, aLineList );
aLineBundle = rSource.aLineBundle;
- pLineBundle = (LineBundle*)GetBundle( aLineList, rSource.pLineBundle->GetIndex() );
+ pLineBundle = static_cast<LineBundle*>(GetBundle( aLineList, rSource.pLineBundle->GetIndex() ));
eLineWidthSpecMode = rSource.eLineWidthSpecMode;
eLineCapType = rSource.eLineCapType;
eLineJoinType = rSource.eLineJoinType;
CopyAllBundles( rSource.aMarkerList, aMarkerList );
aMarkerBundle = rSource.aMarkerBundle;
- pMarkerBundle = (MarkerBundle*)GetBundle( aMarkerList, rSource.pMarkerBundle->GetIndex() );
+ pMarkerBundle = static_cast<MarkerBundle*>(GetBundle( aMarkerList, rSource.pMarkerBundle->GetIndex() ));
eMarkerSizeSpecMode = rSource.eMarkerSizeSpecMode;
CopyAllBundles( rSource.aEdgeList, aEdgeList );
aEdgeBundle = rSource.aEdgeBundle;
- pEdgeBundle = (EdgeBundle*)GetBundle( aEdgeList, rSource.pEdgeBundle->GetIndex() );
+ pEdgeBundle = static_cast<EdgeBundle*>(GetBundle( aEdgeList, rSource.pEdgeBundle->GetIndex() ));
eEdgeVisibility = rSource.eEdgeVisibility;
eEdgeWidthSpecMode = rSource.eEdgeWidthSpecMode;
CopyAllBundles( rSource.aTextList, aTextList );
aTextBundle = rSource.aTextBundle;
- pTextBundle = (TextBundle*)GetBundle( aTextList, rSource.pTextBundle->GetIndex() );
+ pTextBundle = static_cast<TextBundle*>(GetBundle( aTextList, rSource.pTextBundle->GetIndex() ));
nCharacterHeight = rSource.nCharacterHeight;
nCharacterOrientation[ 0 ] = rSource.nCharacterOrientation[ 0 ];
nCharacterOrientation[ 1 ] = rSource.nCharacterOrientation[ 1 ];
@@ -129,7 +129,7 @@ CGMElements& CGMElements::operator=( CGMElements& rSource )
CopyAllBundles( rSource.aFillList, aFillList );
aFillBundle = rSource.aFillBundle;
- pFillBundle = (FillBundle*)GetBundle( aFillList, rSource.pFillBundle->GetIndex() );
+ pFillBundle = static_cast<FillBundle*>(GetBundle( aFillList, rSource.pFillBundle->GetIndex() ));
aFillRefPoint = rSource.aFillRefPoint;
eTransparency = rSource.eTransparency;
nAuxiliaryColor = rSource.nAuxiliaryColor;
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index a849b47cfc61..21da6a403751 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -513,11 +513,11 @@ void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXF
fW=0.0;
pBE=rE.pSucc;
for (i=0; i<nPolySize; i++) {
- rTransform.Transform(((DXFVertexEntity*)pBE)->aP0,aPoly[i]);
+ rTransform.Transform(static_cast<const DXFVertexEntity*>(pBE)->aP0,aPoly[i]);
if (i+1<nPolySize || (rE.nFlags&1)!=0) {
- if (((DXFVertexEntity*)pBE)->fSWidth>=0.0) fW+=((DXFVertexEntity*)pBE)->fSWidth;
+ if (static_cast<const DXFVertexEntity*>(pBE)->fSWidth>=0.0) fW+=static_cast<const DXFVertexEntity*>(pBE)->fSWidth;
else fW+=rE.fSWidth;
- if (((DXFVertexEntity*)pBE)->fEWidth>=0.0) fW+=((DXFVertexEntity*)pBE)->fEWidth;
+ if (static_cast<const DXFVertexEntity*>(pBE)->fEWidth>=0.0) fW+=static_cast<const DXFVertexEntity*>(pBE)->fEWidth;
else fW+=rE.fEWidth;
}
pBE=pBE->pSucc;
@@ -533,7 +533,7 @@ void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXF
pBE=rE.pSucc;
for (i=0; i<nPolySize; i++) {
rTransform.Transform(
- (((DXFVertexEntity*)pBE)->aP0)+DXFVector(0,0,rE.fThickness),
+ (static_cast<const DXFVertexEntity*>(pBE)->aP0)+DXFVector(0,0,rE.fThickness),
aPoly2[i]
);
pBE=pBE->pSucc;
@@ -598,9 +598,9 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
case 1 :
{
Point aPt;
- rTransform.Transform( ((DXFEdgeTypeLine*)pEdge)->aStartPoint, aPt );
+ rTransform.Transform( static_cast<const DXFEdgeTypeLine*>(pEdge)->aStartPoint, aPt );
aPtAry.push_back( aPt );
- rTransform.Transform( ((DXFEdgeTypeLine*)pEdge)->aEndPoint, aPt );
+ rTransform.Transform( static_cast<const DXFEdgeTypeLine*>(pEdge)->aEndPoint, aPt );
aPtAry.push_back( aPt );
}
break;
@@ -700,46 +700,46 @@ void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
}
switch (pE->eType) {
case DXF_LINE:
- DrawLineEntity((DXFLineEntity&)*pE,*pT);
+ DrawLineEntity(static_cast<const DXFLineEntity&>(*pE),*pT);
break;
case DXF_POINT:
- DrawPointEntity((DXFPointEntity&)*pE,*pT);
+ DrawPointEntity(static_cast<const DXFPointEntity&>(*pE),*pT);
break;
case DXF_CIRCLE:
- DrawCircleEntity((DXFCircleEntity&)*pE,*pT);
+ DrawCircleEntity(static_cast<const DXFCircleEntity&>(*pE),*pT);
break;
case DXF_ARC:
- DrawArcEntity((DXFArcEntity&)*pE,*pT);
+ DrawArcEntity(static_cast<const DXFArcEntity&>(*pE),*pT);
break;
case DXF_TRACE:
- DrawTraceEntity((DXFTraceEntity&)*pE,*pT);
+ DrawTraceEntity(static_cast<const DXFTraceEntity&>(*pE),*pT);
break;
case DXF_SOLID:
- DrawSolidEntity((DXFSolidEntity&)*pE,*pT);
+ DrawSolidEntity(static_cast<const DXFSolidEntity&>(*pE),*pT);
break;
case DXF_TEXT:
- DrawTextEntity((DXFTextEntity&)*pE,*pT);
+ DrawTextEntity(static_cast<const DXFTextEntity&>(*pE),*pT);
break;
case DXF_INSERT:
- DrawInsertEntity((DXFInsertEntity&)*pE,*pT);
+ DrawInsertEntity(static_cast<const DXFInsertEntity&>(*pE),*pT);
break;
case DXF_ATTRIB:
- DrawAttribEntity((DXFAttribEntity&)*pE,*pT);
+ DrawAttribEntity(static_cast<const DXFAttribEntity&>(*pE),*pT);
break;
case DXF_POLYLINE:
- DrawPolyLineEntity((DXFPolyLineEntity&)*pE,*pT);
+ DrawPolyLineEntity(static_cast<const DXFPolyLineEntity&>(*pE),*pT);
break;
case DXF_LWPOLYLINE :
- DrawLWPolyLineEntity((DXFLWPolyLineEntity&)*pE, *pT);
+ DrawLWPolyLineEntity(static_cast<const DXFLWPolyLineEntity&>(*pE), *pT);
break;
case DXF_HATCH :
- DrawHatchEntity((DXFHatchEntity&)*pE, *pT);
+ DrawHatchEntity(static_cast<const DXFHatchEntity&>(*pE), *pT);
break;
case DXF_3DFACE:
- Draw3DFaceEntity((DXF3DFaceEntity&)*pE,*pT);
+ Draw3DFaceEntity(static_cast<const DXF3DFaceEntity&>(*pE),*pT);
break;
case DXF_DIMENSION:
- DrawDimensionEntity((DXFDimensionEntity&)*pE,*pT);
+ DrawDimensionEntity(static_cast<const DXFDimensionEntity&>(*pE),*pT);
break;
default:
break; // four other values not handled -Wall
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx
index 456d3b2c9427..d715714427b3 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx
@@ -231,18 +231,18 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
while (pBE!=NULL) {
switch (pBE->eType) {
case DXF_LINE: {
- const DXFLineEntity * pE = (DXFLineEntity*)pBE;
+ const DXFLineEntity * pE = static_cast<const DXFLineEntity*>(pBE);
rBox.Union(pE->aP0);
rBox.Union(pE->aP1);
break;
}
case DXF_POINT: {
- const DXFPointEntity * pE = (DXFPointEntity*)pBE;
+ const DXFPointEntity * pE = static_cast<const DXFPointEntity*>(pBE);
rBox.Union(pE->aP0);
break;
}
case DXF_CIRCLE: {
- const DXFCircleEntity * pE = (DXFCircleEntity*)pBE;
+ const DXFCircleEntity * pE = static_cast<const DXFCircleEntity*>(pBE);
DXFVector aP;
aP=pE->aP0;
aP.fx-=pE->fRadius;
@@ -255,7 +255,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
break;
}
case DXF_ARC: {
- const DXFArcEntity * pE = (DXFArcEntity*)pBE;
+ const DXFArcEntity * pE = static_cast<const DXFArcEntity*>(pBE);
DXFVector aP;
aP=pE->aP0;
aP.fx-=pE->fRadius;
@@ -268,7 +268,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
break;
}
case DXF_TRACE: {
- const DXFTraceEntity * pE = (DXFTraceEntity*)pBE;
+ const DXFTraceEntity * pE = static_cast<const DXFTraceEntity*>(pBE);
rBox.Union(pE->aP0);
rBox.Union(pE->aP1);
rBox.Union(pE->aP2);
@@ -276,7 +276,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
break;
}
case DXF_SOLID: {
- const DXFSolidEntity * pE = (DXFSolidEntity*)pBE;
+ const DXFSolidEntity * pE = static_cast<const DXFSolidEntity*>(pBE);
rBox.Union(pE->aP0);
rBox.Union(pE->aP1);
rBox.Union(pE->aP2);
@@ -294,7 +294,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
break;
}
case DXF_INSERT: {
- const DXFInsertEntity * pE = (DXFInsertEntity*)pBE;
+ const DXFInsertEntity * pE = static_cast<const DXFInsertEntity*>(pBE);
DXFBlock * pB;
DXFBoundingBox aBox;
DXFVector aP;
@@ -323,12 +323,12 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
break;
}
case DXF_VERTEX: {
- const DXFVertexEntity * pE = (DXFVertexEntity*)pBE;
+ const DXFVertexEntity * pE = static_cast<const DXFVertexEntity*>(pBE);
rBox.Union(pE->aP0);
break;
}
case DXF_3DFACE: {
- const DXF3DFaceEntity * pE = (DXF3DFaceEntity*)pBE;
+ const DXF3DFaceEntity * pE = static_cast<const DXF3DFaceEntity*>(pBE);
rBox.Union(pE->aP0);
rBox.Union(pE->aP1);
rBox.Union(pE->aP2);
@@ -336,7 +336,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
break;
}
case DXF_DIMENSION: {
- const DXFDimensionEntity * pE = (DXFDimensionEntity*)pBE;
+ const DXFDimensionEntity * pE = static_cast<const DXFDimensionEntity*>(pBE);
DXFBlock * pB;
DXFBoundingBox aBox;
DXFVector aP;
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 2ce4b3d311e2..41ba717b6b13 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -90,7 +90,7 @@ namespace PictReaderInternal {
// count the no of bits in pattern which are set to 1:
nBitCount=0;
for (ny=0; ny<8; ny++) {
- stream.ReadChar( (char&)nbyte[ny] );
+ stream.ReadChar( reinterpret_cast<char&>(nbyte[ny]) );
for (nx=0; nx<8; nx++) {
if ( (nbyte[ny] & (1<<nx)) != 0 ) nBitCount++;
}
@@ -382,7 +382,7 @@ Point PictReader::ReadDeltaH(Point aBase)
{
signed char ndh;
- pPict->ReadChar( (char&)ndh );
+ pPict->ReadChar( reinterpret_cast<char&>(ndh) );
return Point( aBase.X() + (long)ndh, aBase.Y() );
}
@@ -391,7 +391,7 @@ Point PictReader::ReadDeltaV(Point aBase)
{
signed char ndv;
- pPict->ReadChar( (char&)ndv );
+ pPict->ReadChar( reinterpret_cast<char&>(ndv) );
return Point( aBase.X(), aBase.Y() + (long)ndv );
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 4a6bc3dd0964..96c114a6be4b 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -570,7 +570,7 @@ void EscherPropertyContainer::CreateFillProperties(
SfxItemSet aAttr( pObj->GetMergedItemSet() );
// tranparency with gradient. Means the third setting in transparency page is set
bool bTransparentGradient = ( aAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET ) &&
- ( (const XFillFloatTransparenceItem&) aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ) ).IsEnabled();
+ static_cast<const XFillFloatTransparenceItem&>( aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ) ).IsEnabled();
CreateFillProperties( rXPropSet, bEdge, bTransparentGradient );
}
}
@@ -1328,7 +1328,7 @@ bool EscherPropertyContainer::CreateMediaGraphicProperties(
SdrObject* pSdrMedia( GetSdrObjectFromXShape( rXShape ) ); // SJ: leaving unoapi, because currently there is
if ( pSdrMedia && pSdrMedia->ISA( SdrMediaObj ) ) // no access to the native graphic object
{
- GraphicObject aGraphicObject( ((SdrMediaObj*)pSdrMedia)->getSnapshot() );
+ GraphicObject aGraphicObject( static_cast<SdrMediaObj*>(pSdrMedia)->getSnapshot() );
bRetValue = CreateGraphicProperties( rXShape, aGraphicObject );
}
}
@@ -1844,7 +1844,7 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
for( b = 0; b < nInnerSequenceCount; b++)
{
PolyFlags ePolyFlags( *( (PolyFlags*)pFlags++ ) );
- ::com::sun::star::awt::Point aPoint( (::com::sun::star::awt::Point)*(pArray++) );
+ ::com::sun::star::awt::Point aPoint( *(pArray++) );
aPolygon[ b ] = Point( aPoint.X, aPoint.Y );
aPolygon.SetFlags( b, ePolyFlags );
@@ -2577,9 +2577,9 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape,
{
uno::Sequence< OUString > sEquationSource;
const OUString sEquations( "Equations" );
- SdrCustomShapeGeometryItem& rGeometryItem = (SdrCustomShapeGeometryItem&)(const SdrCustomShapeGeometryItem&)
- pCustoShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
- const uno::Any* pAny = ((SdrCustomShapeGeometryItem&)rGeometryItem).GetPropertyValueByName( sEquations );
+ const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(
+ pCustoShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( sEquations );
if ( pAny )
*pAny >>= sEquationSource;
sal_Int32 nEquationSourceCount = sEquationSource.getLength();
@@ -2726,7 +2726,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
if ( aXPropSet.is() )
{
- SdrObjCustomShape* pCustoShape = (SdrObjCustomShape*)GetSdrObjectFromXShape( rXShape );
+ SdrObjCustomShape* pCustoShape = static_cast<SdrObjCustomShape*>(GetSdrObjectFromXShape( rXShape ));
if ( !pCustoShape ) return;
const OUString sCustomShapeGeometry( "CustomShapeGeometry" );
uno::Any aGeoPropSet = aXPropSet->getPropertyValue( sCustomShapeGeometry );
@@ -3590,7 +3590,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
break;
case drawing::TextHorizontalAdjust_BLOCK:
{
- SdrFitToSizeType eFTS( ((SdrTextFitToSizeTypeItem&)pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
+ SdrFitToSizeType eFTS( static_cast<const SdrTextFitToSizeTypeItem&>(pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() );
if ( eFTS == SDRTEXTFIT_ALLLINES)
{
gTextAlign = mso_alignTextStretch;
@@ -4742,15 +4742,15 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
SdrObject* pCustoShape( GetSdrObjectFromXShape( aXShape ) );
if ( pCustoShape && pCustoShape->ISA( SdrObjCustomShape ) )
{
- SdrCustomShapeGeometryItem& rGeometryItem = (SdrCustomShapeGeometryItem&)(const SdrCustomShapeGeometryItem&)
- pCustoShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
+ const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(
+ pCustoShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
const OUString sPath( "Path" );
const OUString sType( "Type" );
const OUString sGluePointType( "GluePointType" );
OUString sShapeType;
- uno::Any* pType = rGeometryItem.GetPropertyValueByName( sType );
+ const uno::Any* pType = rGeometryItem.GetPropertyValueByName( sType );
if ( pType )
*pType >>= sShapeType;
MSO_SPT eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType );
@@ -4792,7 +4792,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
// #i74631# use explicit constructor here. Also XPolyPolygon is not necessary,
// reducing to PolyPolygon
- const tools::PolyPolygon aPolyPoly(((SdrPathObj*)pPoly)->GetPathPoly());
+ const tools::PolyPolygon aPolyPoly(static_cast<SdrPathObj*>(pPoly)->GetPathPoly());
for ( a = 0; a < aPolyPoly.Count(); a++ )
{
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index c3efb0aaa1b2..f76de8cfab5f 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -573,7 +573,8 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
case OBJ_CUSTOMSHAPE :
{
- SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)((SdrObjCustomShape*)pO)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ const SfxPoolItem& aCustomShape = static_cast<SdrObjCustomShape*>(pO)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
+ SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(aCustomShape) );
const OUString sPath( "Path" );
const OUString sGluePointType( "GluePointType" );
sal_Int16 nGluePointType = EnhancedCustomShapeGluePointType::SEGMENTS;
@@ -717,7 +718,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
aProp.Value <<= aGluePoints;
aGeometryItem.SetPropertyValue( sPath, aProp );
bValidGluePoint = true;
- ((SdrObjCustomShape*)pO)->SetMergedItem( aGeometryItem );
+ static_cast<SdrObjCustomShape*>(pO)->SetMergedItem( aGeometryItem );
SdrGluePointList* pLst = pO->ForceGluePointList();
if ( pLst->GetCount() > nGluePoints )
nId = (sal_Int32)((*pLst)[ (sal_uInt16)nGluePoints ].GetId() + 3 );
@@ -2715,7 +2716,7 @@ void DffPropertyReader::CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItem
if ( !bRotateTextWithShape )
{
const com::sun::star::uno::Any* pAny;
- SdrCustomShapeGeometryItem aGeometryItem((SdrCustomShapeGeometryItem&)rSet.Get( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ SdrCustomShapeGeometryItem aGeometryItem(static_cast<const SdrCustomShapeGeometryItem&>(rSet.Get( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
const OUString sTextRotateAngle( "TextRotateAngle" );
pAny = aGeometryItem.GetPropertyValueByName( sTextRotateAngle );
double fExtraTextRotateAngle = 0.0;
@@ -3889,7 +3890,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
pRet = new SdrGrafObj;
if( bGrfRead )
- ((SdrGrafObj*)pRet)->SetGraphic( aGraf );
+ static_cast<SdrGrafObj*>(pRet)->SetGraphic( aGraf );
if( bLinkGrf && !bGrfRead ) // sj: #i55484# if the graphic was embedded ( bGrfRead == true ) then
{ // we do not need to set a link. TODO: not to lose the information where the graphic is linked from
@@ -3935,15 +3936,15 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
if ( pRet->ISA( SdrGrafObj ) )
{
if( aLinkFileName.getLength() )
- ((SdrGrafObj*)pRet)->SetGraphicLink( aLinkFileName, ""/*TODO?*/, aLinkFilterName );
+ static_cast<SdrGrafObj*>(pRet)->SetGraphicLink( aLinkFileName, ""/*TODO?*/, aLinkFilterName );
if ( bLinkGrf && !bGrfRead )
{
- ((SdrGrafObj*)pRet)->ForceSwapIn();
- Graphic aGraf(((SdrGrafObj*)pRet)->GetGraphic());
+ static_cast<SdrGrafObj*>(pRet)->ForceSwapIn();
+ Graphic aGraf(static_cast<SdrGrafObj*>(pRet)->GetGraphic());
lcl_ApplyCropping( *this, &rSet, aGraf );
}
- ((SdrGrafObj*)pRet)->ForceSwapOut();
+ static_cast<SdrGrafObj*>(pRet)->ForceSwapOut();
}
return pRet;
@@ -4032,9 +4033,9 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
return pRet;
sal_Int32 nShapeId;
SdrObject* pTmp = ImportGroup( aRecHd2, rSt, pClientData, aGroupClientAnchor, aGroupChildAnchor, nCalledByGroup + 1, &nShapeId );
- if ( pTmp && pRet && ((SdrObjGroup*)pRet)->GetSubList() )
+ if ( pTmp && pRet && static_cast<SdrObjGroup*>(pRet)->GetSubList() )
{
- ((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pTmp );
+ static_cast<SdrObjGroup*>(pRet)->GetSubList()->NbcInsertObject( pTmp );
if( nShapeId )
insertShapeId( nShapeId, pTmp );
}
@@ -4045,9 +4046,9 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
return pRet;
sal_Int32 nShapeId;
SdrObject* pTmp = ImportShape( aRecHd2, rSt, pClientData, aClientRect, aGlobalChildRect, nCalledByGroup + 1, &nShapeId );
- if ( pTmp && pRet && ((SdrObjGroup*)pRet)->GetSubList())
+ if ( pTmp && pRet && static_cast<SdrObjGroup*>(pRet)->GetSubList())
{
- ((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pTmp );
+ static_cast<SdrObjGroup*>(pRet)->GetSubList()->NbcInsertObject( pTmp );
if( nShapeId )
insertShapeId( nShapeId, pTmp );
}
@@ -4294,7 +4295,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// this should be replaced through "CharacterRotation"
// by 90 degrees, therefore a new Item has to be
// supported by svx core, api and xml file format
- ((SdrObjCustomShape*)pRet)->SetVerticalWriting( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x2000 ) != 0 );
+ static_cast<SdrObjCustomShape*>(pRet)->SetVerticalWriting( ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x2000 ) != 0 );
if ( SeekToContent( DFF_Prop_gtextUNICODE, rSt ) )
{
@@ -4343,14 +4344,14 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// so we have to calculate the a text direction from string:
if ( bIsFontwork )
{
- OutlinerParaObject* pParaObj = ((SdrObjCustomShape*)pRet)->GetOutlinerParaObject();
+ OutlinerParaObject* pParaObj = static_cast<SdrObjCustomShape*>(pRet)->GetOutlinerParaObject();
if ( pParaObj )
{
- SdrOutliner& rOutliner = ((SdrObjCustomShape*)pRet)->ImpGetDrawOutliner();
+ SdrOutliner& rOutliner = static_cast<SdrObjCustomShape*>(pRet)->ImpGetDrawOutliner();
bool bOldUpdateMode = rOutliner.GetUpdateMode();
SdrModel* pModel = pRet->GetModel();
if ( pModel )
- rOutliner.SetStyleSheetPool( (SfxStyleSheetPool*)pModel->GetStyleSheetPool() );
+ rOutliner.SetStyleSheetPool( static_cast<SfxStyleSheetPool*>(pModel->GetStyleSheetPool()) );
rOutliner.SetUpdateMode( false );
rOutliner.SetText( *pParaObj );
VirtualDevice aVirDev( 1 );
@@ -4375,7 +4376,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
{
OutlinerParaObject* pNewText = rOutliner.CreateParaObject();
rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
- ((SdrObjCustomShape*)pRet)->NbcSetOutlinerParaObject( pNewText );
+ static_cast<SdrObjCustomShape*>(pRet)->NbcSetOutlinerParaObject( pNewText );
}
}
rOutliner.Clear();
@@ -4396,7 +4397,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
const OUString sViewBox( "ViewBox" );
const OUString sPath( "Path" );
const OUString sTextFrames( "TextFrames" );
- SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)((SdrObjCustomShape*)pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(static_cast<SdrObjCustomShape*>(pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ) );
com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair> seqCoordinates;
com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > seqAdjustmentValues;
@@ -4561,21 +4562,21 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aObjData.aBoundRect.Move( aP2.X() - aP1.X(), aP2.Y() - aP1.Y() );
}
}
- ((SdrObjCustomShape*)pRet)->SetMergedItem( aGeometryItem );
- ((SdrObjCustomShape*)pRet)->MergeDefaultAttributes();
+ static_cast<SdrObjCustomShape*>(pRet)->SetMergedItem( aGeometryItem );
+ static_cast<SdrObjCustomShape*>(pRet)->MergeDefaultAttributes();
// now setting a new name, so the above correction is only done once when importing from ms
- SdrCustomShapeGeometryItem aGeoName( (SdrCustomShapeGeometryItem&)((SdrObjCustomShape*)pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ SdrCustomShapeGeometryItem aGeoName( static_cast<const SdrCustomShapeGeometryItem&>(static_cast<SdrObjCustomShape*>(pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) ) );
const OUString sType( "Type" );
const OUString sName( "mso-spt100" );
PropertyValue aPropVal;
aPropVal.Name = sType;
aPropVal.Value <<= sName;
aGeoName.SetPropertyValue( aPropVal );
- ((SdrObjCustomShape*)pRet)->SetMergedItem( aGeoName );
+ static_cast<SdrObjCustomShape*>(pRet)->SetMergedItem( aGeoName );
}
else
- ((SdrObjCustomShape*)pRet)->MergeDefaultAttributes();
+ static_cast<SdrObjCustomShape*>(pRet)->MergeDefaultAttributes();
pRet->SetSnapRect( aObjData.aBoundRect );
EnhancedCustomShape2d aCustomShape2d( pRet );
@@ -4615,8 +4616,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// connectors
MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight );
- ((SdrEdgeObj*)pRet)->ConnectToNode(true, NULL);
- ((SdrEdgeObj*)pRet)->ConnectToNode(false, NULL);
+ static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(true, NULL);
+ static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(false, NULL);
Point aPoint1( aObjData.aBoundRect.TopLeft() );
Point aPoint2( aObjData.aBoundRect.BottomRight() );
@@ -4681,13 +4682,13 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aSet.Put( SdrEdgeNode2HorzDistItem( n2HorzDist ) );
aSet.Put( SdrEdgeNode2VertDistItem( n2VertDist ) );
- ((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly );
+ static_cast<SdrEdgeObj*>(pRet)->SetEdgeTrackPath( aPoly );
pRet->SetMergedItemSet( aSet );
}
if ( aObjData.eShapeType == mso_sptLine )
{
pRet->SetMergedItemSet(aSet);
- ((SdrObjCustomShape*)pRet)->MergeDefaultAttributes();
+ static_cast<SdrObjCustomShape*>(pRet)->MergeDefaultAttributes();
}
}
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index a098b94fe6b6..841a0ef4a541 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -755,11 +755,11 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
case PPT_PST_RecolorInfoAtom :
{
- if ( pRet && ( pRet->ISA( SdrGrafObj ) && ((SdrGrafObj*)pRet)->HasGDIMetaFile() ) )
+ if ( pRet && ( pRet->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pRet)->HasGDIMetaFile() ) )
{
- Graphic aGraphic( ((SdrGrafObj*)pRet)->GetGraphic() );
+ Graphic aGraphic( static_cast<SdrGrafObj*>(pRet)->GetGraphic() );
RecolorGraphic( rSt, aClientDataHd.nRecLen, aGraphic );
- ((SdrGrafObj*)pRet)->SetGraphic( aGraphic );
+ static_cast<SdrGrafObj*>(pRet)->SetGraphic( aGraphic );
}
}
break;
@@ -780,7 +780,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
else
{
// try to load some ppt text
- PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, &rObjData );
+ PPTTextObj aTextObj( rSt, static_cast<SdrPowerPointImport&>(*this), rPersistEntry, &rObjData );
if ( ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() ) )
{
bool bVerticalText = false;
@@ -5576,7 +5576,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s
pItemSet->GetItemState( XATTR_FILLSTYLE, false, &pFillStyleItem );
if ( pFillStyleItem )
{
- drawing::FillStyle eFillStyle = ((XFillStyleItem*)pFillStyleItem)->GetValue();
+ drawing::FillStyle eFillStyle = static_cast<const XFillStyleItem*>(pFillStyleItem)->GetValue();
switch( eFillStyle )
{
case drawing::FillStyle_SOLID :
@@ -5584,7 +5584,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s
const SfxPoolItem* pFillColorItem = NULL;
pItemSet->GetItemState( XATTR_FILLCOLOR, false, &pFillColorItem );
if ( pFillColorItem )
- aDefColor = ((XColorItem*)pFillColorItem)->GetColorValue();
+ aDefColor = static_cast<const XColorItem*>(pFillColorItem)->GetColorValue();
}
break;
case drawing::FillStyle_GRADIENT :
@@ -5592,7 +5592,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s
const SfxPoolItem* pGradientItem = NULL;
pItemSet->GetItemState( XATTR_FILLGRADIENT, false, &pGradientItem );
if ( pGradientItem )
- aDefColor = ((XFillGradientItem*)pGradientItem)->GetGradientValue().GetStartColor();
+ aDefColor = static_cast<const XFillGradientItem*>(pGradientItem)->GetGradientValue().GetStartColor();
}
break;
case drawing::FillStyle_HATCH :
@@ -6848,7 +6848,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if (!(*FE)->pField1)
break;
- const SvxURLField* pField = (const SvxURLField*)(*FE)->pField1->GetField();
+ const SvxURLField* pField = static_cast<const SvxURLField*>((*FE)->pField1->GetField());
pCurrent->mbIsHyperlink = true;
pCurrent->mnHylinkOrigColor = pCurrent->pCharSet->mnColor;
@@ -7006,7 +7006,9 @@ PPTTextObj& PPTTextObj::operator=( PPTTextObj& rTextObj )
bool IsLine( const SdrObject* pObj )
{
- return pObj->ISA( SdrPathObj ) && ((SdrPathObj*)pObj)->IsLine() && (((SdrPathObj*)pObj)->GetPointCount() == 2 );
+ return pObj->ISA( SdrPathObj ) &&
+ static_cast<const SdrPathObj*>(pObj)->IsLine() &&
+ static_cast<const SdrPathObj*>(pObj)->GetPointCount() == 2;
}
bool GetCellPosition( const SdrObject* pObj, const std::set< sal_Int32 >& rRows, const std::set< sal_Int32 >& rColumns,
@@ -7142,8 +7144,8 @@ void GetLinePositions( const SdrObject* pObj, const std::set< sal_Int32 >& rRows
else
{
sal_uInt32 nPosition = 0;
- Point aPt1( ((SdrPathObj*)pObj)->GetPoint( 0 ) );
- Point aPt2( ((SdrPathObj*)pObj)->GetPoint( 1 ) );
+ Point aPt1( static_cast<const SdrPathObj*>(pObj)->GetPoint( 0 ) );
+ Point aPt2( static_cast<const SdrPathObj*>(pObj)->GetPoint( 1 ) );
if ( aPt1.X() < aPt2.X() )
nPosition |= aPt1.Y() < aPt2.Y() ? LinePositionTLBR : LinePositionBLTR;
else
@@ -7232,10 +7234,10 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
{
Reference< XPropertySet > xPropSet( xCell, UNO_QUERY_THROW );
- const sal_Int32 nLeftDist(((const SdrMetricItem&)pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST)).GetValue());
- const sal_Int32 nRightDist(((const SdrMetricItem&)pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST)).GetValue());
- const sal_Int32 nUpperDist(((const SdrMetricItem&)pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST)).GetValue());
- const sal_Int32 nLowerDist(((const SdrMetricItem&)pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST)).GetValue());
+ const sal_Int32 nLeftDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_LEFTDIST)).GetValue());
+ const sal_Int32 nRightDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST)).GetValue());
+ const sal_Int32 nUpperDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST)).GetValue());
+ const sal_Int32 nLowerDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST)).GetValue());
static const OUString sTopBorder( "TextUpperDistance" );
static const OUString sBottomBorder( "TextLowerDistance" );
static const OUString sLeftBorder( "TextLeftDistance" );
@@ -7246,7 +7248,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
xPropSet->setPropertyValue( sBottomBorder, Any( nLowerDist ) );
static const OUString sTextVerticalAdjust( "TextVerticalAdjust" );
- const SdrTextVertAdjust eTextVertAdjust(((const SdrTextVertAdjustItem&)pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST)).GetValue());
+ const SdrTextVertAdjust eTextVertAdjust(static_cast<const SdrTextVertAdjustItem&>(pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST)).GetValue());
drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
if ( eTextVertAdjust == SDRTEXTVERTADJUST_CENTER )
eVA = drawing::TextVerticalAdjust_CENTER;
@@ -7255,8 +7257,8 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
xPropSet->setPropertyValue( sTextVerticalAdjust, Any( eVA ) );
//set textHorizontalAdjust and TextWritingMode attr
- const sal_Int32 eHA(((const SdrTextHorzAdjustItem&)pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue());
- const SvxFrameDirection eDirection = (const SvxFrameDirection)((( const SvxFrameDirectionItem&)pObj->GetMergedItem(EE_PARA_WRITINGDIR)).GetValue());
+ const sal_Int32 eHA(static_cast<const SdrTextHorzAdjustItem&>(pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue());
+ const SvxFrameDirection eDirection = (const SvxFrameDirection)(static_cast<const SvxFrameDirectionItem&>(pObj->GetMergedItem(EE_PARA_WRITINGDIR)).GetValue());
static const OUString sHorizontalAdjust( "TextHorizontalAdjust" );
static const OUString sWritingMode( "TextWritingMode" );
xPropSet->setPropertyValue( sHorizontalAdjust , Any( eHA ) );
@@ -7265,7 +7267,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
xPropSet->setPropertyValue( sWritingMode , Any( ::com::sun::star::text::WritingMode_TB_RL ) );
}
SfxItemSet aSet( pObj->GetMergedItemSet() );
- drawing::FillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
+ drawing::FillStyle eFillStyle(static_cast<const XFillStyleItem&>(pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE );
switch( eFillStyle )
{
@@ -7273,7 +7275,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
{
static const OUString sFillColor( "FillColor" );
eFS = com::sun::star::drawing::FillStyle_SOLID;
- Color aFillColor( ((XFillColorItem&)pObj->GetMergedItem( XATTR_FILLCOLOR )).GetColorValue() );
+ Color aFillColor( static_cast<const XFillColorItem&>(pObj->GetMergedItem( XATTR_FILLCOLOR )).GetColorValue() );
sal_Int32 nFillColor( aFillColor.GetColor() );
xPropSet->setPropertyValue( sFillColor, Any( nFillColor ) );
}
@@ -7281,7 +7283,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
case drawing::FillStyle_GRADIENT :
{
eFS = com::sun::star::drawing::FillStyle_GRADIENT;
- XGradient aXGradient(((const XFillGradientItem&)pObj->GetMergedItem(XATTR_FILLGRADIENT)).GetGradientValue());
+ XGradient aXGradient(static_cast<const XFillGradientItem&>(pObj->GetMergedItem(XATTR_FILLGRADIENT)).GetGradientValue());
com::sun::star::awt::Gradient aGradient;
aGradient.Style = (awt::GradientStyle) aXGradient.GetGradientStyle();
@@ -7306,7 +7308,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
{
eFS = com::sun::star::drawing::FillStyle_BITMAP;
- const XFillBitmapItem aXFillBitmapItem((const XFillBitmapItem&)pObj->GetMergedItem( XATTR_FILLBITMAP ));
+ const XFillBitmapItem aXFillBitmapItem(static_cast<const XFillBitmapItem&>(pObj->GetMergedItem( XATTR_FILLBITMAP )));
OUString aURL( UNO_NAME_GRAPHOBJ_URLPREFIX);
aURL += OStringToOUString(
aXFillBitmapItem.GetGraphicObject().GetUniqueID(),
@@ -7314,8 +7316,8 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
xPropSet->setPropertyValue("FillBitmapURL", Any( aURL ) );
- const XFillBmpStretchItem aStretchItem(( const XFillBmpStretchItem&)pObj->GetMergedItem( XATTR_FILLBMP_STRETCH ));
- const XFillBmpTileItem aTileItem(( const XFillBmpTileItem&)pObj->GetMergedItem( XATTR_FILLBMP_TILE ));
+ const XFillBmpStretchItem aStretchItem(static_cast<const XFillBmpStretchItem&>(pObj->GetMergedItem( XATTR_FILLBMP_STRETCH )));
+ const XFillBmpTileItem aTileItem(static_cast<const XFillBmpTileItem&>(pObj->GetMergedItem( XATTR_FILLBMP_TILE )));
if( aTileItem.GetValue() )
xPropSet->setPropertyValue( "FillBitmapMode", Any( com::sun::star::drawing::BitmapMode_REPEAT ) );
else if( aStretchItem.GetValue() )
@@ -7334,7 +7336,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
xPropSet->setPropertyValue( sFillStyle, Any( eFS ) );
if ( eFillStyle != drawing::FillStyle_NONE )
{
- sal_Int16 nFillTransparence( ( (const XFillTransparenceItem&)pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() );
+ sal_Int16 nFillTransparence( static_cast<const XFillTransparenceItem&>(pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() );
static const OUString sFillTransparence( "FillTransparence" );
xPropSet->setPropertyValue( sFillTransparence, Any( nFillTransparence ) );
}
@@ -7349,17 +7351,17 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
try
{
SfxItemSet aSet( pLine->GetMergedItemSet() );
- XLineStyle eLineStyle(((XLineStyleItem&)pLine->GetMergedItem( XATTR_LINESTYLE )).GetValue());
+ XLineStyle eLineStyle(static_cast<const XLineStyleItem&>(pLine->GetMergedItem( XATTR_LINESTYLE )).GetValue());
com::sun::star::table::BorderLine2 aBorderLine;
switch( eLineStyle )
{
case XLINE_DASH :
case XLINE_SOLID :
{
- Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
+ Color aLineColor( static_cast<const XLineColorItem&>(pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
aBorderLine.Color = aLineColor.GetColor();
// Avoid width = 0, the min value should be 1.
- sal_Int32 nLineWidth = std::max(sal_Int32(1), ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4);
+ sal_Int32 nLineWidth = std::max(sal_Int32(1), static_cast<const XLineWidthItem&>(pLine->GetMergedItem(XATTR_LINEWIDTH)) .GetValue() / 4);
aBorderLine.LineWidth = static_cast< sal_Int16 >( nLineWidth );
aBorderLine.LineStyle = eLineStyle == XLINE_SOLID ? table::BorderLineStyle::SOLID : table::BorderLineStyle::DASHED;
}
@@ -7414,7 +7416,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
sal_uInt32 nRows = pTableArry[ 1 ];
if ( nRows && pGroup->ISA( SdrObjGroup ) )
{
- SdrObjList* pSubList(((SdrObjGroup*)pGroup)->GetSubList());
+ SdrObjList* pSubList(static_cast<SdrObjGroup*>(pGroup)->GetSubList());
if ( pSubList )
{
std::set< sal_Int32 > aRows;
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 108a781a98f8..b2e6cec13135 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -335,27 +335,27 @@ void ImpPDFTabDialog::PageCreated( sal_uInt16 _nId,
{
if (_nId == mnGeneralPageId)
{
- ( ( ImpPDFTabGeneralPage* )&_rPage )->SetFilterConfigItem( this );
+ static_cast<ImpPDFTabGeneralPage*>( &_rPage )->SetFilterConfigItem( this );
}
else if (_nId == mnInterfacePageId)
{
- ( ( ImpPDFTabViewerPage* )&_rPage )->SetFilterConfigItem( this );
+ static_cast<ImpPDFTabViewerPage*>( &_rPage )->SetFilterConfigItem( this );
}
else if (_nId == mnViewPageId)
{
- ( ( ImpPDFTabOpnFtrPage* )&_rPage )->SetFilterConfigItem( this );
+ static_cast<ImpPDFTabOpnFtrPage*>( &_rPage )->SetFilterConfigItem( this );
}
else if (_nId == mnLinksPage)
{
- ( ( ImpPDFTabLinksPage* )&_rPage )->SetFilterConfigItem( this );
+ static_cast<ImpPDFTabLinksPage*>( &_rPage )->SetFilterConfigItem( this );
}
else if (_nId == mnSecurityPageId)
{
- ( ( ImpPDFTabSecurityPage* )&_rPage )->SetFilterConfigItem( this );
+ static_cast<ImpPDFTabSecurityPage*>( &_rPage )->SetFilterConfigItem( this );
}
else if (_nId == mnSigningPageId)
{
- ( ( ImpPDFTabSigningPage* )&_rPage )->SetFilterConfigItem( this );
+ static_cast<ImpPDFTabSigningPage*>( &_rPage )->SetFilterConfigItem( this );
}
}
@@ -372,17 +372,17 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
{
// updating the FilterData sequence and storing FilterData to configuration
if( GetTabPage(mnGeneralPageId) )
- ( ( ImpPDFTabGeneralPage* )GetTabPage(mnGeneralPageId) )->GetFilterConfigItem( this );
+ static_cast<ImpPDFTabGeneralPage*>( GetTabPage(mnGeneralPageId) )->GetFilterConfigItem( this );
if( GetTabPage(mnInterfacePageId) )
- ( ( ImpPDFTabViewerPage* )GetTabPage(mnInterfacePageId) )->GetFilterConfigItem( this );
+ static_cast<ImpPDFTabViewerPage*>( GetTabPage(mnInterfacePageId) )->GetFilterConfigItem( this );
if( GetTabPage(mnViewPageId) )
- ( ( ImpPDFTabOpnFtrPage* )GetTabPage(mnViewPageId) )->GetFilterConfigItem( this );
+ static_cast<ImpPDFTabOpnFtrPage*>( GetTabPage(mnViewPageId) )->GetFilterConfigItem( this );
if( GetTabPage(mnLinksPage) )
- ( ( ImpPDFTabLinksPage* )GetTabPage(mnLinksPage) )->GetFilterConfigItem( this );
+ static_cast<ImpPDFTabLinksPage*>( GetTabPage(mnLinksPage) )->GetFilterConfigItem( this );
if( GetTabPage(mnSecurityPageId) )
- ( ( ImpPDFTabSecurityPage* )GetTabPage(mnSecurityPageId) )->GetFilterConfigItem( this );
+ static_cast<ImpPDFTabSecurityPage*>( GetTabPage(mnSecurityPageId) )->GetFilterConfigItem( this );
if( GetTabPage(mnSigningPageId) )
- ( ( ImpPDFTabSigningPage* )GetTabPage(mnSigningPageId) )->GetFilterConfigItem( this );
+ static_cast<ImpPDFTabSigningPage*>( GetTabPage(mnSigningPageId) )->GetFilterConfigItem( this );
//prepare the items to be returned
maConfigItem.WriteBool( "UseLosslessCompression", mbUseLosslessCompression );
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 6cf6593de4d1..02c3136e5e87 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -434,7 +434,7 @@ sal_uLong GetBitmapChecksum( const MetaAction* pAction )
{
case( META_BMPSCALE_ACTION ):
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
if( pA )
nChecksum = pA->GetBitmap().GetChecksum();
else
@@ -443,7 +443,7 @@ sal_uLong GetBitmapChecksum( const MetaAction* pAction )
break;
case( META_BMPEXSCALE_ACTION ):
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
if( pA )
nChecksum = pA->GetBitmapEx().GetChecksum();
else
@@ -462,7 +462,7 @@ void MetaBitmapActionGetPoint( const MetaAction* pAction, Point& rPt )
{
case( META_BMPSCALE_ACTION ):
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
if( pA )
rPt = pA->GetPoint();
else
@@ -471,7 +471,7 @@ void MetaBitmapActionGetPoint( const MetaAction* pAction, Point& rPt )
break;
case( META_BMPEXSCALE_ACTION ):
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
if( pA )
rPt = pA->GetPoint();
else
@@ -1997,7 +1997,7 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & rxPag
if( nType == META_COMMENT_ACTION )
{
- const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
+ const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
if( ( pA->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_BEGIN") ) )
{
bIsTextShapeStarted = true;
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index 4454b8934e00..2de4b734adbb 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -101,28 +101,28 @@ void SVGFontExport::implCollectGlyphs()
{
case( META_TEXT_ACTION ):
{
- const MetaTextAction* pA = (const MetaTextAction*) pAction;
+ const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction);
aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
}
break;
case( META_TEXTRECT_ACTION ):
{
- const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
+ const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
aText = pA->GetText();
}
break;
case( META_TEXTARRAY_ACTION ):
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction);
aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
}
break;
case( META_STRETCHTEXT_ACTION ):
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction);
aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
}
break;
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 97967fdd1b6d..6d2efbad1713 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -493,7 +493,7 @@ void SVGTextWriter::implSetCurrentFont()
template< typename SubType >
bool SVGTextWriter::implGetTextPosition( const MetaAction* pAction, Point& raPos, bool& rbEmpty )
{
- const SubType* pA = (const SubType*) pAction;
+ const SubType* pA = static_cast<const SubType*>(pAction);
sal_uInt16 nLength = pA->GetLen();
rbEmpty = ( nLength == 0 );
if( !rbEmpty )
@@ -507,7 +507,7 @@ bool SVGTextWriter::implGetTextPosition( const MetaAction* pAction, Point& raPos
template<>
bool SVGTextWriter::implGetTextPosition<MetaTextRectAction>( const MetaAction* pAction, Point& raPos, bool& rbEmpty )
{
- const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
+ const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
sal_uInt16 nLength = pA->GetText().getLength();
rbEmpty = ( nLength == 0 );
if( !rbEmpty )
@@ -521,7 +521,7 @@ bool SVGTextWriter::implGetTextPosition<MetaTextRectAction>( const MetaAction* p
template< typename SubType >
bool SVGTextWriter::implGetTextPositionFromBitmap( const MetaAction* pAction, Point& raPos, bool& rbEmpty )
{
- const SubType* pA = (const SubType*) pAction;
+ const SubType* pA = static_cast<const SubType*>(pAction);
raPos = pA->GetPoint();
rbEmpty = false;
return true;
@@ -596,7 +596,7 @@ sal_Int32 SVGTextWriter::setTextPosition( const GDIMetaFile& rMtf, sal_uLong& nC
// without finding any text we stop searching
case( META_COMMENT_ACTION ):
{
- const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
+ const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
const OString& rsComment = pA->GetComment();
if( rsComment.equalsIgnoreAsciiCase( "XTEXT_EOL" ) )
{
@@ -683,28 +683,28 @@ void SVGTextWriter::setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAc
case( META_TEXT_ACTION ):
{
- const MetaTextAction* pA = (const MetaTextAction*) pAction;
+ const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction);
if( pA->GetLen() > 2 )
bConfigured = true;
}
break;
case( META_TEXTRECT_ACTION ):
{
- const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
+ const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
if( pA->GetText().getLength() > 2 )
bConfigured = true;
}
break;
case( META_TEXTARRAY_ACTION ):
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction);
if( pA->GetLen() > 2 )
bConfigured = true;
}
break;
case( META_STRETCHTEXT_ACTION ):
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction);
if( pA->GetLen() > 2 )
bConfigured = true;
}
@@ -713,7 +713,7 @@ void SVGTextWriter::setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAc
// we stop searching
case( META_COMMENT_ACTION ):
{
- const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
+ const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
const OString& rsComment = pA->GetComment();
if( rsComment.equalsIgnoreAsciiCase( "XTEXT_EOP" ) )
{
@@ -1394,7 +1394,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps()
{
case( META_BMPSCALE_ACTION ):
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
nChecksum = pA->GetBitmap().GetChecksum();
aPt = pA->GetPoint();
aSz = pA->GetSize();
@@ -1402,7 +1402,7 @@ void SVGTextWriter::implWriteEmbeddedBitmaps()
break;
case( META_BMPEXSCALE_ACTION ):
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
nChecksum = pA->GetBitmapEx().GetChecksum();
aPt = pA->GetPoint();
aSz = pA->GetSize();
@@ -2680,7 +2680,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if (pAction && (nType == META_COMMENT_ACTION))
{
sType.append(": ");
- const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
+ const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
OString sComment = pA->GetComment();
if (!sComment.isEmpty())
{
@@ -2711,7 +2711,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
catch( ... )
{
- const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
+ const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
OSL_FAIL( pA->GetComment().getStr() );
}
@@ -2723,7 +2723,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaPixelAction* pA = (const MetaPixelAction*) pAction;
+ const MetaPixelAction* pA = static_cast<const MetaPixelAction*>(pAction);
mpContext->AddPaintAttr( pA->GetColor(), pA->GetColor() );
ImplWriteLine( pA->GetPoint(), pA->GetPoint(), &pA->GetColor() );
@@ -2735,7 +2735,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaPointAction* pA = (const MetaPointAction*) pAction;
+ const MetaPointAction* pA = static_cast<const MetaPointAction*>(pAction);
mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() );
ImplWriteLine( pA->GetPoint(), pA->GetPoint(), NULL );
@@ -2747,7 +2747,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaLineAction* pA = (const MetaLineAction*) pAction;
+ const MetaLineAction* pA = static_cast<const MetaLineAction*>(pAction);
mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() );
ImplWriteLine( pA->GetStartPoint(), pA->GetEndPoint(), NULL );
@@ -2760,7 +2760,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
- ImplWriteRect( ( (const MetaRectAction*) pAction )->GetRect(), 0, 0 );
+ ImplWriteRect( static_cast<const MetaRectAction*>(pAction)->GetRect(), 0, 0 );
}
}
break;
@@ -2769,7 +2769,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction;
+ const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pAction);
mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
ImplWriteRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() );
@@ -2781,7 +2781,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction;
+ const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction);
const Rectangle& rRect = pA->GetRect();
mpContext->AddPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() );
@@ -2803,27 +2803,27 @@ void SVGActionWriter::ImplWriteActions( 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;
}
@@ -2840,7 +2840,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction;
+ const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction);
const Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
@@ -2857,7 +2857,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pAction;
+ const MetaPolyPolygonAction* pA = static_cast<const MetaPolyPolygonAction*>(pAction);
const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
if( rPolyPoly.Count() )
@@ -2873,7 +2873,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaGradientAction* pA = (const MetaGradientAction*) pAction;
+ const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pAction);
const Polygon aRectPoly( pA->GetRect() );
const tools::PolyPolygon aRectPolyPoly( aRectPoly );
@@ -2886,7 +2886,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction;
+ const MetaGradientExAction* pA = static_cast<const MetaGradientExAction*>(pAction);
ImplWriteGradientEx( pA->GetPolyPolygon(), pA->GetGradient(), nWriteFlags );
}
}
@@ -2896,7 +2896,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaHatchAction* pA = (const MetaHatchAction*) pAction;
+ const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction);
ImplWritePattern( pA->GetPolyPolygon(), &pA->GetHatch(), NULL, nWriteFlags );
}
}
@@ -2906,7 +2906,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaTransparentAction* pA = (const MetaTransparentAction*) pAction;
+ const MetaTransparentAction* pA = static_cast<const MetaTransparentAction*>(pAction);
const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
if( rPolyPoly.Count() )
@@ -2927,7 +2927,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction;
+ const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() );
ImplWriteMask( aTmpMtf, pA->GetPoint(), pA->GetSize(),
pA->GetGradient(), nWriteFlags );
@@ -2939,7 +2939,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
+ const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
bool bFound = false;
@@ -2950,7 +2950,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
{
bFound = true;
- const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*) pSubstAct;
+ const MetaBmpScaleAction* pBmpScaleAction = static_cast<const MetaBmpScaleAction*>(pSubstAct);
ImplWriteBmp( pBmpScaleAction->GetBitmap(),
pA->GetPoint(), pA->GetSize(),
Point(), pBmpScaleAction->GetBitmap().GetSizePixel() );
@@ -2962,7 +2962,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
case( META_COMMENT_ACTION ):
{
- const MetaCommentAction* pA = (const MetaCommentAction*) pAction;
+ const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
if( ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") ) &&
( nWriteFlags & SVGWRITER_WRITE_FILL ) )
@@ -2975,9 +2975,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
pAction = rMtf.GetAction( nCurAction );
if( pAction->GetType() == META_GRADIENTEX_ACTION )
- pGradAction = (const MetaGradientExAction*) pAction;
+ pGradAction = static_cast<const MetaGradientExAction*>(pAction);
else if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().
+ ( static_cast<const MetaCommentAction*>( pAction )->GetComment().
equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) )
{
bDone = true;
@@ -3035,7 +3035,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
pAction = rMtf.GetAction( nCurAction );
if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().
+ ( static_cast<const MetaCommentAction*>(pAction)->GetComment().
equalsIgnoreAsciiCase("XPATHFILL_SEQ_END") ) )
{
bSkip = false;
@@ -3063,7 +3063,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
pAction = rMtf.GetAction( nCurAction );
if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().
+ ( static_cast<const MetaCommentAction*>( pAction )->GetComment().
equalsIgnoreAsciiCase("XPATHFILL_SEQ_END") ) )
{
bSkip = false;
@@ -3211,7 +3211,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
pAction = rMtf.GetAction( nCurAction );
if( ( pAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pAction )->GetComment().
+ ( static_cast<const MetaCommentAction*>(pAction)->GetComment().
equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_END") ) )
{
bSkip = false;
@@ -3263,7 +3263,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
const MetaAction* pNextAction = rMtf.GetAction( nCurAction + 1 );
if( !( ( pNextAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pNextAction )->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_END") ) ))
+ ( static_cast<const MetaCommentAction*>(pNextAction)->GetComment().equalsIgnoreAsciiCase("XTEXT_PAINTSHAPE_END") ) ))
{
// nTextFound == -1 => no text found and end of paragraph reached
// nTextFound == 0 => no text found and end of text shape reached
@@ -3296,7 +3296,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
const MetaAction* pNextAction = rMtf.GetAction( nCurAction + 1 );
if( !( ( pNextAction->GetType() == META_COMMENT_ACTION ) &&
- ( ( (const MetaCommentAction*) pNextAction )->GetComment().equalsIgnoreAsciiCase("XTEXT_EOP") ) ) )
+ ( static_cast<const MetaCommentAction*>(pNextAction)->GetComment().equalsIgnoreAsciiCase("XTEXT_EOP") ) ) )
{
// nTextFound == -2 => no text found and end of line reached
// nTextFound == -1 => no text found and end of paragraph reached
@@ -3331,7 +3331,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaBmpAction* pA = (const MetaBmpAction*) pAction;
+ const MetaBmpAction* pA = static_cast<const MetaBmpAction*>(pAction);
ImplWriteBmp( pA->GetBitmap(),
pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmap().GetSizePixel() ),
@@ -3344,7 +3344,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction;
+ const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
// Bitmaps embedded into text shapes are collected and exported elsewhere.
if( maTextWriter.isTextShapeStarted() )
@@ -3365,7 +3365,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction;
+ const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction);
ImplWriteBmp( pA->GetBitmap(),
pA->GetDestPoint(), pA->GetDestSize(),
@@ -3378,7 +3378,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaBmpExAction* pA = (const MetaBmpExAction*) pAction;
+ const MetaBmpExAction* pA = static_cast<const MetaBmpExAction*>(pAction);
ImplWriteBmp( pA->GetBitmapEx(),
pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmapEx().GetSizePixel() ),
@@ -3391,7 +3391,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
+ const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
// Bitmaps embedded into text shapes are collected and exported elsewhere.
if( maTextWriter.isTextShapeStarted() )
@@ -3412,7 +3412,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
- const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction;
+ const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction);
ImplWriteBmp( pA->GetBitmapEx(),
pA->GetDestPoint(), pA->GetDestSize(),
@@ -3425,7 +3425,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_TEXT )
{
- const MetaTextAction* pA = (const MetaTextAction*) pAction;
+ const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
if( !aText.isEmpty() )
@@ -3450,7 +3450,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_TEXT )
{
- const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
+ const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
if (!pA->GetText().isEmpty())
{
@@ -3472,7 +3472,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_TEXT )
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction;
+ const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
if( !aText.isEmpty() )
@@ -3496,7 +3496,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
if( nWriteFlags & SVGWRITER_WRITE_TEXT )
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction;
+ const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
if( !aText.isEmpty() )
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 03672fd7f7f8..5acffd6b28ce 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -678,7 +678,7 @@ Reference< XComponent > XMLFilterTestDialog::getFrontMostDocument( const OUStrin
}
else
{
- xTest = (Reference< XComponent >)xDesktop->getCurrentComponent();
+ xTest = xDesktop->getCurrentComponent();
if( checkComponent( xTest, rServiceName ) )
{
diff --git a/include/svx/extrud3d.hxx b/include/svx/extrud3d.hxx
index ae3276c4ff82..dbb8260e0661 100644
--- a/include/svx/extrud3d.hxx
+++ b/include/svx/extrud3d.hxx
@@ -51,35 +51,35 @@ public:
// PercentDiagonal: 0..100, before 0.0..0.5
sal_uInt16 GetPercentDiagonal() const
- { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); }
+ { return static_cast<const SfxUInt16Item&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); }
// BackScale: 0..100, before 0.0..1.0
sal_uInt16 GetPercentBackScale() const
- { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); }
+ { return static_cast<const SfxUInt16Item&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); }
// BackScale: 0..100, before 0.0..1.0
sal_uInt32 GetExtrudeDepth() const
- { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); }
+ { return static_cast<const SfxUInt32Item&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); }
// #107245# GetSmoothNormals() for bExtrudeSmoothed
bool GetSmoothNormals() const
- { return ((const Svx3DSmoothNormalsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS)).GetValue(); }
+ { return static_cast<const Svx3DSmoothNormalsItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS)).GetValue(); }
// #107245# GetSmoothLids() for bExtrudeSmoothFrontBack
bool GetSmoothLids() const
- { return ((const Svx3DSmoothLidsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS)).GetValue(); }
+ { return static_cast<const Svx3DSmoothLidsItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS)).GetValue(); }
// #107245# GetCharacterMode() for bExtrudeCharacterMode
bool GetCharacterMode() const
- { return ((const Svx3DCharacterModeItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE)).GetValue(); }
+ { return static_cast<const Svx3DCharacterModeItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE)).GetValue(); }
// #107245# GetCloseFront() for bExtrudeCloseFront
bool GetCloseFront() const
- { return ((const Svx3DCloseFrontItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT)).GetValue(); }
+ { return static_cast<const Svx3DCloseFrontItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT)).GetValue(); }
// #107245# GetCloseBack() for bExtrudeCloseBack
bool GetCloseBack() const
- { return ((const Svx3DCloseBackItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK)).GetValue(); }
+ { return static_cast<const Svx3DCloseBackItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK)).GetValue(); }
virtual sal_uInt16 GetObjIdentifier() const SAL_OVERRIDE;
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 36722903e3c6..ac7e52493ef7 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -251,52 +251,52 @@ public :
// DoubleSided: sal_True/FALSE
bool GetDoubleSided() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); }
// NormalsKind: 0 == sal_False/sal_False, 1 == sal_True/sal_False, else == sal_True/TRUE
sal_uInt16 GetNormalsKind() const
- { return ((const Svx3DNormalsKindItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); }
+ { return static_cast<const Svx3DNormalsKindItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); }
// NormalsInvert: sal_True/FALSE
bool GetNormalsInvert() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); }
// TextureProjX: 0 == sal_False/sal_False, 1 == sal_True/sal_False, else == sal_True/TRUE
sal_uInt16 GetTextureProjectionX() const
- { return ((const Svx3DTextureProjectionXItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue(); }
+ { return static_cast<const Svx3DTextureProjectionXItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue(); }
// TextureProjY: 0 == sal_False/sal_False, 1 == sal_True/sal_False, else == sal_True/TRUE
sal_uInt16 GetTextureProjectionY() const
- { return ((const Svx3DTextureProjectionYItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); }
+ { return static_cast<const Svx3DTextureProjectionYItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); }
// Shadow3D: sal_True/FALSE
bool GetShadow3D() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); }
// MaterialColor: Color
Color GetMaterialColor() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_COLOR)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_COLOR)).GetValue(); }
// MaterialEmission: Color
Color GetMaterialEmission() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); }
// MaterialSpecular: Color
Color GetMaterialSpecular() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); }
// MaterialSpecularIntensity:
sal_uInt16 GetMaterialSpecularIntensity() const
- { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); }
+ { return static_cast<const SfxUInt16Item&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); }
// TextureFilter: sal_True/FALSE
bool GetTextureFilter() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); }
// #i28528#
// Added extra Item (Bool) for chart2 to be able to show reduced line geometry
bool GetReducedLineGeometry() const
- { return ((const Svx3DReducedLineGeometryItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)).GetValue(); }
+ { return static_cast<const Svx3DReducedLineGeometryItem&>(GetObjectItemSet().Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)).GetValue(); }
virtual sal_uInt16 GetObjIdentifier() const SAL_OVERRIDE;
virtual void RecalcSnapRect() SAL_OVERRIDE;
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index dfcc90e34c71..86c7ecc423ac 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -104,85 +104,85 @@ public:
// Perspective: enum ProjectionType { PR_PARALLEL, PR_PERSPECTIVE }
ProjectionType GetPerspective() const
- { return (ProjectionType)((const Svx3DPerspectiveItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue(); }
+ { return (ProjectionType) static_cast<const Svx3DPerspectiveItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue(); }
// Distance:
double GetDistance() const
- { return (double)((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); }
+ { return (double)static_cast<const SfxUInt32Item&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); }
// Focal length: before cm, now 1/10th mm (*100)
double GetFocalLength() const
- { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); }
+ { return static_cast<const SfxUInt32Item&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); }
// Two sided lighting:
bool GetTwoSidedLighting() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); }
// Lightcolor:
Color GetLightColor1() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); }
Color GetLightColor2() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); }
Color GetLightColor3() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); }
Color GetLightColor4() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); }
Color GetLightColor5() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); }
Color GetLightColor6() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); }
Color GetLightColor7() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); }
Color GetLightColor8() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); }
// Ambient color:
Color GetGlobalAmbientColor() const
- { return ((const SvxColorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); }
+ { return static_cast<const SvxColorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); }
// Light on/off:
bool GetLightOnOff1() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue(); }
bool GetLightOnOff2() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue(); }
bool GetLightOnOff3() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue(); }
bool GetLightOnOff4() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue(); }
bool GetLightOnOff5() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue(); }
bool GetLightOnOff6() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue(); }
bool GetLightOnOff7() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue(); }
bool GetLightOnOff8() const
- { return ((const SfxBoolItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue(); }
+ { return static_cast<const SfxBoolItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue(); }
// Light direction:
basegfx::B3DVector GetLightDirection1() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue(); }
basegfx::B3DVector GetLightDirection2() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue(); }
basegfx::B3DVector GetLightDirection3() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue(); }
basegfx::B3DVector GetLightDirection4() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue(); }
basegfx::B3DVector GetLightDirection5() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue(); }
basegfx::B3DVector GetLightDirection6() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue(); }
basegfx::B3DVector GetLightDirection7() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue(); }
basegfx::B3DVector GetLightDirection8() const
- { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue(); }
+ { return static_cast<const SvxB3DVectorItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue(); }
// ShadowSlant:
sal_uInt16 GetShadowSlant() const
- { return ((const SfxUInt16Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); }
+ { return static_cast<const SfxUInt16Item&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); }
// ShadeMode: 0 == FLAT, 1 == PHONG, 2 == SMOOTH, 3 == ForceDraft
sal_uInt16 GetShadeMode() const
- { return ((const Svx3DShadeModeItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue(); }
+ { return static_cast<const Svx3DShadeModeItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue(); }
// set flag to draw only selected
void SetDrawOnlySelected(bool bNew) { bDrawOnlySelected = bNew; }
diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index 33ebab8d627f..42c092074106 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -95,6 +95,7 @@ private:
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& GetGeometry() const { return aPropSeq;}
com::sun::star::uno::Any* GetPropertyValueByName( const OUString& rPropName );
+ const com::sun::star::uno::Any* GetPropertyValueByName( const OUString& rPropName ) const;
com::sun::star::uno::Any* GetPropertyValueByName( const OUString& rPropName, const OUString& rPropName2 );
void SetPropertyValue( const com::sun::star::beans::PropertyValue& rPropVal );
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index b5bc7a9d56fb..f926636cc952 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -68,6 +68,15 @@ com::sun::star::uno::Any* SdrCustomShapeGeometryItem::GetPropertyValueByName( co
return pRet;
}
+const com::sun::star::uno::Any* SdrCustomShapeGeometryItem::GetPropertyValueByName( const OUString& rPropName ) const
+{
+ const com::sun::star::uno::Any* pRet = NULL;
+ PropertyHashMap::const_iterator aHashIter( aPropHashMap.find( rPropName ) );
+ if ( aHashIter != aPropHashMap.end() )
+ pRet = &aPropSeq[ (*aHashIter).second ].Value;
+ return pRet;
+}
+
com::sun::star::uno::Any* SdrCustomShapeGeometryItem::GetPropertyValueByName( const OUString& rSequenceName, const OUString& rPropName )
{
com::sun::star::uno::Any* pRet = NULL;