[Libreoffice-commits] core.git: 8 commits - sd/source sw/inc sw/source

Noel Grandin noel at peralex.com
Mon Nov 10 05:23:15 PST 2014


 sd/source/ui/docshell/docshel4.cxx                     |   28 ++---
 sd/source/ui/func/bulmaper.cxx                         |   18 +--
 sd/source/ui/func/fubullet.cxx                         |    6 -
 sd/source/ui/func/fuconbez.cxx                         |    4 
 sd/source/ui/func/fuconcs.cxx                          |    6 -
 sd/source/ui/func/fuconrec.cxx                         |   26 ++---
 sd/source/ui/func/fuconstr.cxx                         |   12 +-
 sd/source/ui/func/fucopy.cxx                           |   20 ++--
 sd/source/ui/func/fudraw.cxx                           |    2 
 sd/source/ui/func/fuediglu.cxx                         |    2 
 sd/source/ui/func/fuexpand.cxx                         |   10 +-
 sd/source/ui/func/fuformatpaintbrush.cxx               |    2 
 sd/source/ui/func/fuhhconv.cxx                         |    2 
 sd/source/ui/func/fuinsert.cxx                         |   16 +--
 sd/source/ui/func/fuinsfil.cxx                         |    6 -
 sd/source/ui/func/fulinend.cxx                         |    2 
 sd/source/ui/func/fumorph.cxx                          |    6 -
 sd/source/ui/func/fuoaprms.cxx                         |   36 +++----
 sd/source/ui/func/fuolbull.cxx                         |    8 -
 sd/source/ui/func/fuoltext.cxx                         |    2 
 sd/source/ui/func/fupage.cxx                           |   38 +++----
 sd/source/ui/func/fuparagr.cxx                         |    6 -
 sd/source/ui/func/fupoor.cxx                           |   10 +-
 sd/source/ui/func/fuprlout.cxx                         |   16 +--
 sd/source/ui/func/fuprobjs.cxx                         |    7 -
 sd/source/ui/func/fuscale.cxx                          |    4 
 sd/source/ui/func/fusel.cxx                            |    2 
 sd/source/ui/func/fusldlg.cxx                          |    2 
 sd/source/ui/func/fusnapln.cxx                         |    6 -
 sd/source/ui/func/fusumry.cxx                          |    6 -
 sd/source/ui/func/futempl.cxx                          |   44 ++++----
 sd/source/ui/func/futext.cxx                           |   14 +-
 sd/source/ui/func/futhes.cxx                           |    2 
 sd/source/ui/func/fuvect.cxx                           |    4 
 sd/source/ui/func/undopage.cxx                         |    4 
 sd/source/ui/func/unoaprms.cxx                         |    2 
 sd/source/ui/inc/unopage.hxx                           |    2 
 sd/source/ui/slideshow/showwin.cxx                     |    2 
 sd/source/ui/slideshow/slideshowimpl.cxx               |    4 
 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx      |    2 
 sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx |    2 
 sd/source/ui/slidesorter/controller/SlsClipboard.cxx   |    2 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |    2 
 sd/source/ui/unoidl/unocpres.cxx                       |    2 
 sd/source/ui/unoidl/unomodel.cxx                       |   30 +++---
 sd/source/ui/unoidl/unoobj.cxx                         |    6 -
 sd/source/ui/unoidl/unopage.cxx                        |   52 +++++-----
 sd/source/ui/unoidl/unopback.cxx                       |    4 
 sd/source/ui/view/GraphicObjectBar.cxx                 |    8 -
 sd/source/ui/view/Outliner.cxx                         |    8 -
 sd/source/ui/view/ViewClipboard.cxx                    |    2 
 sd/source/ui/view/ViewShellImplementation.cxx          |    2 
 sd/source/ui/view/ViewShellManager.cxx                 |    2 
 sd/source/ui/view/drawview.cxx                         |   10 +-
 sd/source/ui/view/drbezob.cxx                          |    2 
 sd/source/ui/view/drtxtob.cxx                          |   18 +--
 sd/source/ui/view/drtxtob1.cxx                         |   42 ++++----
 sd/source/ui/view/drviews1.cxx                         |    4 
 sd/source/ui/view/drviews2.cxx                         |   84 ++++++++---------
 sd/source/ui/view/drviews3.cxx                         |   60 ++++++------
 sd/source/ui/view/drviews4.cxx                         |   12 +-
 sd/source/ui/view/drviews5.cxx                         |    2 
 sd/source/ui/view/drviews6.cxx                         |   18 +--
 sd/source/ui/view/drviews7.cxx                         |    8 -
 sd/source/ui/view/drviews9.cxx                         |   18 +--
 sd/source/ui/view/drviewsd.cxx                         |    6 -
 sd/source/ui/view/drviewse.cxx                         |   12 +-
 sd/source/ui/view/drviewsf.cxx                         |   28 ++---
 sd/source/ui/view/drviewsi.cxx                         |    8 -
 sd/source/ui/view/drviewsj.cxx                         |    8 -
 sd/source/ui/view/outlnvs2.cxx                         |    8 -
 sd/source/ui/view/outlnvsh.cxx                         |   24 ++--
 sd/source/ui/view/outlview.cxx                         |    6 -
 sd/source/ui/view/sdview.cxx                           |   16 +--
 sd/source/ui/view/sdview2.cxx                          |   30 +++---
 sd/source/ui/view/sdview3.cxx                          |   24 ++--
 sd/source/ui/view/sdview4.cxx                          |    4 
 sd/source/ui/view/sdwindow.cxx                         |    2 
 sd/source/ui/view/unmodpg.cxx                          |    4 
 sd/source/ui/view/viewshe3.cxx                         |    2 
 sd/source/ui/view/viewshel.cxx                         |    8 -
 sw/inc/cellatr.hxx                                     |    6 -
 sw/inc/crsrsh.hxx                                      |    2 
 sw/inc/dbfld.hxx                                       |    2 
 sw/inc/dcontact.hxx                                    |    4 
 sw/inc/doc.hxx                                         |   10 +-
 sw/inc/docufld.hxx                                     |    2 
 sw/inc/editsh.hxx                                      |    6 -
 sw/inc/expfld.hxx                                      |    2 
 sw/inc/fchrfmt.hxx                                     |    4 
 sw/inc/fldbas.hxx                                      |    4 
 sw/inc/fmtclbl.hxx                                     |    2 
 sw/inc/fmtclds.hxx                                     |    2 
 sw/inc/fmtcnct.hxx                                     |    2 
 sw/inc/fmtcntnt.hxx                                    |    2 
 sw/inc/fmtcol.hxx                                      |    2 
 sw/inc/fmteiro.hxx                                     |    2 
 sw/inc/fmtfollowtextflow.hxx                           |    2 
 sw/inc/fmtfordr.hxx                                    |    2 
 sw/inc/fmtfsize.hxx                                    |    2 
 sw/inc/fmtftntx.hxx                                    |    4 
 sw/inc/fmthdft.hxx                                     |    2 
 sw/inc/fmtline.hxx                                     |    2 
 sw/inc/fmtlsplt.hxx                                    |    2 
 sw/inc/fmtmeta.hxx                                     |    4 
 sw/inc/fmtornt.hxx                                     |    4 
 sw/inc/fmtpdsc.hxx                                     |    2 
 sw/inc/fmtrowsplt.hxx                                  |    2 
 sw/inc/fmtsrnd.hxx                                     |    2 
 sw/inc/fmturl.hxx                                      |    2 
 sw/inc/fmtwrapinfluenceonobjpos.hxx                    |    2 
 sw/inc/format.hxx                                      |    2 
 sw/inc/frmatr.hxx                                      |   42 +++++---
 sw/inc/grfatr.hxx                                      |   24 ++--
 sw/inc/hfspacingitem.hxx                               |    2 
 sw/inc/ndnotxt.hxx                                     |    6 -
 sw/inc/ndole.hxx                                       |    4 
 sw/inc/node.hxx                                        |   38 +++----
 sw/inc/numrule.hxx                                     |    4 
 sw/inc/swatrset.hxx                                    |    2 
 sw/inc/swtable.hxx                                     |   15 +--
 sw/inc/tgrditem.hxx                                    |    4 
 sw/inc/tox.hxx                                         |    4 
 sw/inc/txatbase.hxx                                    |   40 ++++----
 sw/inc/txatritr.hxx                                    |    2 
 sw/source/core/SwNumberTree/SwNumberTree.cxx           |    2 
 sw/source/core/access/acccontext.cxx                   |    2 
 sw/source/core/access/accdoc.cxx                       |    8 -
 sw/source/core/access/accembedded.cxx                  |    2 
 sw/source/core/access/accframe.cxx                     |    2 
 sw/source/core/access/accgraphic.cxx                   |    6 -
 sw/source/core/access/accmap.cxx                       |    8 -
 sw/source/core/access/accnotextframe.cxx               |    4 
 sw/source/core/access/accnotexthyperlink.hxx           |    2 
 sw/source/core/access/accpara.cxx                      |   12 +-
 sw/source/core/access/acctable.cxx                     |    4 
 sw/source/core/attr/calbck.cxx                         |    2 
 sw/source/core/attr/cellatr.cxx                        |   10 +-
 sw/source/core/attr/format.cxx                         |   14 +-
 sw/source/core/attr/swatrset.cxx                       |   22 ++--
 sw/source/core/bastyp/calc.cxx                         |   32 +++---
 sw/source/core/bastyp/init.cxx                         |    8 -
 sw/source/core/crsr/callnk.cxx                         |   12 +-
 sw/source/core/crsr/crsrsh.cxx                         |   56 +++++------
 sw/source/core/crsr/crstrvl.cxx                        |   54 +++++-----
 sw/source/core/crsr/findattr.cxx                       |   20 ++--
 sw/source/core/crsr/findtxt.cxx                        |    4 
 sw/source/core/crsr/pam.cxx                            |    8 -
 sw/source/core/crsr/swcrsr.cxx                         |   36 +++----
 sw/source/core/inc/cntfrm.hxx                          |   12 +-
 sw/source/core/inc/doctxm.hxx                          |    1 
 sw/source/core/inc/fntcache.hxx                        |    2 
 sw/source/core/inc/frmtool.hxx                         |    5 -
 sw/source/core/inc/tabfrm.hxx                          |    4 
 sw/source/core/inc/txtfrm.hxx                          |    4 
 155 files changed, 818 insertions(+), 798 deletions(-)

New commits:
commit 3652012a51cce55e6d1b5eaa78d555667c064088
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Nov 10 13:37:34 2014 +0200

    loplugin: cstylecast
    
    Change-Id: I4fbe7d35b66dda16f19019fd1baf0aa03361390c

diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
index 4ff7c97..d782728 100644
--- a/sw/inc/fmtcnct.hxx
+++ b/sw/inc/fmtcnct.hxx
@@ -23,8 +23,8 @@
 #include <svl/poolitem.hxx>
 #include <format.hxx>
 #include <calbck.hxx>
+#include <frmfmt.hxx>
 
-class SwFlyFrmFmt;
 class IntlWrapper;
 
 /// Connection (text flow) between two FlyFrms.
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 23c4845..3fcc988 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -23,8 +23,8 @@
 #include <format.hxx>
 #include <svl/poolitem.hxx>
 #include <calbck.hxx>
+#include <frmfmt.hxx>
 
-class SwFrmFmt;
 class IntlWrapper;
 class SwFmt;
 
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
index cdf3892..ced4751 100644
--- a/sw/inc/txatritr.hxx
+++ b/sw/inc/txatritr.hxx
@@ -82,7 +82,7 @@ public:
     {}
 
     sal_uInt16 GetLanguage() const
-        { return ((SvxLanguageItem&)GetAttr()).GetValue(); }
+        { return static_cast<const SvxLanguageItem&>(GetAttr()).GetValue(); }
 };
 
 #endif
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index dff0b0f..73f6e35 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -379,7 +379,7 @@ bool SwCrsrShell::GotoTOXMarkBase()
         for( SwTOXBase* pTOX = aIter.First(); pTOX; pTOX = aIter.Next() )
         {
             if( pTOX->ISA( SwTOXBaseSection ) &&
-                0 != ( pSectFmt = ((SwTOXBaseSection*)pTOX)->GetFmt() ) &&
+                0 != ( pSectFmt = static_cast<SwTOXBaseSection*>(pTOX)->GetFmt() ) &&
                 0 != ( pSectNd = pSectFmt->GetSectionNode() ))
             {
                 SwNodeIndex aIdx( *pSectNd, 1 );
@@ -447,11 +447,11 @@ bool SwCrsrShell::GotoNxtPrvTblFormula( bool bNext, bool bOnlyErrors )
         for( n = 0; n < nMaxItems; ++n )
             if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
                                         RES_BOXATR_FORMULA, n ) ) &&
