[Libreoffice-commits] core.git: 2 commits - filter/source include/svx svx/source xmlsecurity/source

Noel Grandin noel at peralex.com
Sun Oct 5 22:53:45 PDT 2014


 filter/source/config/cache/basecontainer.cxx                |    2 
 filter/source/config/cache/configflush.cxx                  |    2 
 filter/source/flash/swfexporter.cxx                         |    2 
 filter/source/flash/swfwriter1.cxx                          |   70 ++---
 filter/source/graphicfilter/eos2met/eos2met.cxx             |   94 +++----
 filter/source/graphicfilter/epict/epict.cxx                 |   68 ++---
 filter/source/graphicfilter/eps/eps.cxx                     |  150 ++++++------
 filter/source/graphicfilter/icgm/class5.cxx                 |   10 
 filter/source/graphicfilter/icgm/elements.cxx               |   10 
 filter/source/graphicfilter/idxf/dxf2mtf.cxx                |   40 +--
 filter/source/graphicfilter/idxf/dxfreprd.cxx               |   20 -
 filter/source/graphicfilter/ipict/ipict.cxx                 |    6 
 filter/source/msfilter/escherex.cxx                         |   24 -
 filter/source/msfilter/msdffimp.cxx                         |   55 ++--
 filter/source/msfilter/svdfppt.cxx                          |   60 ++--
 filter/source/pdf/impdialog.cxx                             |   24 -
 filter/source/svg/svgexport.cxx                             |   10 
 filter/source/svg/svgfontexport.cxx                         |    8 
 filter/source/svg/svgwriter.cxx                             |  100 ++++----
 filter/source/xsltdialog/xmlfiltertestdialog.cxx            |    2 
 include/svx/extrud3d.hxx                                    |   16 -
 include/svx/obj3d.hxx                                       |   24 -
 include/svx/scene3d.hxx                                     |   62 ++--
 include/svx/sdasitm.hxx                                     |    1 
 svx/source/items/customshapeitem.cxx                        |    9 
 xmlsecurity/source/dialogs/certificatechooser.cxx           |    4 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx      |    6 
 xmlsecurity/source/dialogs/macrosecurity.cxx                |    2 
 xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx |    2 
 29 files changed, 448 insertions(+), 435 deletions(-)

New commits:
commit addf55184a1433c6432e8c727ee5232d6c4dc9f9
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Oct 2 15:36:13 2014 +0200

    loplugin: cstylecast
    
    Change-Id: I37d7c3e59f1debbee8d92e76f4d08fff773000b3

diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index 4ad295d..c475a3c 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -43,7 +43,7 @@ sal_uInt16 CertificateChooser::GetSelectedEntryPos( void ) const
 
     SvTreeListEntry* pSel = m_pCertLB->FirstSelected();
     if( pSel )
-        nSel = (sal_uInt16) ( sal_uIntPtr ) pSel->GetUserData();
+        nSel = (sal_uInt16) reinterpret_cast<sal_uIntPtr>( pSel->GetUserData() );
 
     return (sal_uInt16) nSel;
 }
@@ -173,7 +173,7 @@ void CertificateChooser::ImplInitialize()
             SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( XmlSec::GetContentPart( maCerts[ nC ]->getSubjectName() )
                 + "\t" + XmlSec::GetContentPart( maCerts[ nC ]->getIssuerName() )
                 + "\t" + XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() ) );
-            pEntry->SetUserData( ( void* )(sal_IntPtr)nC ); // missuse user data as index
+            pEntry->SetUserData( reinterpret_cast<void*>(nC) ); // missuse user data as index
         }
 
         // enable/disable buttons
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 7cfde0f..3aad10c 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -513,7 +513,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, RemoveButtonHdl)
     {
         try
         {
-            sal_uInt16 nSelected = (sal_uInt16) (sal_uIntPtr) m_pSignaturesLB->FirstSelected()->GetUserData();
+            sal_uInt16 nSelected = (sal_uInt16) reinterpret_cast<sal_uIntPtr>( m_pSignaturesLB->FirstSelected()->GetUserData() );
             maCurrentSignatureInformations.erase( maCurrentSignatureInformations.begin()+nSelected );
 
             // Export all other signatures...
@@ -671,7 +671,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
             m_pSignaturesLB->SetEntryText( aSubject, pEntry, 1 );
             m_pSignaturesLB->SetEntryText( aIssuer, pEntry, 2 );
             m_pSignaturesLB->SetEntryText( aDateTimeStr, pEntry, 3 );
-            pEntry->SetUserData( ( void* ) n );     // missuse user data as index
+            pEntry->SetUserData( reinterpret_cast<void*>(n) );     // missuse user data as index
         }
     }
 
@@ -726,7 +726,7 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
 {
     if( m_pSignaturesLB->FirstSelected() )
     {
-        sal_uInt16 nSelected = (sal_uInt16) (sal_uIntPtr) m_pSignaturesLB->FirstSelected()->GetUserData();
+        sal_uInt16 nSelected = (sal_uInt16) reinterpret_cast<sal_uIntPtr>( m_pSignaturesLB->FirstSelected()->GetUserData() );
         const SignatureInformation& rInfo = maCurrentSignatureInformations[ nSelected ];
         css::uno::Reference<css::xml::crypto::XSecurityEnvironment > xSecEnv =
             maSignatureHelper.GetSecurityEnvironment();
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index d76fdcd..33c37ba 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -315,7 +315,7 @@ void MacroSecurityTrustedSourcesTP::FillCertLB( void )
             SvTreeListEntry*    pLBEntry = m_pTrustCertLB->InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
             m_pTrustCertLB->SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
             m_pTrustCertLB->SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
-            pLBEntry->SetUserData( ( void* ) (sal_IntPtr)nEntry );      // missuse user data as index
+            pLBEntry->SetUserData( reinterpret_cast<void*>(nEntry) );      // missuse user data as index
         }
     }
 }
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index 4561868..e735c94 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -725,7 +725,7 @@ cssu::Reference< cssxw::XXMLElementWrapper > SAL_CALL XMLDocumentWrapper_XmlSecI
     throw (cssu::RuntimeException, std::exception)
 {
     XMLElementWrapper_XmlSecImpl* pElement = new XMLElementWrapper_XmlSecImpl(m_pCurrentElement);
-    return (cssu::Reference< cssxw::XXMLElementWrapper >)pElement;
+    return cssu::Reference< cssxw::XXMLElementWrapper >(pElement);
 }
 
 void SAL_CALL XMLDocumentWrapper_XmlSecImpl::setCurrentElement( const cssu::Reference< cssxw::XXMLElementWrapper >& element )
commit 0745982dc53cce65e63bd05a757aec8e96bcd564
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Oct 2 15:23:28 2014 +0200

    loplugin: cstylecast
    
    Change-Id: I88a106081b7413bff6313d1e07f53e39d8350002

diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index 00d85e0..cbf6e46 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 595efe4..0f7d6cc 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 083b158..b2bc39b 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 f2cf9e6..b90b3c9 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 8aaa5b2..d1a1459 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 e5fee90..1aad8c1e22 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 c9b8dd5..19465a6 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 86237a5..99c2a81 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 f4c10dc..fc85f28 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 a849b47..21da6a4 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 456d3b2..d715714 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;

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list