-                0 != (pTBox = ((SwTblBoxFormula*)pItem)->GetTableBox() ) &&
+                0 != (pTBox = static_cast<const SwTblBoxFormula*>(pItem)->GetTableBox() ) &&
                 pTBox->GetSttNd() &&
                 pTBox->GetSttNd()->GetNodes().IsDocNodes() &&
                 ( !bOnlyErrors ||
-                  !((SwTblBoxFormula*)pItem)->HasValidBoxes() ) )
+                  !static_cast<const SwTblBoxFormula*>(pItem)->HasValidBoxes() ) )
             {
                 const SwCntntFrm* pCFrm;
                 SwNodeIndex aIdx( *pTBox->GetSttNd() );
@@ -519,7 +519,7 @@ bool SwCrsrShell::GotoNxtPrvTOXMark( bool bNext )
         for( n = 0; n < nMaxItems; ++n )
             if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
                                         RES_TXTATR_TOXMARK, n ) ) &&
-                0 != (pTxtTOX = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) &&
+                0 != (pTxtTOX = static_cast<const SwTOXMark*>(pItem)->GetTxtTOXMark() ) &&
                 ( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() &&
                 0 != ( pCFrm = pTxtNd->getLayoutFrm( GetLayout(), &aPt, 0, false )) &&
                 ( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
@@ -592,7 +592,7 @@ void lcl_MakeFldLst(
         pTxtFld = pFmtFld->GetTxtFld();
         if ( pTxtFld != NULL
              && ( !bChkInpFlag
-                  || ((SwSetExpField*)pTxtFld->GetFmtFld().GetField())->GetInputFlag() ) )
+                  || static_cast<const SwSetExpField*>(pTxtFld->GetFmtFld().GetField())->GetInputFlag() ) )
         {
             const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
             const SwCntntFrm* pCFrm =
@@ -710,7 +710,7 @@ bool SwCrsrShell::MoveFldType(
         {
             // create dummy for the search
             SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField(
-                (SwDateTimeFieldType*)mpDoc->getIDocumentFieldsAccess().GetSysFldType( RES_DATETIMEFLD ) ) );
+                static_cast<SwDateTimeFieldType*>(mpDoc->getIDocumentFieldsAccess().GetSysFldType( RES_DATETIMEFLD ) ) ) );
 
             pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(),
                         mpDoc->IsClipBoard() );
@@ -730,7 +730,7 @@ bool SwCrsrShell::MoveFldType(
 
         if( bDelFld )
         {
-            delete (SwFmtFld*)&pTxtFld->GetAttr();
+            delete static_cast<SwFmtFld*>(&pTxtFld->GetAttr());
             delete pTxtFld;
         }
 
@@ -852,7 +852,7 @@ SwField* SwCrsrShell::GetCurFld( const bool bIncludeInputFldAtStart ) const
     {
         // TabellenFormel ? wandel internen in externen Namen um
         const SwTableNode* pTblNd = IsCrsrInTbl();
-        ((SwTblField*)pCurFld)->PtrToBoxNm( pTblNd ? &pTblNd->GetTable() : 0 );
+        static_cast<SwTblField*>(pCurFld)->PtrToBoxNm( pTblNd ? &pTblNd->GetTable() : 0 );
     }
 
     return pCurFld;
@@ -967,7 +967,7 @@ bool SwCrsrShell::GotoNextOutline()
     SwCallLink aLk( *this ); // watch Crsr-Moves
     SwCrsrSaveState aSaveState( *pCrsr );
     pCrsr->GetPoint()->nNode = *pNd;
-    pCrsr->GetPoint()->nContent.Assign( (SwTxtNode*)pNd, 0 );
+    pCrsr->GetPoint()->nContent.Assign( static_cast<SwTxtNode*>(pNd), 0 );
 
     bool bRet = !pCrsr->IsSelOvr();
     if( bRet )
@@ -998,7 +998,7 @@ bool SwCrsrShell::GotoPrevOutline()
         SwCallLink aLk( *this ); // watch Crsr-Moves
         SwCrsrSaveState aSaveState( *pCrsr );
         pCrsr->GetPoint()->nNode = *pNd;
-        pCrsr->GetPoint()->nContent.Assign( (SwTxtNode*)pNd, 0 );
+        pCrsr->GetPoint()->nContent.Assign( static_cast<SwTxtNode*>(pNd), 0 );
 
         bRet = !pCrsr->IsSelOvr();
         if( bRet )
@@ -1022,7 +1022,7 @@ sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel )
     {
         pNd = rNds.GetOutLineNds()[ nPos ];
 
-        if( ((SwTxtNode*)pNd)->GetAttrOutlineLevel()-1 <= nLevel )
+        if( static_cast<SwTxtNode*>(pNd)->GetAttrOutlineLevel()-1 <= nLevel )
             return nPos;
 
     }
@@ -1261,13 +1261,13 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
                                 UpdateCrsr();
                         }
                         else if( RES_TABLEFLD == pFld->Which() &&
-                            ((SwTblField*)pFld)->IsIntrnlName() )
+                            static_cast<const SwTblField*>(pFld)->IsIntrnlName() )
                         {
                             // create from internal (for CORE) the external
                             // (for UI) formula
                             const SwTableNode* pTblNd = pTxtNd->FindTableNode();
                             if( pTblNd )        // steht in einer Tabelle
-                                ((SwTblField*)pFld)->PtrToBoxNm( &pTblNd->GetTable() );
+                                const_cast<SwTblField*>(static_cast<const SwTblField*>(pFld))->PtrToBoxNm( &pTblNd->GetTable() );
                         }
                     }
 
@@ -1314,7 +1314,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
                         {
                             SwCallLink aLk( *this ); // watch Crsr-Moves
                             SwCrsrSaveState aSaveState( *m_pCurCrsr );
-                            m_pCurCrsr->GetPoint()->nNode = *((SwTxtFtn*)pTxtAttr)->GetStartNode();
+                            m_pCurCrsr->GetPoint()->nNode = *static_cast<SwTxtFtn*>(pTxtAttr)->GetStartNode();
                             SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
                                 &m_pCurCrsr->GetPoint()->nNode,
                                 true, !IsReadOnlyAvailable() );
@@ -1493,7 +1493,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
                     if( pF )
                     {
                         // then the CellFrame
-                        pFrm = (SwCntntFrm*)pF;
+                        pFrm = static_cast<SwCntntFrm*>(pF);
                         while( pF && !pF->IsCellFrm() )
                             pF = pF->GetUpper();
                     }
@@ -1516,7 +1516,7 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
                             rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_TABLEBOXVALUE;
                         else
 #endif
-                            ((SwTblBoxFormula*)pItem)->PtrToBoxNm( &pTblNd->GetTable() );
+                            const_cast<SwTblBoxFormula*>(static_cast<const SwTblBoxFormula*>(pItem))->PtrToBoxNm( &pTblNd->GetTable() );
 
                         bRet = true;
                         if( bSetCrsr )
@@ -1675,7 +1675,7 @@ bool SwContentAtPos::IsInProtectSect() const
             break;
 
         case SW_FTN:
-            pNd = &((SwTxtFtn*)pFndTxtAttr)->GetTxtNode();
+            pNd = &static_cast<const SwTxtFtn*>(pFndTxtAttr)->GetTxtNode();
             break;
 
         case SW_INETATTR:
@@ -1911,14 +1911,14 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
                                     RES_LR_SPACE, RES_LR_SPACE,
                                     RES_PARATR_ADJUST, RES_PARATR_ADJUST,
                                     0 );
-                    SvxLRSpaceItem aLR( (SvxLRSpaceItem&)
-                                        pCNd->GetAttr( RES_LR_SPACE ) );
+                    SvxLRSpaceItem aLR( static_cast<const SvxLRSpaceItem&>(
+                                        pCNd->GetAttr( RES_LR_SPACE ) ) );
                     aLR.SetTxtLeft( aFPos.nTabCnt );
                     aLR.SetTxtFirstLineOfst( 0 );
                     aSet.Put( aLR );
 
-                    const SvxAdjustItem& rAdj = (SvxAdjustItem&)pCNd->
-                                        GetAttr( RES_PARATR_ADJUST );
+                    const SvxAdjustItem& rAdj = static_cast<const SvxAdjustItem&>(pCNd->
+                                        GetAttr( RES_PARATR_ADJUST ));
                     if( SVX_ADJUST_LEFT != rAdj.GetAdjust() )
                         aSet.Put( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) );
 
@@ -2101,7 +2101,7 @@ const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect
                     // Check for overlaps. These can happen when FmtColl-
                     // Redlines were streched over a whole paragraph
                     SwPaM* pCur = m_pCurCrsr;
-                    SwPaM* pNextPam = (SwPaM*)pCur->GetNext();
+                    SwPaM* pNextPam = static_cast<SwPaM*>(pCur->GetNext());
                     SwPosition* pCStt = pCur->Start(), *pCEnd = pCur->End();
                     while( pCur != pNextPam )
                     {
@@ -2149,11 +2149,11 @@ const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, bool bSelect
                         if( bDel )
                         {
                             // not needed anymore
-                            SwPaM* pPrevPam = (SwPaM*)pNextPam->GetPrev();
+                            SwPaM* pPrevPam = static_cast<SwPaM*>(pNextPam->GetPrev());
                             delete pNextPam;
                             pNextPam = pPrevPam;
                         }
-                        pNextPam = (SwPaM*)pNextPam->GetNext();
+                        pNextPam = static_cast<SwPaM*>(pNextPam->GetNext());
                     }
                 }
 
@@ -2243,7 +2243,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
         const SwFrmFmts* pFmts = GetDoc()->GetSpzFrmFmts();
         for( sal_uInt16 n = 0, nEnd = pFmts->size(); n < nEnd; ++n )
         {
-            SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)(*pFmts)[ n ];
+            SwFlyFrmFmt* pFmt = static_cast<SwFlyFrmFmt*>((*pFmts)[ n ]);
             const SwFmtURL& rURLItem = pFmt->GetURL();
             if( rURLItem.GetMap() || !rURLItem.GetURL().isEmpty() )
             {
@@ -2295,7 +2295,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
             const SdrObject* pSObj = pFndFmt->FindSdrObject();
             if (pSObj)
             {
-                ((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
+                static_cast<SwFEShell*>(this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
                 MakeSelVisible();
                 bRet = true;
             }
@@ -2305,7 +2305,7 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
             SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, false );
             if( pFly )
             {
-                ((SwFEShell*)this)->SelectFlyFrm( *pFly, true );
+                static_cast<SwFEShell*>(this)->SelectFlyFrm( *pFly, true );
                 MakeSelVisible();
                 bRet = true;
             }
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 21390e5..ebae430 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -57,16 +57,16 @@ bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
     switch( rItem1.Which() )
     {
     case RES_CHRATR_FONT:
-        return ((SvxFontItem&)rItem1).GetFamilyName() ==
-                ((SvxFontItem&)rItem2).GetFamilyName();
+        return static_cast<const SvxFontItem&>(rItem1).GetFamilyName() ==
+                static_cast<const SvxFontItem&>(rItem2).GetFamilyName();
 
     case RES_CHRATR_COLOR:
-        return ((SvxColorItem&)rItem1).GetValue().IsRGBEqual(
-                                ((SvxColorItem&)rItem2).GetValue() );
+        return static_cast<const SvxColorItem&>(rItem1).GetValue().IsRGBEqual(
+                                static_cast<const SvxColorItem&>(rItem2).GetValue() );
     case RES_PAGEDESC:
         bool bNumOffsetEqual = false;
-        ::boost::optional<sal_uInt16> oNumOffset1 = ((SwFmtPageDesc&)rItem1).GetNumOffset();
-        ::boost::optional<sal_uInt16> oNumOffset2 = ((SwFmtPageDesc&)rItem1).GetNumOffset();
+        ::boost::optional<sal_uInt16> oNumOffset1 = static_cast<const SwFmtPageDesc&>(rItem1).GetNumOffset();
+        ::boost::optional<sal_uInt16> oNumOffset2 = static_cast<const SwFmtPageDesc&>(rItem1).GetNumOffset();
         if (!oNumOffset1 && !oNumOffset2)
         {
             bNumOffsetEqual = true;
@@ -83,7 +83,7 @@ bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
         if (bNumOffsetEqual == false)
             return false;
 
-        return ((SwFmtPageDesc&)rItem1).GetPageDesc() == ((SwFmtPageDesc&)rItem2).GetPageDesc();
+        return static_cast<const SwFmtPageDesc&>(rItem1).GetPageDesc() == static_cast<const SwFmtPageDesc&>(rItem2).GetPageDesc();
     }
     return rItem1 == rItem2;
 }
@@ -915,8 +915,8 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
             if( !pNode->IsTxtNode() ) // CharAttr are only in text nodes
                 continue;
 
-            if( ((SwTxtNode*)pNode)->HasHints() &&
-                lcl_Search( *(SwTxtNode*)pNode, *pPam, rAttr, fnMove,  bValue ))
+            if( static_cast<SwTxtNode*>(pNode)->HasHints() &&
+                lcl_Search( *static_cast<SwTxtNode*>(pNode), *pPam, rAttr, fnMove,  bValue ))
             {
                 // set to the values of the attribute
                 SetMark();
@@ -1005,7 +1005,7 @@ bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFn fnMove,
 
             if( (!aOtherSet.Count() ||
                 lcl_Search( *pNode, aOtherSet, bNoColls )) &&
-                (*fnSearch)( *(SwTxtNode*)pNode, aCmpArr, *pPam ))
+                (*fnSearch)( *static_cast<SwTxtNode*>(pNode), aCmpArr, *pPam ))
             {
                 // set to the values of the attribute
                 SetMark();
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index c6b2a74..42f7d7f 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -253,7 +253,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
             // if there are SwPostItFields inside our current node text, we
             // split the text into separate pieces and search for text inside
             // the pieces as well as inside the fields
-            const SwpHints *pHts = ((SwTxtNode*)pNode)->GetpSwpHints();
+            const SwpHints *pHts = static_cast<SwTxtNode*>(pNode)->GetpSwpHints();
 
             // count PostItFields by looping over all fields
             sal_Int32 aNumberPostits = 0;
@@ -446,7 +446,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
             if ( nSearchScript == nCurrScript )
             {
                 const LanguageType eCurrLang =
-                        ((SwTxtNode*)pNode)->GetLang( bSrchForward ?
+                        static_cast<SwTxtNode*>(pNode)->GetLang( bSrchForward ?
                                                       nStart :
                                                       nEnd );
 
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index ad5bbf5..599d9ba 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -272,14 +272,14 @@ bool CheckNodesRange( const SwNodeIndex& rStt,
 bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
 {
     if( pNd->IsCntntNode() )
-        return ((SwCntntNode*)pNd)->GoNext( pIdx, nMode );
+        return static_cast<SwCntntNode*>(pNd)->GoNext( pIdx, nMode );
     return false;
 }
 
 bool GoPrevious( SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
 {
     if( pNd->IsCntntNode() )
-        return ((SwCntntNode*)pNd)->GoPrevious( pIdx, nMode );
+        return static_cast<SwCntntNode*>(pNd)->GoPrevious( pIdx, nMode );
     return false;
 }
 
@@ -760,7 +760,7 @@ SwCntntNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
                     (
                         0 == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) ||
                         ( !bInReadOnly && pFrm->IsProtected() ) ||
-                        (pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsHiddenNow())
+                        (pFrm->IsTxtFrm() && static_cast<SwTxtFrm*>(pFrm)->IsHiddenNow())
                     ) ||
                     ( !bInReadOnly && pNd->FindSectionNode() &&
                         pNd->FindSectionNode()->GetSection().IsProtect()
@@ -794,7 +794,7 @@ SwCntntNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove,
                         if( 0 == ( pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) ) ||
                             ( !bInReadOnly && pFrm->IsProtected() ) ||
                             ( pFrm->IsTxtFrm() &&
-                                ((SwTxtFrm*)pFrm)->IsHiddenNow() ) )
+                                static_cast<SwTxtFrm*>(pFrm)->IsHiddenNow() ) )
                         {
                             pNd = 0;
                             continue;
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 400c146..e5c9073 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -324,7 +324,7 @@ bool SwCursor::IsSelOvr( int eFlags )
     const SwNode* pNd = &GetPoint()->nNode.GetNode();
     if( pNd->IsCntntNode() && !dynamic_cast<SwUnoCrsr*>(this) )
     {
-        const SwCntntFrm* pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
+        const SwCntntFrm* pFrm = static_cast<const SwCntntNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
         if( pFrm && pFrm->IsValid()
             && 0 == pFrm->Frm().Height()
             && 0 != ( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags ) )
@@ -341,7 +341,7 @@ bool SwCursor::IsSelOvr( int eFlags )
             if( !pFrm )
             {
                 bGoNxt = !bGoNxt;
-                pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
+                pFrm = static_cast<const SwCntntNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
                 while ( pFrm && 0 == pFrm->Frm().Height() )
                 {
                     pFrm = bGoNxt ? pFrm->GetNextCntntFrm()
@@ -405,7 +405,7 @@ bool SwCursor::IsSelOvr( int eFlags )
     }
 
     if( (pNd = &GetMark()->nNode.GetNode())->IsCntntNode()
-        && !((SwCntntNode*)pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() )
+        && !static_cast<const SwCntntNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() )
         && !dynamic_cast<SwUnoCrsr*>(this) )
     {
         DeleteMark();
@@ -522,7 +522,7 @@ bool SwCursor::IsSelOvr( int eFlags )
                         pMyNd = pOuterTableNd;
                     else
                     {
-                        SwCntntNode* pCNd = (SwCntntNode*)pMyNd;
+                        SwCntntNode* pCNd = const_cast<SwCntntNode*>(static_cast<const SwCntntNode*>(pMyNd));
                         GetPoint()->nContent.Assign( pCNd, bSelTop ? pCNd->Len() : 0 );
                         return false;
                     }
@@ -694,7 +694,7 @@ bool SwCursor::IsAtValidPos( bool bPoint ) const
     const SwPosition* pPos = bPoint ? GetPoint() : GetMark();
     const SwNode* pNd = &pPos->nNode.GetNode();
 
-    if( pNd->IsCntntNode() && !((SwCntntNode*)pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) &&
+    if( pNd->IsCntntNode() && !static_cast<const SwCntntNode*>(pNd)->getLayoutFrm( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ) &&
         !dynamic_cast<const SwUnoCrsr*>(this) )
     {
         return false;
@@ -751,13 +751,13 @@ static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
     sal_uInt16 nCrsrCnt = 0;
     if( FND_IN_SEL & eFndRngs )
     {
-        while( pCurCrsr != ( pTmpCrsr = (SwPaM*)pTmpCrsr->GetNext() ))
+        while( pCurCrsr != ( pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext()) ))
             ++nCrsrCnt;
         if( nCrsrCnt && !bIsUnoCrsr )
             pPHdl = new _PercentHdl( 0, nCrsrCnt, pDoc->GetDocShell() );
     }
     else
-        pSaveCrsr = (SwPaM*)pSaveCrsr->GetPrev();
+        pSaveCrsr = static_cast<SwPaM*>(pSaveCrsr->GetPrev());
 
     bool bEnd = false;
     do {
@@ -842,7 +842,7 @@ static sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
         if( bEnd || !( eFndRngs & ( FND_IN_SELALL | FND_IN_SEL )) )
             break;
 
-        pTmpCrsr = ((SwPaM*)pTmpCrsr->GetNext());
+        pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext());
         if( nCrsrCnt && pPHdl )
         {
             pPHdl->NextPos( ++pPHdl->nActPos );
@@ -1585,7 +1585,7 @@ SwCursor::DoSetBidiLevelLeftRight(
             {
                 sal_uInt8 nCrsrLevel = GetCrsrBidiLevel();
                 bool bForward = ! io_rbLeft;
-                ((SwTxtFrm*)pSttFrm)->PrepareVisualMove( nPos, nCrsrLevel,
+                const_cast<SwTxtFrm*>(static_cast<const SwTxtFrm*>(pSttFrm))->PrepareVisualMove( nPos, nCrsrLevel,
                                                          bForward, bInsertCrsr );
                 rIdx = nPos;
                 SetCrsrBidiLevel( nCrsrLevel );
@@ -1710,7 +1710,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
         if ( &rTmpNode != &rNode && rTmpNode.IsTxtNode() )
         {
             Point aPt;
-            const SwCntntFrm* pEndFrm = ((SwTxtNode&)rTmpNode).getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
+            const SwCntntFrm* pEndFrm = static_cast<SwTxtNode&>(rTmpNode).getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, GetPoint() );
             if ( pEndFrm )
             {
                 if ( ! pEndFrm->IsRightToLeft() != ! pSttFrm->IsRightToLeft() )
@@ -1736,7 +1736,7 @@ void SwCursor::DoSetBidiLevelUpDown()
     if ( rNode.IsTxtNode() )
     {
         const SwScriptInfo* pSI =
-            SwScriptInfo::GetScriptInfo( (SwTxtNode&)rNode );
+            SwScriptInfo::GetScriptInfo( static_cast<SwTxtNode&>(rNode) );
         if ( pSI )
         {
             SwIndex& rIdx = GetPoint()->nContent;
@@ -2177,7 +2177,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
                 SwPosition* pPos = pCur->GetMark();
                 if( pNd != &pPos->nNode.GetNode() )
                     pPos->nNode = *pNd;
-                pPos->nContent.Assign( (SwCntntNode*)pNd, 0 );
+                pPos->nContent.Assign( const_cast<SwCntntNode*>(static_cast<const SwCntntNode*>(pNd)), 0 );
 
                 aIdx.Assign( *pSttNd->EndOfSectionNode(), - 1 );
                 if( !( pNd = &aIdx.GetNode())->IsCntntNode() )
@@ -2186,17 +2186,17 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
                 pPos = pCur->GetPoint();
                 if (pNd && pNd != &pPos->nNode.GetNode())
                     pPos->nNode = *pNd;
-                pPos->nContent.Assign((SwCntntNode*)pNd, pNd ? ((SwCntntNode*)pNd)->Len() : 0);
+                pPos->nContent.Assign(const_cast<SwCntntNode*>(static_cast<const SwCntntNode*>(pNd)), pNd ? static_cast<const SwCntntNode*>(pNd)->Len() : 0);
 
                 aTmp.erase( aTmp.begin() + nPos );
             }
             else
                 bDel = true;
 
-            pCur = (SwPaM*)pCur->GetNext();
+            pCur = static_cast<SwPaM*>(pCur->GetNext());
             if( bDel )
             {
-                SwPaM* pDel = (SwPaM*)pCur->GetPrev();
+                SwPaM* pDel = static_cast<SwPaM*>(pCur->GetPrev());
 
                 if( pDel == pAktCrsr )
                     pAktCrsr->DeleteMark();
@@ -2212,7 +2212,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
             SwNodeIndex aIdx( *pSttNd, 1 );
             if( &aIdx.GetNodes() != &rNds )
                 break;
-            const SwNode* pNd = &aIdx.GetNode();
+            SwNode* pNd = &aIdx.GetNode();
             if( !pNd->IsCntntNode() )
                 pNd = rNds.GoNextSection( &aIdx, true, false );
 
@@ -2220,7 +2220,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
                 ? pAktCrsr
                 : pAktCrsr->Create( pAktCrsr );
             pNew->GetPoint()->nNode = *pNd;
-            pNew->GetPoint()->nContent.Assign( (SwCntntNode*)pNd, 0 );
+            pNew->GetPoint()->nContent.Assign( static_cast<SwCntntNode*>(pNd), 0 );
             pNew->SetMark();
 
             SwPosition* pPos = pNew->GetPoint();
@@ -2228,7 +2228,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
             if( !( pNd = &pPos->nNode.GetNode())->IsCntntNode() )
                 pNd = rNds.GoPrevSection( &pPos->nNode, true, false );
 
-            pPos->nContent.Assign((SwCntntNode*)pNd, pNd ? ((SwCntntNode*)pNd)->Len() : 0);
+            pPos->nContent.Assign(static_cast<SwCntntNode*>(pNd), pNd ? static_cast<SwCntntNode*>(pNd)->Len() : 0);
         }
     }
     return pAktCrsr;
commit 526917bbd06e290bb6669e2e52730a5941570b34
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Oct 30 09:37:00 2014 +0200

    loplugin: cstylecast
    
    Change-Id: I9d3f642239bc5c7a52611b9c27fd0291940c7483

diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx
index 83b4175..b4c77a5 100644
--- a/sd/source/ui/view/GraphicObjectBar.cxx
+++ b/sd/source/ui/view/GraphicObjectBar.cxx
@@ -108,7 +108,7 @@ void GraphicObjectBar::GetFilterState( SfxItemSet& rSet )
     {
         SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
 
-        if( pObj && pObj->ISA( SdrGrafObj ) && ( ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) )
+        if( pObj && pObj->ISA( SdrGrafObj ) && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) )
             bEnable = true;
     }
 
@@ -124,9 +124,9 @@ void GraphicObjectBar::ExecuteFilter( SfxRequest& rReq )
     {
         SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
 
-        if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP )
+        if( pObj && pObj->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
         {
-            GraphicObject aFilterObj( ( (SdrGrafObj*) pObj )->GetGraphicObject() );
+            GraphicObject aFilterObj( static_cast<SdrGrafObj*>(pObj)->GetGraphicObject() );
 
             if( SVX_GRAPHICFILTER_ERRCODE_NONE ==
                 SvxGraphicFilter::ExecuteGrfFilterSlot( rReq, aFilterObj ) )
@@ -135,7 +135,7 @@ void GraphicObjectBar::ExecuteFilter( SfxRequest& rReq )
 
                 if( pPageView )
                 {
-                    SdrGrafObj* pFilteredObj = (SdrGrafObj*) pObj->Clone();
+                    SdrGrafObj* pFilteredObj = static_cast<SdrGrafObj*>( pObj->Clone() );
                     OUString    aStr = mpView->GetDescriptionOfMarkedObjects();
                     aStr += " " + SD_RESSTR(STR_UNDO_GRAFFILTER);
                     mpView->BegUndo( aStr );
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index f40af07..044e642 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -166,7 +166,7 @@ Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
       mbWholeDocumentProcessed(false),
       mbPrepareSpellingPending(true)
 {
-    SetStyleSheetPool((SfxStyleSheetPool*) mpDrawDocument->GetStyleSheetPool());
+    SetStyleSheetPool(static_cast<SfxStyleSheetPool*>( mpDrawDocument->GetStyleSheetPool() ));
     SetEditTextObjectPool( &pDoc->GetItemPool() );
     SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl));
     SetForbiddenCharsTable( pDoc->GetForbiddenCharsTable() );
@@ -369,7 +369,7 @@ bool Outliner::SpellNextDocument()
     else
     {
         if (mpView->ISA(OutlineView))
-            ((OutlineView*)mpView)->PrepareClose(false);
+            static_cast<OutlineView*>(mpView)->PrepareClose(false);
         mpDrawDocument->GetDocSh()->SetWaitCursor( true );
 
         Initialize (true);
@@ -502,7 +502,7 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
         if (pChildWin)
         {
             SvxSearchDialog* pSearchDlg =
-            ((SvxSearchDialog*)(pChildWin->GetWindow()));
+                static_cast<SvxSearchDialog*>(pChildWin->GetWindow());
             pSearchDlg->SetDocWin( pViewShell->GetActiveWindow() );
             pSearchDlg->SetSrchFlag();
         }
@@ -1319,7 +1319,7 @@ void Outliner::EnterEditMode (bool bGrabFocus)
 IMPL_LINK_INLINE_START( Outliner, SpellError, void *, nLang )
 {
     mbError = true;
-    OUString aError( SvtLanguageTable::GetLanguageString( (LanguageType)(sal_uLong)nLang ) );
+    OUString aError( SvtLanguageTable::GetLanguageString( (LanguageType)reinterpret_cast<sal_uLong>(nLang) ) );
     ErrorHandler::HandleError(* new StringErrorInfo(
                                 ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aError) );
     return 0;
diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx
index 2f6554c..a699cfd 100644
--- a/sd/source/ui/view/ViewClipboard.cxx
+++ b/sd/source/ui/view/ViewClipboard.cxx
@@ -201,7 +201,7 @@ sal_uInt16 ViewClipboard::InsertSlides (
         // Otherwise all pages of the document of the transferable are
         // inserted.
         SfxObjectShell* pShell = rTransferable.GetDocShell();
-        pDataDocSh = (DrawDocShell*) pShell;
+        pDataDocSh = static_cast<DrawDocShell*>(pShell);
         SdDrawDocument* pDataDoc = pDataDocSh->GetDoc();
 
         if (pDataDoc!=NULL && pDataDoc->GetSdPageCount(PK_STANDARD))
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 6e01b52..b7e5f32 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -217,7 +217,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
 
             if (pArgs && pArgs->Count() == 1)
             {
-                bSetModified = ((SfxBoolItem&) pArgs->Get(SID_MODIFYPAGE)).GetValue();
+                bSetModified = static_cast<const SfxBoolItem&>(pArgs->Get(SID_MODIFYPAGE)).GetValue();
             }
 
             pUndoManager->AddUndoAction( new UndoAutoLayoutPosAndSize( *pUndoPage ) );
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 65bdd9e..a2a81534 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -152,7 +152,7 @@ private:
     ViewShellBase& mrBase;
     mutable ::osl::Mutex maMutex;
 
-    class ShellHash{public: size_t operator()(const SfxShell* p) const { return (size_t)p;} };
+    class ShellHash { public: size_t operator()(const SfxShell* p) const { return reinterpret_cast<size_t>(p);} };
     typedef ::boost::unordered_multimap<const SfxShell*,SharedShellFactory,ShellHash>
         FactoryList;
     FactoryList maShellFactories;
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index eb94dc6..a73048c 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -196,7 +196,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
                         sal_Int16 nDepth = pOutliner->GetDepth( nParaPos );
                         OUString aName = rPage.GetLayoutName() + " " +
                             OUString::number((nDepth <= 0) ? 1 : nDepth + 1);
-                        SfxStyleSheet* pSheet = (SfxStyleSheet*)pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
+                        SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE));
                         //We have no stylesheet if we access outline level 10
                         //in the master preview, there is no true style backing
                         //that entry
@@ -304,8 +304,8 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
                         {
                             OUString aName = rPage.GetLayoutName() + " " +
                                 OUString::number(nLevel);
-                            SfxStyleSheet* pSheet = (SfxStyleSheet*)pStShPool->
-                                                Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
+                            SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->
+                                                Find(aName, SD_STYLE_FAMILY_MASTERPAGE));
                             DBG_ASSERT(pSheet, "StyleSheet not found");
 
                             SfxItemSet aTempSet( pSheet->GetItemSet() );
@@ -375,7 +375,7 @@ void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
 {
     if ( mpDrawViewShell && dynamic_cast<const SdrHint*>(&rHint) )
     {
-        SdrHintKind eHintKind = ( (SdrHint&) rHint).GetKind();
+        SdrHintKind eHintKind = static_cast<const SdrHint&>(rHint).GetKind();
 
         if ( mnPOCHSmph == 0 && eHintKind == HINT_PAGEORDERCHG )
         {
@@ -389,7 +389,7 @@ void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
         // switch to that page when it's not a master page
         if(HINT_SWITCHTOPAGE == eHintKind)
         {
-            const SdrPage* pPage = ((const SdrHint&)rHint).GetPage();
+            const SdrPage* pPage = static_cast<const SdrHint&>(rHint).GetPage();
 
             if(pPage && !pPage->IsMasterPage())
             {
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index fb0d194..22a073e 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -262,7 +262,7 @@ void BezierObjectBar::Execute(SfxRequest& rReq)
 
                     case SID_BEZIER_CLOSE:
                     {
-                        SdrPathObj* pPathObj = (SdrPathObj*) rMarkList.GetMark(0)->GetMarkedSdrObj();
+                        SdrPathObj* pPathObj = static_cast<SdrPathObj*>( rMarkList.GetMark(0)->GetMarkedSdrObj() );
                         const bool bUndo = mpView->IsUndoEnabled();
                         if( bUndo )
                             mpView->BegUndo(SD_RESSTR(STR_UNDO_BEZCLOSE));
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 37c82a1..1327ea7 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -135,7 +135,7 @@ void TextObjectBar::GetCharState( SfxItemSet& rSet )
     aNewAttr.Put(aCharAttrSet, false);
     rSet.Put(aNewAttr, false);
 
-    SvxKerningItem aKern = ( (const SvxKerningItem&) aCharAttrSet.Get( EE_CHAR_KERNING ) );
+    SvxKerningItem aKern = static_cast<const SvxKerningItem&>( aCharAttrSet.Get( EE_CHAR_KERNING ) );
     //aKern.SetWhich(SID_ATTR_CHAR_KERNING);
     rSet.Put(aKern);
 
@@ -375,7 +375,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
                             bLeftToRight = false;
                     }
                     else
-                        bLeftToRight = ( (const SvxWritingModeItem&) aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == com::sun::star::text::WritingMode_LR_TB;
+                        bLeftToRight = static_cast<const SvxWritingModeItem&>( aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == com::sun::star::text::WritingMode_LR_TB;
 
                     rSet.Put( SfxBoolItem( SID_TEXTDIRECTION_LEFT_TO_RIGHT, bLeftToRight ) );
                     rSet.Put( SfxBoolItem( SID_TEXTDIRECTION_TOP_TO_BOTTOM, !bLeftToRight ) );
@@ -463,7 +463,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
             for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
             {
                 const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( nPara );
-                const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) rItems.Get( EE_PARA_ULSPACE );
+                const SvxULSpaceItem& rItem = static_cast<const SvxULSpaceItem&>( rItems.Get( EE_PARA_ULSPACE ) );
                 nUpper = std::max( nUpper, (long)rItem.GetUpper() );
             }
             if( nUpper == 0L )
@@ -477,9 +477,9 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
         }
 
         // paragraph justification
-        SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) );
+        SvxLRSpaceItem aLR = static_cast<const SvxLRSpaceItem&>( aAttrSet.Get( EE_PARA_LRSPACE ) );
         rSet.Put(aLR);
-        SvxAdjust eAdj = ( (const SvxAdjustItem&) aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
+        SvxAdjust eAdj = static_cast<const SvxAdjustItem&>( aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
         switch( eAdj )
         {
             case SVX_ADJUST_LEFT:
@@ -513,7 +513,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
         }
         else
         {
-            switch( ( ( (SvxFrameDirectionItem&) aAttrSet.Get( EE_PARA_WRITINGDIR ) ) ).GetValue() )
+            switch( static_cast<const SvxFrameDirectionItem&>( aAttrSet.Get( EE_PARA_WRITINGDIR ) ).GetValue() )
             {
                 case FRMDIR_VERT_TOP_LEFT:
                 case FRMDIR_VERT_TOP_RIGHT:
@@ -553,7 +553,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
             }
         }
 
-        SvxLRSpaceItem aLRSpace = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) );
+        SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>( aAttrSet.Get( EE_PARA_LRSPACE ) );
         aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE);
         rSet.Put(aLRSpace);
         Invalidate(SID_ATTR_PARA_LRSPACE);
@@ -564,7 +564,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
             rSet.InvalidateItem(EE_PARA_LRSPACE);
             rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
         }
-        sal_uInt16 nLineSpace = (sal_uInt16) ( (const SvxLineSpacingItem&) aAttrSet.
+        sal_uInt16 nLineSpace = (sal_uInt16) static_cast<const SvxLineSpacingItem&>( aAttrSet.
                             Get( EE_PARA_SBL ) ).GetPropLineSpace();
         switch( nLineSpace )
         {
@@ -581,7 +581,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
     }
 
     // justification (superscript, subscript) is also needed in outline-mode
-    SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
+    SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>(
                     aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
 
     if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 1a01e03..2cf2594 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -153,8 +153,8 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                         SfxItemSet aAttr( pStyleSheet->GetItemSet() );
                         SfxItemSet aTmpSet( pOLV->GetOutliner()->GetParaAttribs( nPara ) );
                         aAttr.Put( aTmpSet, false ); // sal_False= InvalidItems is not default, handle it as "holes"
-                        const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) aAttr.Get( EE_PARA_ULSPACE );
-                        boost::scoped_ptr<SvxULSpaceItem> pNewItem((SvxULSpaceItem*) rItem.Clone());
+                        const SvxULSpaceItem& rItem = static_cast<const SvxULSpaceItem&>( aAttr.Get( EE_PARA_ULSPACE ) );
+                        boost::scoped_ptr<SvxULSpaceItem> pNewItem(static_cast<SvxULSpaceItem*>(rItem.Clone()));
 
                         long nUpper = pNewItem->GetUpper();
                         if( nSlot == SID_PARASPACE_INCREASE )
@@ -194,8 +194,8 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                 if( aEditAttr.GetItemState( EE_PARA_ULSPACE ) >= SfxItemState::DEFAULT )
                 {
                     SfxItemSet aNewAttrs(*(aEditAttr.GetPool()), aEditAttr.GetRanges());
-                    const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE );
-                    boost::scoped_ptr<SvxULSpaceItem> pNewItem((SvxULSpaceItem*) rItem.Clone());
+                    const SvxULSpaceItem& rItem = static_cast<const SvxULSpaceItem&>( aEditAttr.Get( EE_PARA_ULSPACE ) );
+                    boost::scoped_ptr<SvxULSpaceItem> pNewItem(static_cast<SvxULSpaceItem*>( rItem.Clone() ));
                     long nUpper = pNewItem->GetUpper();
 
                     if( nSlot == SID_PARASPACE_INCREASE )
@@ -264,8 +264,8 @@ void TextObjectBar::Execute( SfxRequest &rReq )
         case SID_ATTR_PARA_LRSPACE:
         {
             sal_uInt16 nSpaceSlot = SID_ATTR_PARA_LRSPACE;
-            SvxLRSpaceItem aLRSpace = (const SvxLRSpaceItem&)pArgs->Get(
-                GetPool().GetWhich(nSpaceSlot));
+            SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
+                GetPool().GetWhich(nSpaceSlot)));
 
             SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
             aLRSpace.SetWhich( EE_PARA_LRSPACE );
@@ -327,7 +327,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                 SdrPageView* pPageView = mpView->GetSdrPageView();
                 if (pPageView)
                 {
-                    SdPage* pPage = (SdPage*)pPageView->GetPage();
+                    SdPage* pPage = static_cast<SdPage*>(pPageView->GetPage());
                     bMasterPage = pPage && (pPage->GetPageKind() == PK_STANDARD) && pPage->IsMasterPage();
                 }
 
@@ -391,7 +391,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
         case SID_GROW_FONT_SIZE:
         case SID_SHRINK_FONT_SIZE:
         {
-            const SvxFontListItem* pFonts = (const SvxFontListItem*)mpViewShell->GetDocSh()->GetItem( SID_ATTR_CHAR_FONTLIST );
+            const SvxFontListItem* pFonts = static_cast<const SvxFontListItem*>(mpViewShell->GetDocSh()->GetItem( SID_ATTR_CHAR_FONTLIST ));
             const FontList* pFontList = pFonts ? pFonts->GetFontList(): 0;
             if( pFontList )
             {
@@ -440,7 +440,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                 {
                     case SID_ATTR_CHAR_WEIGHT:
                     {
-                        FontWeight eFW = ( (const SvxWeightItem&) aEditAttr.
+                        FontWeight eFW = static_cast<const SvxWeightItem&>( aEditAttr.
                                         Get( EE_CHAR_WEIGHT ) ).GetWeight();
                         aNewAttr.Put( SvxWeightItem( eFW == WEIGHT_NORMAL ?
                                             WEIGHT_BOLD : WEIGHT_NORMAL,
@@ -449,7 +449,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                     break;
                     case SID_ATTR_CHAR_POSTURE:
                     {
-                        FontItalic eFI = ( (const SvxPostureItem&) aEditAttr.
+                        FontItalic eFI = static_cast<const SvxPostureItem&>( aEditAttr.
                                         Get( EE_CHAR_ITALIC ) ).GetPosture();
                         aNewAttr.Put( SvxPostureItem( eFI == ITALIC_NORMAL ?
                                             ITALIC_NONE : ITALIC_NORMAL,
@@ -458,7 +458,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                     break;
                     case SID_ATTR_CHAR_UNDERLINE:
                     {
-                        FontUnderline eFU = ( (const SvxUnderlineItem&) aEditAttr.
+                        FontUnderline eFU = static_cast<const SvxUnderlineItem&>( aEditAttr.
                                         Get( EE_CHAR_UNDERLINE ) ).GetLineStyle();
                         aNewAttr.Put( SvxUnderlineItem( eFU == UNDERLINE_SINGLE ?
                                             UNDERLINE_NONE : UNDERLINE_SINGLE,
@@ -467,7 +467,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                     break;
                     case SID_ATTR_CHAR_OVERLINE:
                     {
-                        FontUnderline eFO = ( (const SvxOverlineItem&) aEditAttr.
+                        FontUnderline eFO = static_cast<const SvxOverlineItem&>( aEditAttr.
                                         Get( EE_CHAR_OVERLINE ) ).GetLineStyle();
                         aNewAttr.Put( SvxOverlineItem( eFO == UNDERLINE_SINGLE ?
                                             UNDERLINE_NONE : UNDERLINE_SINGLE,
@@ -476,25 +476,25 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                     break;
                     case SID_ATTR_CHAR_CONTOUR:
                     {
-                        aNewAttr.Put( SvxContourItem( !( (const SvxContourItem&) aEditAttr.
+                        aNewAttr.Put( SvxContourItem( !static_cast<const SvxContourItem&>( aEditAttr.
                                         Get( EE_CHAR_OUTLINE ) ).GetValue(), EE_CHAR_OUTLINE ) );
                     }
                     break;
                     case SID_ATTR_CHAR_SHADOWED:
                     {
-                        aNewAttr.Put( SvxShadowedItem( !( (const SvxShadowedItem&) aEditAttr.
+                        aNewAttr.Put( SvxShadowedItem( !static_cast<const SvxShadowedItem&>( aEditAttr.
                                         Get( EE_CHAR_SHADOW ) ).GetValue(), EE_CHAR_SHADOW ) );
                     }
                     break;
                     case SID_ATTR_CHAR_CASEMAP:
                     {
-                        aNewAttr.Put( SvxCaseMapItem( ( (const SvxCaseMapItem&) aEditAttr.
+                        aNewAttr.Put( SvxCaseMapItem( static_cast<const SvxCaseMapItem&>( aEditAttr.
                                         Get( EE_CHAR_CASEMAP ) ) ) );
                     }
                     break;
                     case SID_ATTR_CHAR_STRIKEOUT:
                     {
-                        FontStrikeout eFSO = ( ( (const SvxCrossedOutItem&) aEditAttr.
+                        FontStrikeout eFSO = ( static_cast<const SvxCrossedOutItem&>( aEditAttr.
                                         Get( EE_CHAR_STRIKEOUT ) ).GetStrikeout() );
                         aNewAttr.Put( SvxCrossedOutItem( eFSO == STRIKEOUT_SINGLE ?
                                             STRIKEOUT_NONE : STRIKEOUT_SINGLE, EE_CHAR_STRIKEOUT ) );
@@ -545,7 +545,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                     case SID_SET_SUPER_SCRIPT:
                     {
                         SvxEscapementItem aItem( EE_CHAR_ESCAPEMENT );
-                        SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
+                        SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>(
                                         aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
 
                         if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
@@ -558,7 +558,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                     case SID_SET_SUB_SCRIPT:
                     {
                         SvxEscapementItem aItem( EE_CHAR_ESCAPEMENT );
-                        SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
+                        SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>(
                                         aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
 
                         if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
@@ -593,7 +593,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
 
                 sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
                 if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) )
-                    nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
+                    nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetEnumValue();
 
                 if( bLeftToRight )
                 {
@@ -670,7 +670,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
             else if(nSlot ==  SID_SET_SUPER_SCRIPT )
             {
                 SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT);
-                SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+                SvxEscapement eEsc = (SvxEscapement) static_cast<const SvxEscapementItem&>(
                                 aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
 
                 if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
@@ -684,7 +684,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
             else if( nSlot ==  SID_SET_SUB_SCRIPT )
             {
                 SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT);
-                SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+                SvxEscapement eEsc = (SvxEscapement) static_cast<const SvxEscapementItem&>(
                                 aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
 
                 if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index a2c2622..1414976 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -181,7 +181,7 @@ void DrawViewShell::SelectionHasChanged (void)
 
             if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2)
             {
-                pOleObj = (SdrOle2Obj*) pObj;
+                pOleObj = static_cast<SdrOle2Obj*>(pObj);
                 UpdateIMapDlg( pObj );
             }
             else if (nSdrObjKind == OBJ_GRAF)
@@ -717,7 +717,7 @@ ErrCode DrawViewShell::DoVerb(long nVerb)
 
             if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2)
             {
-                ActivateObject( (SdrOle2Obj*) pObj, nVerb);
+                ActivateObject( static_cast<SdrOle2Obj*>(pObj), nVerb);
             }
         }
     }
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 7cd3c73..c85eb2c 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -202,7 +202,7 @@ public:
         SdrPageView* pPageView = m_pView->GetSdrPageView();
         if( pPageView )
         {
-            SdrGrafObj* pNewObj = (SdrGrafObj*) m_pObj->Clone();
+            SdrGrafObj* pNewObj = static_cast<SdrGrafObj*>( m_pObj->Clone() );
             OUString    aStr = m_pView->GetDescriptionOfMarkedObjects();
             aStr += " External Edit";
             m_pView->BegUndo( aStr );
@@ -249,7 +249,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                 mpDrawView->BegUndo();
 
                 pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-                bool bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
+                bool bSet = static_cast<const SdrTextFitToSizeTypeItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
 
                 mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
 
@@ -607,12 +607,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
             if ( pArgs )
             {
-                SvxZoomType eZT = ( ( const SvxZoomItem& ) pArgs->
+                SvxZoomType eZT = static_cast<const SvxZoomItem&>( pArgs->
                                             Get( SID_ATTR_ZOOM ) ).GetType();
                 switch( eZT )
                 {
                     case SVX_ZOOM_PERCENT:
-                        SetZoom( (long) ( ( const SvxZoomItem& ) pArgs->
+                        SetZoom( (long) static_cast<const SvxZoomItem&>( pArgs->
                                             Get( SID_ATTR_ZOOM ) ).GetValue() );
                         break;
 
@@ -850,7 +850,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                 // at the following mpDrawView->SetAttributes( *pSet, sal_True )
                 // they get lost and have to be restored.
                 std::vector<std::pair<SfxItemSet*,SdrObjUserCall*> > aAttrList;
-                SdPage* pPresPage = (SdPage*) mpDrawView->GetSdrPageView()->GetPage();
+                SdPage* pPresPage = static_cast<SdPage*>( mpDrawView->GetSdrPageView()->GetPage() );
 
                 for ( size_t i = 0; i < nCount; ++i )
                 {
@@ -979,9 +979,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             if( rMarkList.GetMarkCount() == 1 )
             {
                 SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
-                if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP )
+                if( pObj && pObj->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
                 {
-                    GraphicObject aGraphicObject( ( (SdrGrafObj*) pObj )->GetGraphicObject() );
+                    GraphicObject aGraphicObject( static_cast<SdrGrafObj*>( pObj )->GetGraphicObject() );
                     {
                         GraphicHelper::ExportGraphic( aGraphicObject.GetGraphic(), "" );
                     }
@@ -998,9 +998,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             if( rMarkList.GetMarkCount() == 1 )
             {
                 SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
-                if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP )
+                if( pObj && pObj->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
                 {
-                    GraphicObject aGraphicObject( ( (SdrGrafObj*) pObj )->GetGraphicObject() );
+                    GraphicObject aGraphicObject( static_cast<SdrGrafObj*>(pObj)->GetGraphicObject() );
                     SdExternalToolEdit* aExternalToolEdit = new SdExternalToolEdit( mpDrawView, pObj );
                     aExternalToolEdit->Edit( &aGraphicObject );
                 }
@@ -1017,9 +1017,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             {
                 SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
 
-                if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP )
+                if( pObj && pObj->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP )
                 {
-                    SdrGrafObj* pGraphicObj = (SdrGrafObj*) pObj;
+                    SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
                     CompressGraphicsDialog dialog( GetParentWindow(), pGraphicObj, GetViewFrame()->GetBindings() );
                     if ( dialog.Execute() == RET_OK )
                     {
@@ -1450,7 +1450,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                     while( bLoop && pDlg->Execute() == RET_OK )
                     {
                         pDlg->GetAttr( aNewAttr );
-                        aLayerName   = ((SdAttrLayerName &) aNewAttr.Get (ATTR_LAYER_NAME)).GetValue ();
+                        aLayerName   = static_cast<const SdAttrLayerName &>( aNewAttr.Get (ATTR_LAYER_NAME)).GetValue ();
 
                         if( rLayerAdmin.GetLayer( aLayerName, false )
                             || aLayerName.isEmpty() )
@@ -1474,11 +1474,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                     }
                     else
                     {
-                        aLayerTitle  = ((SdAttrLayerTitle &) aNewAttr.Get (ATTR_LAYER_TITLE)).GetValue ();
-                        aLayerDesc   = ((SdAttrLayerDesc &) aNewAttr.Get (ATTR_LAYER_DESC)).GetValue ();
-                        bIsVisible   = ((SdAttrLayerVisible &) aNewAttr.Get (ATTR_LAYER_VISIBLE)).GetValue ();
-                        bIsLocked    = ((SdAttrLayerLocked &) aNewAttr.Get (ATTR_LAYER_LOCKED)).GetValue () ;
-                        bIsPrintable = ((SdAttrLayerPrintable &) aNewAttr.Get (ATTR_LAYER_PRINTABLE)).GetValue () ;
+                        aLayerTitle  = static_cast<const SdAttrLayerTitle &>( aNewAttr.Get (ATTR_LAYER_TITLE)).GetValue ();
+                        aLayerDesc   = static_cast<const SdAttrLayerDesc &>( aNewAttr.Get (ATTR_LAYER_DESC)).GetValue ();
+                        bIsVisible   = static_cast<const SdAttrLayerVisible &>( aNewAttr.Get (ATTR_LAYER_VISIBLE)).GetValue ();
+                        bIsLocked    = static_cast<const SdAttrLayerLocked &>( aNewAttr.Get (ATTR_LAYER_LOCKED)).GetValue () ;
+                        bIsPrintable = static_cast<const SdAttrLayerPrintable &>( aNewAttr.Get (ATTR_LAYER_PRINTABLE)).GetValue () ;
                     }
                 }
             }
@@ -1619,7 +1619,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                     while( bLoop && ( (nRet = pDlg->Execute()) == RET_OK ) )
                     {
                         pDlg->GetAttr( aNewAttr );
-                        aLayerName   = ((SdAttrLayerName &) aNewAttr.Get (ATTR_LAYER_NAME)).GetValue ();
+                        aLayerName   = static_cast<const SdAttrLayerName &>( aNewAttr.Get (ATTR_LAYER_NAME)).GetValue ();
 
                         if( (rLayerAdmin.GetLayer( aLayerName, false ) &&
                              aLayerName != aOldLayerName) || aLayerName.isEmpty() )
@@ -1637,11 +1637,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                     switch (nRet)
                     {
                         case RET_OK :
-                            aLayerTitle  = ((SdAttrLayerTitle &) aNewAttr.Get (ATTR_LAYER_TITLE)).GetValue ();
-                            aLayerDesc   = ((SdAttrLayerDesc &) aNewAttr.Get (ATTR_LAYER_DESC)).GetValue ();
-                            bIsVisible   = ((const SdAttrLayerVisible &) aNewAttr.Get (ATTR_LAYER_VISIBLE)).GetValue ();
-                            bIsLocked    = ((const SdAttrLayerLocked &) aNewAttr.Get (ATTR_LAYER_LOCKED)).GetValue ();
-                            bIsPrintable = ((const SdAttrLayerLocked &) aNewAttr.Get (ATTR_LAYER_PRINTABLE)).GetValue ();
+                            aLayerTitle  = static_cast<const SdAttrLayerTitle &>( aNewAttr.Get (ATTR_LAYER_TITLE)).GetValue ();
+                            aLayerDesc   = static_cast<const SdAttrLayerDesc &>( aNewAttr.Get (ATTR_LAYER_DESC)).GetValue ();
+                            bIsVisible   = static_cast<const SdAttrLayerVisible &>( aNewAttr.Get (ATTR_LAYER_VISIBLE)).GetValue ();
+                            bIsLocked    = static_cast<const SdAttrLayerLocked &>( aNewAttr.Get (ATTR_LAYER_LOCKED)).GetValue ();
+                            bIsPrintable = static_cast<const SdAttrLayerLocked &>( aNewAttr.Get (ATTR_LAYER_PRINTABLE)).GetValue ();
                             break;
 
                         default :
@@ -1782,8 +1782,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
             if (pReqArgs)
             {
-                SvxHyperlinkItem* pHLItem =
-                (SvxHyperlinkItem*) &pReqArgs->Get(SID_HYPERLINK_SETLINK);
+                const SvxHyperlinkItem* pHLItem =
+                    static_cast<const SvxHyperlinkItem*>( &pReqArgs->Get(SID_HYPERLINK_SETLINK) );
 
                 if (pHLItem->GetInsertMode() == HLINK_FIELD)
                 {
@@ -2568,7 +2568,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             {
                 SfxStyleSheet* pStyleSheet = mpDrawView->GetStyleSheet();
                 if( pStyleSheet && pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE)
-                    pStyleSheet = ((SdStyleSheet*)pStyleSheet)->GetPseudoStyleSheet();
+                    pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet();
 
                 if( (pStyleSheet == NULL) && GetView()->IsTextEdit() )
                 {
@@ -2576,7 +2576,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
                     pStyleSheet = mpDrawView->GetStyleSheet();
                     if(pStyleSheet && pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE)
-                        pStyleSheet = ((SdStyleSheet*)pStyleSheet)->GetPseudoStyleSheet();
+                        pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet();
                 }
 
                 if( pStyleSheet == NULL )
@@ -2651,8 +2651,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             if ( rReq.GetArgs() )
             {
                 GetViewFrame()->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
-                                        ((const SfxBoolItem&) (rReq.GetArgs()->
-                                        Get(SID_FONTWORK))).GetValue());
+                                        static_cast<const SfxBoolItem&>(rReq.GetArgs()->
+                                        Get(SID_FONTWORK)).GetValue());
             }
             else
             {
@@ -2669,8 +2669,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
         {
             if ( rReq.GetArgs() )
                 GetViewFrame()->SetChildWindow(SvxColorChildWindow::GetChildWindowId(),
-                                        ((const SfxBoolItem&) (rReq.GetArgs()->
-                                        Get(SID_COLOR_CONTROL))).GetValue());
+                                        static_cast<const SfxBoolItem&>(rReq.GetArgs()->
+                                        Get(SID_COLOR_CONTROL)).GetValue());
             else
                 GetViewFrame()->ToggleChildWindow(SvxColorChildWindow::GetChildWindowId() );
 
@@ -2731,8 +2731,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
         {
             if ( rReq.GetArgs() )
                 GetViewFrame()->SetChildWindow(SID_NAVIGATOR,
-                                        ((const SfxBoolItem&) (rReq.GetArgs()->
-                                        Get(SID_NAVIGATOR))).GetValue());
+                                        static_cast<const SfxBoolItem&>(rReq.GetArgs()->
+                                        Get(SID_NAVIGATOR)).GetValue());
             else
                 GetViewFrame()->ToggleChildWindow( SID_NAVIGATOR );
 
@@ -2771,8 +2771,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             if ( rReq.GetArgs() )
                 GetViewFrame()->SetChildWindow(
                     AnimationChildWindow::GetChildWindowId(),
-                    ((const SfxBoolItem&) (rReq.GetArgs()->
-                        Get(SID_ANIMATION_OBJECTS))).GetValue());
+                    static_cast<const SfxBoolItem&>(rReq.GetArgs()->
+                        Get(SID_ANIMATION_OBJECTS)).GetValue());
             else
                 GetViewFrame()->ToggleChildWindow(
                     AnimationChildWindow::GetChildWindowId() );
@@ -2787,8 +2787,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
         {
             if ( rReq.GetArgs() )
                 GetViewFrame()->SetChildWindow( Svx3DChildWindow::GetChildWindowId(),
-                                        ((const SfxBoolItem&) (rReq.GetArgs()->
-                                        Get( SID_3D_WIN ))).GetValue());
+                                        static_cast<const SfxBoolItem&>(rReq.GetArgs()->
+                                        Get( SID_3D_WIN )).GetValue());
             else
                 GetViewFrame()->ToggleChildWindow( Svx3DChildWindow::GetChildWindowId() );
 
@@ -3021,7 +3021,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
             }
             else
             {
-                FontUnderline eFU = ( (const SvxUnderlineItem&) aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle();
+                FontUnderline eFU = static_cast<const SvxUnderlineItem&>( aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle();
                 aNewAttr.Put( SvxUnderlineItem( eFU != UNDERLINE_NONE ?UNDERLINE_NONE : UNDERLINE_SINGLE,  EE_CHAR_UNDERLINE ) );
             }//aNewAttr.Put( (const SvxUnderlineItem&)aEditAttr.Get( EE_CHAR_UNDERLINE ) );
         }
@@ -3069,7 +3069,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
     case SID_SET_SUB_SCRIPT:
         {
             SvxEscapementItem aItem( EE_CHAR_ESCAPEMENT );
-            SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
+            SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>(
                             aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
             if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
                 aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
@@ -3081,7 +3081,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
     case SID_SET_SUPER_SCRIPT:
         {
             SvxEscapementItem aItem( EE_CHAR_ESCAPEMENT );
-            SvxEscapement eEsc = (SvxEscapement ) ( (const SvxEscapementItem&)
+            SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>(
                             aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
             if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
                 aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
@@ -3189,7 +3189,7 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet)
                 SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
                 if( eConState != SfxItemState::DONTCARE )
                 {
-                    bContour = ( ( const SdrOnOffItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+                    bContour = static_cast<const SdrOnOffItem&>( aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
                 }
                 if (bContour) break;
 
@@ -3199,7 +3199,7 @@ void DrawViewShell::GetStatePropPanelAttr(SfxItemSet& rSet)
                 //if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState)
                 if(SfxItemState::DONTCARE != eVState)
                 {
-                    SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+                    SdrTextVertAdjust eTVA = (SdrTextVertAdjust)static_cast<const SdrTextVertAdjustItem&>(aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
                     bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) ||
                             (nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER) ||
                             (nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM);
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 0c257db..acc191b 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -336,7 +336,7 @@ void  DrawViewShell::ExecCtrl(SfxRequest& rReq)
             if ( pIPClient && pIPClient->IsObjectInPlaceActive() )
             {
                 const SfxRectangleItem& rRect =
-                    (SfxRectangleItem&)rReq.GetArgs()->Get(SID_OBJECTRESIZE);
+                    static_cast<const SfxRectangleItem&>(rReq.GetArgs()->Get(SID_OBJECTRESIZE));
                 Rectangle aRect( GetActiveWindow()->PixelToLogic( rRect.GetValue() ) );
 
                 if ( mpDrawView->AreObjectsMarked() )
@@ -383,7 +383,7 @@ void  DrawViewShell::ExecCtrl(SfxRequest& rReq)
                 SfxChildWindow* pWindow = pFrame->GetChildWindow(nId);
                 if(pWindow)
                 {
-                    Svx3DWin* p3DWin = (Svx3DWin*)(pWindow->GetWindow());
+                    Svx3DWin* p3DWin = static_cast<Svx3DWin*>(pWindow->GetWindow());
                     if(p3DWin)
                         p3DWin->DocumentReload();
                 }
@@ -506,8 +506,8 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
     {
         case SID_ATTR_LONG_LRSPACE:
         {
-            const SvxLongLRSpaceItem& rLRSpace = (const SvxLongLRSpaceItem&)
-                    pArgs->Get(GetPool().GetWhich(SID_ATTR_LONG_LRSPACE));
+            const SvxLongLRSpaceItem& rLRSpace = static_cast<const SvxLongLRSpaceItem&>(
+                    pArgs->Get(GetPool().GetWhich(SID_ATTR_LONG_LRSPACE)));
 
             if( mpDrawView->IsTextEdit() )
             {
@@ -563,8 +563,8 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         }
         case SID_ATTR_LONG_ULSPACE:
         {
-            const SvxLongULSpaceItem& rULSpace = (const SvxLongULSpaceItem&)
-                    pArgs->Get(GetPool().GetWhich(SID_ATTR_LONG_ULSPACE));
+            const SvxLongULSpaceItem& rULSpace = static_cast<const SvxLongULSpaceItem&>(
+                    pArgs->Get(GetPool().GetWhich(SID_ATTR_LONG_ULSPACE)));
 
             if( mpDrawView->IsTextEdit() )
             {
@@ -625,8 +625,8 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
             Rectangle aRect = maMarkRect;
             aRect.SetPos(aRect.TopLeft() + aPagePos);
 
-            const SvxObjectItem& rOI = (const SvxObjectItem&)
-                    pArgs->Get(GetPool().GetWhich(SID_RULER_OBJECT));
+            const SvxObjectItem& rOI = static_cast<const SvxObjectItem&>(
+                    pArgs->Get(GetPool().GetWhich(SID_RULER_OBJECT)));
 
             if ( rOI.GetStartX() != rOI.GetEndX() )
             {
@@ -652,8 +652,8 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         {
             if( mpDrawView->IsTextEdit() )
             {
-                const SvxTabStopItem& rItem = (const SvxTabStopItem&)
-                            pArgs->Get( EE_PARA_TABS );
+                const SvxTabStopItem& rItem = static_cast<const SvxTabStopItem&>(
+                            pArgs->Get( EE_PARA_TABS ));
 
                 SfxItemSet aEditAttr( GetPool(), EE_PARA_TABS, EE_PARA_TABS );
 
@@ -668,8 +668,8 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         case SID_ATTR_PARA_LINESPACE:
         {
             sal_uInt16 nSlot = SID_ATTR_PARA_LINESPACE;
-            SvxLineSpacingItem aParaLineSP = (const SvxLineSpacingItem&)pArgs->Get(
-                GetPool().GetWhich(nSlot));
+            SvxLineSpacingItem aParaLineSP = static_cast<const SvxLineSpacingItem&>(pArgs->Get(
+                GetPool().GetWhich(nSlot)));
 
             SfxItemSet aEditAttr( GetPool(), EE_PARA_SBL, EE_PARA_SBL );
             aParaLineSP.SetWhich( EE_PARA_SBL );
@@ -727,8 +727,8 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         case SID_ATTR_PARA_ULSPACE:
         {
             sal_uInt16 nSlot = SID_ATTR_PARA_ULSPACE;
-            SvxULSpaceItem aULSP = (const SvxULSpaceItem&)pArgs->Get(
-                GetPool().GetWhich(nSlot));
+            SvxULSpaceItem aULSP = static_cast<const SvxULSpaceItem&>(pArgs->Get(
+                GetPool().GetWhich(nSlot)));
             SfxItemSet aEditAttr( GetPool(), EE_PARA_ULSPACE, EE_PARA_ULSPACE );
             aULSP.SetWhich( EE_PARA_ULSPACE );
 
@@ -742,8 +742,8 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
         case SID_ATTR_PARA_LRSPACE:
         {
             sal_uInt16 nSlot = SID_ATTR_PARA_LRSPACE;
-            SvxLRSpaceItem aLRSpace = (const SvxLRSpaceItem&)pArgs->Get(
-                GetPool().GetWhich(nSlot));
+            SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
+                GetPool().GetWhich(nSlot)));
 
             SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
             aLRSpace.SetWhich( EE_PARA_LRSPACE );
@@ -759,8 +759,8 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
             if( mpDrawView->IsTextEdit() )
             {
                 sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
-                const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
-                            pArgs->Get( nId );
+                const SvxLRSpaceItem& rItem = static_cast<const SvxLRSpaceItem&>(
+                            pArgs->Get( nId ));
 
                 static const sal_uInt16 aWhichTable[]=
                 {
@@ -779,9 +779,9 @@ void  DrawViewShell::ExecRuler(SfxRequest& rReq)
                         rItem.GetRight(), rItem.GetTxtLeft(),
                         rItem.GetTxtFirstLineOfst(), nId );
 
-                const sal_Int16 nOutlineLevel = ((const SfxInt16Item&)aEditAttr.Get( EE_PARA_OUTLLEVEL )).GetValue();
-                const SvxLRSpaceItem& rOrigLRSpaceItem = (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE );
-                const SvxNumBulletItem& rNumBulletItem = (const SvxNumBulletItem&) aEditAttr.Get( EE_PARA_NUMBULLET );
+                const sal_Int16 nOutlineLevel = static_cast<const SfxInt16Item&>(aEditAttr.Get( EE_PARA_OUTLLEVEL )).GetValue();
+                const SvxLRSpaceItem& rOrigLRSpaceItem = static_cast<const SvxLRSpaceItem&>( aEditAttr.Get( EE_PARA_LRSPACE ));
+                const SvxNumBulletItem& rNumBulletItem = static_cast<const SvxNumBulletItem&>( aEditAttr.Get( EE_PARA_NUMBULLET ) );
                 if( nOutlineLevel != -1 &&
                     rNumBulletItem.GetNumRule() &&
                     rNumBulletItem.GetNumRule()->GetLevelCount() > nOutlineLevel )
@@ -908,17 +908,17 @@ void  DrawViewShell::GetRulerState(SfxItemSet& rSet)
                 mpDrawView->GetAttributes( aEditAttr );
                 if( aEditAttr.GetItemState( EE_PARA_TABS ) >= SfxItemState::DEFAULT )
                 {
-                    const SvxTabStopItem& rItem = (const SvxTabStopItem&) aEditAttr.Get( EE_PARA_TABS );
+                    const SvxTabStopItem& rItem = static_cast<const SvxTabStopItem&>( aEditAttr.Get( EE_PARA_TABS ) );
                     rSet.Put( rItem );
 
-                    const SvxLRSpaceItem& rLRSpaceItem = (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE );
+                    const SvxLRSpaceItem& rLRSpaceItem = static_cast<const SvxLRSpaceItem&>( aEditAttr.Get( EE_PARA_LRSPACE ) );
                     sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
                     SvxLRSpaceItem aLRSpaceItem( rLRSpaceItem.GetLeft(),
                             rLRSpaceItem.GetRight(), rLRSpaceItem.GetTxtLeft(),
                             rLRSpaceItem.GetTxtFirstLineOfst(), nId );
 
-                    const sal_Int16 nOutlineLevel = ((const SfxInt16Item&)aEditAttr.Get( EE_PARA_OUTLLEVEL )).GetValue();
-                    const SvxNumBulletItem& rNumBulletItem = (const SvxNumBulletItem&) aEditAttr.Get( EE_PARA_NUMBULLET );
+                    const sal_Int16 nOutlineLevel = static_cast<const SfxInt16Item&>( aEditAttr.Get( EE_PARA_OUTLLEVEL )).GetValue();
+                    const SvxNumBulletItem& rNumBulletItem = static_cast<const SvxNumBulletItem&>( aEditAttr.Get( EE_PARA_NUMBULLET ) );
                     if( nOutlineLevel != -1 &&
                         rNumBulletItem.GetNumRule() &&
                         rNumBulletItem.GetNumRule()->GetLevelCount() > nOutlineLevel )
@@ -936,8 +936,8 @@ void  DrawViewShell::GetRulerState(SfxItemSet& rSet)
 
                     if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET )
                     {
-                        const SdrMetricItem& rTLDItem = (const SdrMetricItem&)
-                                                              aEditAttr.Get( SDRATTR_TEXT_LEFTDIST );
+                        const SdrMetricItem& rTLDItem = static_cast<const SdrMetricItem&>(
+                                                              aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ));
                         long nLD = rTLDItem.GetValue();
                         aPos.X() += nLD;
                     }
@@ -948,8 +948,8 @@ void  DrawViewShell::GetRulerState(SfxItemSet& rSet)
 
                     if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET )
                     {
-                        const SdrMetricItem& rTLDItem = (const SdrMetricItem&)
-                                                              aEditAttr.Get( SDRATTR_TEXT_LEFTDIST );
+                        const SdrMetricItem& rTLDItem = static_cast<const SdrMetricItem&>(
+                                                              aEditAttr.Get( SDRATTR_TEXT_LEFTDIST ));
                         long nLD = rTLDItem.GetValue();
                         aLRSpace.SetLeft( aLRSpace.GetLeft() + nLD );
                     }
@@ -967,7 +967,7 @@ void  DrawViewShell::GetRulerState(SfxItemSet& rSet)
 
                 if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SfxItemState::DEFAULT )
                 {
-                    const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR );
+                    const SvxFrameDirectionItem& rItem = static_cast<const SvxFrameDirectionItem&>( aEditAttr.Get( EE_PARA_WRITINGDIR ) );
                     rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, rItem.GetValue() == ::com::sun::star::text::WritingMode_RL_TB));
                 }
             }
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 8b7d1a0..4552403 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -162,7 +162,7 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
                             (OBJ_TITLETEXT == nKnd || OBJ_OUTLINETEXT == nKnd || OBJ_TEXT == nKnd)
                             && bDidVisitOldObject)
                         {
-                            pCandidate = (SdrTextObj*)pObj;
+                            pCandidate = static_cast<SdrTextObj*>(pObj);
                         }
 
                         if(pObj == pOldObj)
@@ -248,7 +248,7 @@ void DrawViewShell::FreshNavigatrEntry()
     SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
     if( pWindow )
     {
-        SdNavigatorWin* pNavWin = (SdNavigatorWin*)( pWindow->GetContextWindow( SD_MOD() ) );
+        SdNavigatorWin* pNavWin = static_cast<SdNavigatorWin*>( pWindow->GetContextWindow( SD_MOD() ) );
         if( pNavWin )
             pNavWin->FreshEntry();
     }
@@ -260,7 +260,7 @@ void DrawViewShell::FreshNavigatrTree()
     SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
     if( pWindow )
     {
-        SdNavigatorWin* pNavWin = (SdNavigatorWin*)( pWindow->GetContextWindow( SD_MOD() ) );
+        SdNavigatorWin* pNavWin = static_cast<SdNavigatorWin*>( pWindow->GetContextWindow( SD_MOD() ) );
         if( pNavWin )
             pNavWin->FreshTree( GetDoc() );
     }
@@ -289,7 +289,7 @@ void DrawViewShell::MouseButtonDown(const MouseEvent& rMEvt,
         //else the corresponding entry is set false .
         FreshNavigatrTree();
         if ( mbPipette )
-            ( (SvxBmpMask*) GetViewFrame()->GetChildWindow( SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->PipetteClicked();
+            static_cast<SvxBmpMask*>( GetViewFrame()->GetChildWindow( SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->PipetteClicked();
     }
 }
 
@@ -392,7 +392,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
                 }
             }
 
-            ( (SvxBmpMask*) GetViewFrame()->GetChildWindow( SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
+            static_cast<SvxBmpMask*>( GetViewFrame()->GetChildWindow( SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
                 SetColor( Color( (sal_uInt8) ( nRed / fDiv + .5 ),
                                  (sal_uInt8) ( nGreen / fDiv + .5 ),
                                  (sal_uInt8) ( nBlue / fDiv + .5 ) ) );
@@ -420,7 +420,7 @@ void DrawViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin)
             else if (rMEvt.IsLeft() && bIsSetPageOrg)
             {
                 mpDrawView->BrkAction();
-                SdPage* pPage = (SdPage*) mpDrawView->GetSdrPageView()->GetPage();
+                SdPage* pPage = static_cast<SdPage*>( mpDrawView->GetSdrPageView()->GetPage() );
                 Point aOrg(pPage->GetLftBorder(), pPage->GetUppBorder());
                 mpDrawView->GetSdrPageView()->SetPageOrigin(aOrg);
                 GetViewFrame()->GetBindings().Invalidate(SID_RULER_NULL_OFFSET);
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index bad2da9..ec85b5d 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -80,7 +80,7 @@ void DrawViewShell::ModelHasChanged()
     ::Outliner* pOutliner     = mpDrawView->GetTextEditOutliner();
     if (pOutliner)
     {
-        SfxStyleSheetPool* pSPool = (SfxStyleSheetPool*) GetDocSh()->GetStyleSheetPool();
+        SfxStyleSheetPool* pSPool = static_cast<SfxStyleSheetPool*>( GetDocSh()->GetStyleSheetPool() );
         pOutliner->SetStyleSheetPool(pSPool);
     }
 }
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index ad8233a..bf3e3d8 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -93,7 +93,7 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
     sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
 
     if ( GetViewFrame()->HasChildWindow(nId) )
-        pDlg = (SvxFontWorkDialog*)(GetViewFrame()->GetChildWindow(nId)->GetWindow());
+        pDlg = static_cast<SvxFontWorkDialog*>(GetViewFrame()->GetChildWindow(nId)->GetWindow());
 
     if ( rMarkList.GetMarkCount() == 1 )
         pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -201,8 +201,8 @@ void DrawViewShell::GetAnimationWinState( SfxItemSet& rSet )
         {
             sal_uInt16 nCount = 0;
 
-            if( ( (SdrGrafObj*) pObj )->IsAnimated() )
-                nCount = ( (SdrGrafObj*) pObj )->GetGraphic().GetAnimation().Count();
+            if( static_cast<const SdrGrafObj*>(pObj)->IsAnimated() )
+                nCount = static_cast<const SdrGrafObj*>(pObj)->GetGraphic().GetAnimation().Count();
             if( nCount > 0 )
                 nValue = 2;
             else
@@ -272,8 +272,8 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
     {
         case ( SID_BMPMASK_PIPETTE ) :
         {
-            mbPipette = ( (const SfxBoolItem&) ( rReq.GetArgs()->
-                       Get( SID_BMPMASK_PIPETTE ) ) ).GetValue();
+            mbPipette = static_cast<const SfxBoolItem&>( rReq.GetArgs()->
+                       Get( SID_BMPMASK_PIPETTE ) ).GetValue();
         }
         break;
 
@@ -304,7 +304,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
                 if( bCont )
                 {
                     const Graphic&  rOldGraphic = pNewObj->GetGraphic();
-                    const Graphic   aNewGraphic( ( (SvxBmpMask*) GetViewFrame()->GetChildWindow(
+                    const Graphic   aNewGraphic( static_cast<SvxBmpMask*>( GetViewFrame()->GetChildWindow(
                                                  SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
                                                  Mask( rOldGraphic ) );
 
@@ -313,7 +313,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
                         SdrPageView* pPV = mpDrawView->GetSdrPageView();
 
                         pNewObj->SetEmptyPresObj( false );
-                        pNewObj->SetGraphic( ( (SvxBmpMask*) GetViewFrame()->GetChildWindow(
+                        pNewObj->SetGraphic( static_cast<SvxBmpMask*>( GetViewFrame()->GetChildWindow(
                                              SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
                                              Mask( pNewObj->GetGraphic() ) );
 
@@ -343,7 +343,7 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
 
     if ( GetViewFrame()->HasChildWindow( nId ) )
     {
-        SvxBmpMask* pDlg = (SvxBmpMask*) ( GetViewFrame()->GetChildWindow( nId )->GetWindow() );
+        SvxBmpMask* pDlg = static_cast<SvxBmpMask*>( GetViewFrame()->GetChildWindow( nId )->GetWindow() );
 
         if ( pDlg->NeedsColorList() )
             pDlg->SetColorList( GetDoc()->GetColorList() );
@@ -354,7 +354,7 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
 
     // valid graphic object?
     if( pObj && pObj->ISA( SdrGrafObj ) &&
-        !((SdrGrafObj*) pObj)->IsEPS() &&
+        !static_cast<const SdrGrafObj*>(pObj)->IsEPS() &&
         !mpDrawView->IsTextEdit() )
     {
         bEnable = true;
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 6a57586..4bb781f 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -229,7 +229,7 @@ void DrawViewShell::GetDrawAttrState(SfxItemSet& rSet)
     if (!pPageView)
         return NULL;
 
-    SdPage* pPage = (SdPage*)pPageView->GetPage();
+    SdPage* pPage = static_cast<SdPage*>(pPageView->GetPage());
     //only show these in a normal master page
     if (!pPage || (pPage->GetPageKind() != PK_STANDARD) || !pPage->IsMasterPage())
         return NULL;
@@ -859,7 +859,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
                             // a page does have a AutoLayout "Title"
                             bDisable = false;
 
-                            SdPage& rRefMPage = (SdPage&)(pPage->TRG_GetMasterPage());
+                            SdPage& rRefMPage = static_cast<SdPage&>(pPage->TRG_GetMasterPage());
 
                             if(&rRefMPage == pMPage)
                             {
@@ -1785,8 +1785,8 @@ void DrawViewShell::Execute (SfxRequest& rReq)
             SfxViewFrame* pViewFrame = GetViewFrame();
             if (rReq.GetArgs() != NULL)
                 pViewFrame->SetChildWindow (SID_SPELL_DIALOG,
-                    ((const SfxBoolItem&) (rReq.GetArgs()->
-                        Get(SID_SPELL_DIALOG))).GetValue());
+                    static_cast<const SfxBoolItem&>(rReq.GetArgs()->
+                        Get(SID_SPELL_DIALOG)).GetValue());
             else
                 pViewFrame->ToggleChildWindow(SID_SPELL_DIALOG);
 
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 4319cda..0e67b96 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -142,7 +142,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
 
                 if (pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF)
                 {
-                    pGrafObj = (SdrGrafObj*) pObj;
+                    pGrafObj = static_cast<SdrGrafObj*>(pObj);
 
                     if( pGrafObj->IsEmptyPresObj() )
                     {
@@ -746,7 +746,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
         {
             case SID_GETFILLSTYLE :
             {
-                const XFillStyleItem &rFillStyleItem = (const XFillStyleItem &) aAttr.Get (XATTR_FILLSTYLE);
+                const XFillStyleItem &rFillStyleItem = static_cast<const XFillStyleItem &>(aAttr.Get (XATTR_FILLSTYLE));
 
                 rSet.Put (SfxUInt32Item (nWhich, (long) rFillStyleItem.GetValue ()));
                 break;
@@ -754,7 +754,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
 
             case SID_GETLINESTYLE :
             {
-                const XLineStyleItem &rLineStyleItem = (const XLineStyleItem &) aAttr.Get (XATTR_LINESTYLE);
+                const XLineStyleItem &rLineStyleItem = static_cast<const XLineStyleItem &>( aAttr.Get (XATTR_LINESTYLE) );
 
                 rSet.Put (SfxUInt32Item (nWhich, (long) rLineStyleItem.GetValue ()));
                 break;
@@ -762,7 +762,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
 
             case SID_GETLINEWIDTH :
             {
-                const XLineWidthItem &rLineWidthItem = (const XLineWidthItem &) aAttr.Get (XATTR_LINEWIDTH);
+                const XLineWidthItem &rLineWidthItem = static_cast<const XLineWidthItem &>( aAttr.Get (XATTR_LINEWIDTH) );
 
                 rSet.Put (SfxUInt32Item (nWhich, (long) rLineWidthItem.GetValue ()));
                 break;
@@ -772,14 +772,14 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
             case SID_GETRED :
             case SID_GETBLUE :
             {
-                const SfxUInt32Item &rWhatKind = (const SfxUInt32Item &) rSet.Get (ID_VAL_WHATKIND);
+                const SfxUInt32Item &rWhatKind = static_cast<const SfxUInt32Item &>( rSet.Get (ID_VAL_WHATKIND) );
                 Color               aColor;
 
                 switch (rWhatKind.GetValue ())
                 {
                     case 1 :
                     {
-                        const XLineColorItem &rLineColorItem = (const XLineColorItem &) aAttr.Get (XATTR_LINECOLOR);
+                        const XLineColorItem &rLineColorItem = static_cast<const XLineColorItem &>( aAttr.Get (XATTR_LINECOLOR) );
 
                         aColor = rLineColorItem.GetColorValue ();
                         break;
@@ -787,7 +787,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
 
                     case 2 :
                     {
-                        const XFillColorItem &rFillColorItem = (const XFillColorItem &) aAttr.Get (XATTR_FILLCOLOR);
+                        const XFillColorItem &rFillColorItem = static_cast<const XFillColorItem &>( aAttr.Get (XATTR_FILLCOLOR) );
 
                         aColor = rFillColorItem.GetColorValue ();
                         break;
@@ -796,7 +796,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
                     case 3 :
                     case 4 :
                     {
-                        const XFillGradientItem &rFillGradientItem = (const XFillGradientItem &) aAttr.Get (XATTR_FILLGRADIENT);
+                        const XFillGradientItem &rFillGradientItem = static_cast<const XFillGradientItem &>( aAttr.Get (XATTR_FILLGRADIENT) );
                         const XGradient         &rGradient         = rFillGradientItem.GetGradientValue ();
 
                         aColor = (rWhatKind.GetValue () == 3)
@@ -807,7 +807,7 @@ void DrawViewShell::AttrState (SfxItemSet& rSet)
 
                     case 5:
                     {
-                        const XFillHatchItem &rFillHatchItem = (const XFillHatchItem &) aAttr.Get (XATTR_FILLHATCH);
+                        const XFillHatchItem &rFillHatchItem = static_cast<const XFillHatchItem &>( aAttr.Get (XATTR_FILLHATCH) );
                         const XHatch         &rHatch         = rFillHatchItem.GetHatchValue ();
 
                         aColor = rHatch.GetColor ();
diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx
index 21357a1..922f148 100644
--- a/sd/source/ui/view/drviewsd.cxx
+++ b/sd/source/ui/view/drviewsd.cxx
@@ -60,7 +60,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
             SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
             if( pWindow )
             {
-                SdNavigatorWin* pNavWin = (SdNavigatorWin*)( pWindow->GetContextWindow( SD_MOD() ) );
+                SdNavigatorWin* pNavWin = static_cast<SdNavigatorWin*>( pWindow->GetContextWindow( SD_MOD() ) );
                 if( pNavWin )
                     pNavWin->InitTreeLB( GetDoc() );
             }
@@ -82,7 +82,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
                     mpDrawView->SdrEndTextEdit();
 
                 const SfxItemSet* pArgs = rReq.GetArgs();
-                PageJump eJump = (PageJump)((SfxAllEnumItem&) pArgs->
+                PageJump eJump = (PageJump)static_cast<const SfxAllEnumItem&>( pArgs->
                                   Get(SID_NAVIGATOR_PAGE)).GetValue();
 
                 switch (eJump)
@@ -133,7 +133,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
             {
                 OUString aBookmarkStr("#");
                 const SfxItemSet* pArgs = rReq.GetArgs();
-                OUString aTarget = ((SfxStringItem&) pArgs->
+                OUString aTarget = static_cast<const SfxStringItem&>( pArgs->
                                  Get(SID_NAVIGATOR_OBJECT)).GetValue();
                 aBookmarkStr += aTarget;
                 SfxStringItem aStrItem(SID_FILE_NAME, aBookmarkStr);
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index d0901b1..2ba46fd 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -114,7 +114,7 @@ void ImpAddPrintableCharactersToTextEdit(SfxRequest& rReq, ::sd::View* pView)
         OUString aInputString;
 
         if(SfxItemState::SET == pSet->GetItemState(SID_ATTR_CHAR))
-            aInputString = ((SfxStringItem&)pSet->Get(SID_ATTR_CHAR)).GetValue();
+            aInputString = static_cast<const SfxStringItem&>(pSet->Get(SID_ATTR_CHAR)).GetValue();
 
         if(!aInputString.isEmpty())
         {
@@ -685,7 +685,7 @@ void DrawViewShell::FuDeleteSelectedObjects()
 void DrawViewShell::FuSupport(SfxRequest& rReq)
 {
     if( rReq.GetSlot() == SID_STYLE_FAMILY && rReq.GetArgs())
-        GetDocSh()->SetStyleFamily(((SfxUInt16Item&)rReq.GetArgs()->Get( SID_STYLE_FAMILY )).GetValue());
+        GetDocSh()->SetStyleFamily(static_cast<const SfxUInt16Item&>(rReq.GetArgs()->Get( SID_STYLE_FAMILY )).GetValue());
 
     // We do not execute a thing during a native slide show
     if(SlideShow::IsRunning(GetViewShellBase()) &&
@@ -775,7 +775,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
             const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
             if ( rMarkList.GetMark(0) && !mpDrawView->IsAction() )
             {
-                SdrPathObj* pPathObj = (SdrPathObj*) rMarkList.GetMark(0)->GetMarkedSdrObj();
+                SdrPathObj* pPathObj = static_cast<SdrPathObj*>( rMarkList.GetMark(0)->GetMarkedSdrObj());
                 const bool bUndo = mpDrawView->IsUndoEnabled();
                 if( bUndo )
                     mpDrawView->BegUndo(SD_RESSTR(STR_UNDO_BEZCLOSE));
@@ -1423,13 +1423,13 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
 
                 if (pObj->GetObjInventor() == SdrInventor)
                 {
-                    if (pObj->GetObjIdentifier() == OBJ_GRAF && !((SdrGrafObj*) pObj)->IsLinkedGraphic())
+                    if (pObj->GetObjIdentifier() == OBJ_GRAF && !static_cast<SdrGrafObj*>(pObj)->IsLinkedGraphic())
                     {
-                        const Graphic& rGraphic = ((SdrGrafObj*) pObj)->GetGraphic();
+                        const Graphic& rGraphic = static_cast<SdrGrafObj*>(pObj)->GetGraphic();
 
                         if( rGraphic.GetType() == GRAPHIC_BITMAP )
                         {
-                            SdrGrafObj* pNewObj = (SdrGrafObj*) pObj->Clone();
+                            SdrGrafObj* pNewObj = static_cast<SdrGrafObj*>( pObj->Clone() );
 
                             if( rGraphic.IsAnimated() )
                             {
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index ec75433..6b46f06 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -99,9 +99,9 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
                     const SvxFieldData* pField = pFieldItem->GetField();
                     if (pField->ISA(SvxURLField))
                     {
-                        aHLinkItem.SetName(((const SvxURLField*) pField)->GetRepresentation());
-                        aHLinkItem.SetURL(((const SvxURLField*) pField)->GetURL());
-                        aHLinkItem.SetTargetFrame(((const SvxURLField*) pField)->GetTargetFrame());
+                        aHLinkItem.SetName(static_cast<const SvxURLField*>(pField)->GetRepresentation());
+                        aHLinkItem.SetURL(static_cast<const SvxURLField*>(pField)->GetURL());
+                        aHLinkItem.SetTargetFrame(static_cast<const SvxURLField*>(pField)->GetTargetFrame());
                         bField = true;
                     }
                 }
@@ -289,7 +289,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
                 SfxItemSet aAttrs( GetDoc()->GetPool() );
                 mpDrawView->GetAttributes( aAttrs );
 
-                SvxAdjustItem aItem= ( (const SvxAdjustItem&) aAttrs.Get( EE_PARA_JUST ) );
+                SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
                 SvxAdjust eAdj = aItem.GetAdjust();
                 if ( eAdj == SVX_ADJUST_LEFT)
                 {
@@ -306,7 +306,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
                 SfxItemSet aAttrs( GetDoc()->GetPool() );
                 mpDrawView->GetAttributes( aAttrs );
 
-                SvxAdjustItem aItem= ( (const SvxAdjustItem&) aAttrs.Get( EE_PARA_JUST ) );
+                SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
                 SvxAdjust eAdj = aItem.GetAdjust();
                 if ( eAdj == SVX_ADJUST_CENTER)
                 {
@@ -323,7 +323,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
                 SfxItemSet aAttrs( GetDoc()->GetPool() );
                 mpDrawView->GetAttributes( aAttrs );
 
-                SvxAdjustItem aItem= ( (const SvxAdjustItem&) aAttrs.Get( EE_PARA_JUST ) );
+                SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
                 SvxAdjust eAdj = aItem.GetAdjust();
                 if ( eAdj == SVX_ADJUST_RIGHT)
                 {
@@ -340,7 +340,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
                 SfxItemSet aAttrs( GetDoc()->GetPool() );
                 mpDrawView->GetAttributes( aAttrs );
 
-                SvxAdjustItem aItem= ( (const SvxAdjustItem&) aAttrs.Get( EE_PARA_JUST ) );
+                SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
                 SvxAdjust eAdj = aItem.GetAdjust();
                 if ( eAdj == SVX_ADJUST_BLOCK)
                 {
@@ -356,7 +356,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
             {
                 SfxItemSet aAttrs( GetDoc()->GetPool() );
                 mpDrawView->GetAttributes( aAttrs );
-                SvxLRSpaceItem aLRSpace = ( (const SvxLRSpaceItem&) aAttrs.Get( EE_PARA_LRSPACE ) );
+                SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>( aAttrs.Get( EE_PARA_LRSPACE ) );
                 aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE);

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list