summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-01 10:17:45 +0200
committerNoel Grandin <noel@peralex.com>2014-12-02 09:32:10 +0200
commite5764b7d04429549658c1eaf1189428aa504f0da (patch)
treea59a3fb91d15c7dec7cbb1ef1d8392913c6dd0aa /sw
parentc91ece97c00a780c1ed745aed64b20958e9ee2aa (diff)
loplugin: cstylecast
Change-Id: I9a0f424adbcf95fb5ab275b90af1c56ae1d2fc44
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/envelp/envimg.cxx2
-rw-r--r--sw/source/uibase/envelp/labimg.cxx2
-rw-r--r--sw/source/uibase/envelp/syncbtn.cxx2
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx102
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx40
-rw-r--r--sw/source/uibase/frmdlg/colmgr.cxx6
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx10
-rw-r--r--sw/source/uibase/inc/content.hxx12
-rw-r--r--sw/source/uibase/inc/envlop.hxx2
-rw-r--r--sw/source/uibase/inc/frmmgr.hxx2
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx2
-rw-r--r--sw/source/uibase/index/toxmgr.cxx4
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx2
-rw-r--r--sw/source/uibase/misc/glshell.cxx4
-rw-r--r--sw/source/uibase/misc/numberingtypelistbox.cxx10
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/ribbar/concustomshape.cxx2
-rw-r--r--sw/source/uibase/ribbar/conrect.cxx2
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx2
-rw-r--r--sw/source/uibase/ribbar/tbxanchr.cxx4
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx2
21 files changed, 108 insertions, 108 deletions
diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx
index f913cbdc5969..ecda0eb5b28b 100644
--- a/sw/source/uibase/envelp/envimg.cxx
+++ b/sw/source/uibase/envelp/envimg.cxx
@@ -147,7 +147,7 @@ SwEnvItem& SwEnvItem::operator =(const SwEnvItem& rItem)
bool SwEnvItem::operator ==(const SfxPoolItem& rItem) const
{
- const SwEnvItem& rEnv = (const SwEnvItem&) rItem;
+ const SwEnvItem& rEnv = static_cast<const SwEnvItem&>( rItem);
return aAddrText == rEnv.aAddrText &&
bSend == rEnv.bSend &&
diff --git a/sw/source/uibase/envelp/labimg.cxx b/sw/source/uibase/envelp/labimg.cxx
index 428f85a3b93d..9769ebf580a1 100644
--- a/sw/source/uibase/envelp/labimg.cxx
+++ b/sw/source/uibase/envelp/labimg.cxx
@@ -123,7 +123,7 @@ SwLabItem& SwLabItem::operator =(const SwLabItem& rItem)
bool SwLabItem::operator ==(const SfxPoolItem& rItem) const
{
- const SwLabItem& rLab = (const SwLabItem&) rItem;
+ const SwLabItem& rLab = static_cast<const SwLabItem&>( rItem);
return bAddr == rLab.bAddr &&
bCont == rLab.bCont &&
diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx
index 676f41d4c364..a6b73da14126 100644
--- a/sw/source/uibase/envelp/syncbtn.cxx
+++ b/sw/source/uibase/envelp/syncbtn.cxx
@@ -53,7 +53,7 @@ SwSyncChildWin::SwSyncChildWin( vcl::Window* _pParent,
pInfo->aSize = pWindow->GetSizePixel();
}
- ((SwSyncBtnDlg *)pWindow)->Initialize(pInfo);
+ static_cast<SwSyncBtnDlg *>(pWindow)->Initialize(pInfo);
pWindow->Show();
}
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index c197ebcb1667..44436f986d48 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -773,7 +773,7 @@ bool SwFldMgr::InsertFld(
{ // ATTENTION this field is inserted by a separate dialog
case TYP_POSTITFLD:
{
- SwPostItFieldType* pType = (SwPostItFieldType*)pCurShell->GetFldType(0, RES_POSTITFLD);
+ SwPostItFieldType* pType = static_cast<SwPostItFieldType*>(pCurShell->GetFldType(0, RES_POSTITFLD));
SwPostItField* pPostItField =
new SwPostItField(
pType,
@@ -788,15 +788,15 @@ bool SwFldMgr::InsertFld(
case TYP_SCRIPTFLD:
{
SwScriptFieldType* pType =
- (SwScriptFieldType*)pCurShell->GetFldType(0, RES_SCRIPTFLD);
+ static_cast<SwScriptFieldType*>(pCurShell->GetFldType(0, RES_SCRIPTFLD));
pFld = new SwScriptField(pType, rData.sPar1, rData.sPar2, (bool)nFormatId);
break;
}
case TYP_COMBINED_CHARS:
{
- SwCombinedCharFieldType* pType = (SwCombinedCharFieldType*)
- pCurShell->GetFldType( 0, RES_COMBINED_CHARS );
+ SwCombinedCharFieldType* pType = static_cast<SwCombinedCharFieldType*>(
+ pCurShell->GetFldType( 0, RES_COMBINED_CHARS ));
pFld = new SwCombinedCharField( pType, rData.sPar1 );
}
break;
@@ -804,7 +804,7 @@ bool SwFldMgr::InsertFld(
case TYP_AUTHORITY:
{
SwAuthorityFieldType* pType =
- (SwAuthorityFieldType*)pCurShell->GetFldType(0, RES_AUTHORITY);
+ static_cast<SwAuthorityFieldType*>(pCurShell->GetFldType(0, RES_AUTHORITY));
if (!pType)
{
SwAuthorityFieldType const type(pCurShell->GetDoc());
@@ -822,7 +822,7 @@ bool SwFldMgr::InsertFld(
nSub |= nSubType == DATE_VAR ? 0 : FIXEDFLD;
SwDateTimeFieldType* pTyp =
- (SwDateTimeFieldType*)pCurShell->GetFldType(0, RES_DATETIMEFLD);
+ static_cast<SwDateTimeFieldType*>( pCurShell->GetFldType(0, RES_DATETIMEFLD) );
pFld = new SwDateTimeField(pTyp, nSub, nFormatId);
pFld->SetPar2(rData.sPar2);
break;
@@ -831,7 +831,7 @@ bool SwFldMgr::InsertFld(
case TYP_FILENAMEFLD:
{
SwFileNameFieldType* pTyp =
- (SwFileNameFieldType*)pCurShell->GetFldType(0, RES_FILENAMEFLD);
+ static_cast<SwFileNameFieldType*>( pCurShell->GetFldType(0, RES_FILENAMEFLD) );
pFld = new SwFileNameField(pTyp, nFormatId);
break;
}
@@ -839,7 +839,7 @@ bool SwFldMgr::InsertFld(
case TYP_TEMPLNAMEFLD:
{
SwTemplNameFieldType* pTyp =
- (SwTemplNameFieldType*)pCurShell->GetFldType(0, RES_TEMPLNAMEFLD);
+ static_cast<SwTemplNameFieldType*>( pCurShell->GetFldType(0, RES_TEMPLNAMEFLD) );
pFld = new SwTemplNameField(pTyp, nFormatId);
break;
}
@@ -848,7 +848,7 @@ bool SwFldMgr::InsertFld(
{
sal_uInt16 nByte = (sal_uInt16)rData.sPar2.toInt32();
SwChapterFieldType* pTyp =
- (SwChapterFieldType*)pCurShell->GetFldType(0, RES_CHAPTERFLD);
+ static_cast<SwChapterFieldType*>( pCurShell->GetFldType(0, RES_CHAPTERFLD) );
pFld = new SwChapterField(pTyp, nFormatId);
nByte = std::max(sal_uInt16(1), nByte);
nByte = std::min(nByte, sal_uInt16(MAXLEVEL));
@@ -883,7 +883,7 @@ bool SwFldMgr::InsertFld(
nSubType = PG_RANDOM;
SwPageNumberFieldType* pTyp =
- (SwPageNumberFieldType*)pCurShell->GetFldType(0, RES_PAGENUMBERFLD);
+ static_cast<SwPageNumberFieldType*>( pCurShell->GetFldType(0, RES_PAGENUMBERFLD) );
pFld = new SwPageNumberField(pTyp, nSubType, nFormatId, nOff);
if( SVX_NUM_CHAR_SPECIAL == nFormatId &&
@@ -895,7 +895,7 @@ bool SwFldMgr::InsertFld(
case TYP_DOCSTATFLD:
{
SwDocStatFieldType* pTyp =
- (SwDocStatFieldType*)pCurShell->GetFldType(0, RES_DOCSTATFLD);
+ static_cast<SwDocStatFieldType*>( pCurShell->GetFldType(0, RES_DOCSTATFLD) );
pFld = new SwDocStatField(pTyp, nSubType, nFormatId);
break;
}
@@ -903,7 +903,7 @@ bool SwFldMgr::InsertFld(
case TYP_AUTHORFLD:
{
SwAuthorFieldType* pTyp =
- (SwAuthorFieldType*)pCurShell->GetFldType(0, RES_AUTHORFLD);
+ static_cast<SwAuthorFieldType*>( pCurShell->GetFldType(0, RES_AUTHORFLD) );
pFld = new SwAuthorField(pTyp, nFormatId);
break;
}
@@ -912,7 +912,7 @@ bool SwFldMgr::InsertFld(
case TYP_HIDDENTXTFLD:
{
SwHiddenTxtFieldType* pTyp =
- (SwHiddenTxtFieldType*)pCurShell->GetFldType(0, RES_HIDDENTXTFLD);
+ static_cast<SwHiddenTxtFieldType*>( pCurShell->GetFldType(0, RES_HIDDENTXTFLD) );
pFld = new SwHiddenTxtField(pTyp, true, rData.sPar1, rData.sPar2, false, rData.nTypeId);
bExp = true;
break;
@@ -921,7 +921,7 @@ bool SwFldMgr::InsertFld(
case TYP_HIDDENPARAFLD:
{
SwHiddenParaFieldType* pTyp =
- (SwHiddenParaFieldType*)pCurShell->GetFldType(0, RES_HIDDENPARAFLD);
+ static_cast<SwHiddenParaFieldType*>( pCurShell->GetFldType(0, RES_HIDDENPARAFLD) );
pFld = new SwHiddenParaField(pTyp, rData.sPar1);
bExp = true;
break;
@@ -940,7 +940,7 @@ bool SwFldMgr::InsertFld(
case TYP_GETREFFLD:
{
SwGetRefFieldType* pTyp =
- (SwGetRefFieldType*)pCurShell->GetFldType(0, RES_GETREFFLD);
+ static_cast<SwGetRefFieldType*>( pCurShell->GetFldType(0, RES_GETREFFLD) );
sal_uInt16 nSeqNo = (sal_uInt16)rData.sPar2.toInt32();
pFld = new SwGetRefField(pTyp, rData.sPar1, nSubType, nSeqNo, nFormatId);
bExp = true;
@@ -959,7 +959,7 @@ bool SwFldMgr::InsertFld(
}
SwDDEFieldType aType( rData.sPar1, sCmd, (sal_uInt16) nFormatId );
- SwDDEFieldType* pTyp = (SwDDEFieldType*) pCurShell->InsertFldType( aType );
+ SwDDEFieldType* pTyp = static_cast<SwDDEFieldType*>( pCurShell->InsertFldType( aType ) );
pFld = new SwDDEField( pTyp );
break;
}
@@ -967,7 +967,7 @@ bool SwFldMgr::InsertFld(
case TYP_MACROFLD:
{
SwMacroFieldType* pTyp =
- (SwMacroFieldType*)pCurShell->GetFldType(0, RES_MACROFLD);
+ static_cast<SwMacroFieldType*>(pCurShell->GetFldType(0, RES_MACROFLD));
pFld = new SwMacroField(pTyp, rData.sPar1, rData.sPar2);
@@ -985,7 +985,7 @@ bool SwFldMgr::InsertFld(
case TYP_JUMPEDITFLD:
{
SwJumpEditFieldType* pTyp =
- (SwJumpEditFieldType*)pCurShell->GetFldType(0, RES_JUMPEDITFLD);
+ static_cast<SwJumpEditFieldType*>(pCurShell->GetFldType(0, RES_JUMPEDITFLD));
pFld = new SwJumpEditField(pTyp, nFormatId, rData.sPar1, rData.sPar2 );
break;
@@ -993,16 +993,16 @@ bool SwFldMgr::InsertFld(
case TYP_DOCINFOFLD:
{
- SwDocInfoFieldType* pTyp = (SwDocInfoFieldType*)pCurShell->GetFldType(
- 0, RES_DOCINFOFLD );
+ SwDocInfoFieldType* pTyp = static_cast<SwDocInfoFieldType*>( pCurShell->GetFldType(
+ 0, RES_DOCINFOFLD ) );
pFld = new SwDocInfoField(pTyp, nSubType, rData.sPar1, nFormatId);
break;
}
case TYP_EXTUSERFLD:
{
- SwExtUserFieldType* pTyp = (SwExtUserFieldType*)pCurShell->GetFldType(
- 0, RES_EXTUSERFLD);
+ SwExtUserFieldType* pTyp = static_cast<SwExtUserFieldType*>( pCurShell->GetFldType(
+ 0, RES_EXTUSERFLD) );
pFld = new SwExtUserField(pTyp, nSubType, nFormatId);
break;
}
@@ -1029,8 +1029,8 @@ bool SwFldMgr::InsertFld(
if(!aDBData.sDataSource.isEmpty() && pCurShell->GetDBData() != aDBData)
pCurShell->ChgDBData(aDBData);
- SwDBFieldType* pTyp = (SwDBFieldType*)pCurShell->InsertFldType(
- SwDBFieldType(pCurShell->GetDoc(), sPar1, aDBData) );
+ SwDBFieldType* pTyp = static_cast<SwDBFieldType*>(pCurShell->InsertFldType(
+ SwDBFieldType(pCurShell->GetDoc(), sPar1, aDBData) ) );
pFld = new SwDBField(pTyp);
pFld->SetSubType(nSubType);
@@ -1103,31 +1103,31 @@ bool SwFldMgr::InsertFld(
case TYP_DBNAMEFLD:
{
SwDBNameFieldType* pTyp =
- (SwDBNameFieldType*)pCurShell->GetFldType(0, RES_DBNAMEFLD);
+ static_cast<SwDBNameFieldType*>(pCurShell->GetFldType(0, RES_DBNAMEFLD));
pFld = new SwDBNameField(pTyp, aDBData);
break;
}
case TYP_DBNEXTSETFLD:
{
- SwDBNextSetFieldType* pTyp = (SwDBNextSetFieldType*)pCurShell->GetFldType(
- 0, RES_DBNEXTSETFLD);
+ SwDBNextSetFieldType* pTyp = static_cast<SwDBNextSetFieldType*>(pCurShell->GetFldType(
+ 0, RES_DBNEXTSETFLD) );
pFld = new SwDBNextSetField(pTyp, sPar1, rData.sPar2, aDBData);
bExp = true;
break;
}
case TYP_DBNUMSETFLD:
{
- SwDBNumSetFieldType* pTyp = (SwDBNumSetFieldType*)pCurShell->GetFldType(
- 0, RES_DBNUMSETFLD);
+ SwDBNumSetFieldType* pTyp = static_cast<SwDBNumSetFieldType*>( pCurShell->GetFldType(
+ 0, RES_DBNUMSETFLD) );
pFld = new SwDBNumSetField( pTyp, sPar1, rData.sPar2, aDBData);
bExp = true;
break;
}
case TYP_DBSETNUMBERFLD:
{
- SwDBSetNumberFieldType* pTyp = (SwDBSetNumberFieldType*)
- pCurShell->GetFldType(0, RES_DBSETNUMBERFLD);
+ SwDBSetNumberFieldType* pTyp = static_cast<SwDBSetNumberFieldType*>(
+ pCurShell->GetFldType(0, RES_DBSETNUMBERFLD) );
pFld = new SwDBSetNumberField( pTyp, aDBData, nFormatId);
bExp = true;
break;
@@ -1140,13 +1140,13 @@ bool SwFldMgr::InsertFld(
case TYP_USERFLD:
{
SwUserFieldType* pTyp =
- (SwUserFieldType*)pCurShell->GetFldType(RES_USERFLD, rData.sPar1);
+ static_cast<SwUserFieldType*>( pCurShell->GetFldType(RES_USERFLD, rData.sPar1) );
// only if existing
if(!pTyp)
{
- pTyp = (SwUserFieldType*)pCurShell->InsertFldType(
- SwUserFieldType(pCurShell->GetDoc(), rData.sPar1));
+ pTyp = static_cast<SwUserFieldType*>( pCurShell->InsertFldType(
+ SwUserFieldType(pCurShell->GetDoc(), rData.sPar1)) );
}
if (pTyp->GetContent(nFormatId) != rData.sPar2)
pTyp->SetContent(rData.sPar2, nFormatId);
@@ -1161,8 +1161,8 @@ bool SwFldMgr::InsertFld(
{
if ((nSubType & 0x00ff) == INP_VAR)
{
- SwSetExpFieldType* pTyp = (SwSetExpFieldType*)
- pCurShell->GetFldType(RES_SETEXPFLD, rData.sPar1);
+ SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>(
+ pCurShell->GetFldType(RES_SETEXPFLD, rData.sPar1) );
// no Experssion Type with this name existing -> create
if(pTyp)
@@ -1185,7 +1185,7 @@ bool SwFldMgr::InsertFld(
else
{
SwInputFieldType* pTyp =
- (SwInputFieldType*)pCurShell->GetFldType(0, RES_INPUTFLD);
+ static_cast<SwInputFieldType*>( pCurShell->GetFldType(0, RES_INPUTFLD) );
SwInputField* pInpFld =
new SwInputField( pTyp, rData.sPar1, rData.sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
@@ -1202,8 +1202,8 @@ bool SwFldMgr::InsertFld(
if (rData.sPar2.isEmpty()) // empty variables are not allowed
return false;
- SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType(
- SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1) );
+ SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>( pCurShell->InsertFldType(
+ SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1) ) );
SwSetExpField* pExpFld = new SwSetExpField( pTyp, rData.sPar2, nFormatId);
pExpFld->SetSubType(nSubType);
@@ -1215,8 +1215,8 @@ bool SwFldMgr::InsertFld(
case TYP_SEQFLD:
{
- SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType(
- SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1, nsSwGetSetExpType::GSE_SEQ));
+ SwSetExpFieldType* pTyp = static_cast<SwSetExpFieldType*>( pCurShell->InsertFldType(
+ SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1, nsSwGetSetExpType::GSE_SEQ)));
sal_uInt8 nLevel = static_cast< sal_uInt8 >(nSubType & 0xff);
@@ -1235,13 +1235,13 @@ bool SwFldMgr::InsertFld(
case TYP_GETFLD:
{
// is there a corresponding SetField
- SwSetExpFieldType* pSetTyp = (SwSetExpFieldType*)
- pCurShell->GetFldType(RES_SETEXPFLD, rData.sPar1);
+ SwSetExpFieldType* pSetTyp = static_cast<SwSetExpFieldType*>(
+ pCurShell->GetFldType(RES_SETEXPFLD, rData.sPar1));
if(pSetTyp)
{
- SwGetExpFieldType* pTyp = (SwGetExpFieldType*)pCurShell->GetFldType(
- 0, RES_GETEXPFLD);
+ SwGetExpFieldType* pTyp = static_cast<SwGetExpFieldType*>( pCurShell->GetFldType(
+ 0, RES_GETEXPFLD) );
pFld = new SwGetExpField(pTyp, rData.sPar1, pSetTyp->GetType(), nFormatId);
pFld->SetSubType(nSubType | pSetTyp->GetType());
bExp = true;
@@ -1286,8 +1286,8 @@ bool SwFldMgr::InsertFld(
}
else
{
- SwGetExpFieldType* pTyp = (SwGetExpFieldType*)
- pCurShell->GetFldType(0, RES_GETEXPFLD);
+ SwGetExpFieldType* pTyp = static_cast<SwGetExpFieldType*>(
+ pCurShell->GetFldType(0, RES_GETEXPFLD) );
pFld = new SwGetExpField(pTyp, rData.sPar2, nsSwGetSetExpType::GSE_FORMULA, nFormatId);
pFld->SetSubType(nSubType);
bExp = true;
@@ -1295,15 +1295,15 @@ bool SwFldMgr::InsertFld(
break;
}
case TYP_SETREFPAGEFLD:
- pFld = new SwRefPageSetField( (SwRefPageSetFieldType*)
- pCurShell->GetFldType( 0, RES_REFPAGESETFLD ),
+ pFld = new SwRefPageSetField( static_cast<SwRefPageSetFieldType*>(
+ pCurShell->GetFldType( 0, RES_REFPAGESETFLD ) ),
(short)rData.sPar2.toInt32(), 0 != nSubType );
bPageVar = true;
break;
case TYP_GETREFPAGEFLD:
- pFld = new SwRefPageGetField( (SwRefPageGetFieldType*)
- pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ), nFormatId );
+ pFld = new SwRefPageGetField( static_cast<SwRefPageGetFieldType*>(
+ pCurShell->GetFldType( 0, RES_REFPAGEGETFLD ) ), nFormatId );
bPageVar = true;
break;
case TYP_DROPDOWN :
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 8068fa1f46f5..8943c093f9ab 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -48,7 +48,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET )
{
// alignment
- const SvxPageItem* pPage = (const SvxPageItem*)&rSet.Get( nWhich );
+ const SvxPageItem* pPage = static_cast<const SvxPageItem*>(&rSet.Get( nWhich ));
if ( pPage )
SetUsage( pPage->GetPageUsage() );
@@ -59,14 +59,14 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET )
{
// orientation and size from PageItem
- const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( nWhich );
+ const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get( nWhich ));
SetSize( rSize.GetSize() );
}
nWhich = RES_LR_SPACE;
if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET )
{
// set left and right border
- const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( nWhich );
+ const SvxLRSpaceItem& rLRSpace = static_cast<const SvxLRSpaceItem&>(rSet.Get( nWhich ));
SetLeft( rLRSpace.GetLeft() );
SetRight( rLRSpace.GetRight() );
@@ -82,7 +82,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
if ( rSet.GetItemState( nWhich, false ) == SfxItemState::SET )
{
// set upper and lower border
- const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get( nWhich );
+ const SvxULSpaceItem& rULSpace = static_cast<const SvxULSpaceItem&>(rSet.Get( nWhich ));
SetTop( rULSpace.GetUpper() );
SetBottom( rULSpace.GetLower() );
@@ -100,17 +100,17 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
- (const SfxBoolItem&)rHeaderSet.Get( pPool->GetWhich( SID_ATTR_PAGE_ON ) );
+ static_cast<const SfxBoolItem&>(rHeaderSet.Get( pPool->GetWhich( SID_ATTR_PAGE_ON ) ) );
if ( rHeaderOn.GetValue() )
{
const SvxSizeItem& rSize =
- (const SvxSizeItem&)rHeaderSet.Get(pPool->GetWhich(SID_ATTR_PAGE_SIZE));
+ static_cast<const SvxSizeItem&>(rHeaderSet.Get(pPool->GetWhich(SID_ATTR_PAGE_SIZE)));
- const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)rHeaderSet.Get(
- pPool->GetWhich(SID_ATTR_ULSPACE));
- const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)rHeaderSet.Get(
- pPool->GetWhich(SID_ATTR_LRSPACE));
+ const SvxULSpaceItem& rUL = static_cast<const SvxULSpaceItem&>(rHeaderSet.Get(
+ pPool->GetWhich(SID_ATTR_ULSPACE)));
+ const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(rHeaderSet.Get(
+ pPool->GetWhich(SID_ATTR_LRSPACE)));
SetHdHeight( rSize.GetSize().Height() - rUL.GetLower());
SetHdDist( rUL.GetLower() );
@@ -134,7 +134,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
if ( rHeaderSet.GetItemState( RES_BOX ) == SfxItemState::SET )
{
const SvxBoxItem& rItem =
- (const SvxBoxItem&)rHeaderSet.Get( RES_BOX );
+ static_cast<const SvxBoxItem&>(rHeaderSet.Get( RES_BOX ));
SetHdBorder( rItem );
}
}
@@ -147,17 +147,17 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
- (const SfxBoolItem&)rFooterSet.Get( SID_ATTR_PAGE_ON );
+ static_cast<const SfxBoolItem&>(rFooterSet.Get( SID_ATTR_PAGE_ON ));
if ( rFooterOn.GetValue() )
{
const SvxSizeItem& rSize =
- (const SvxSizeItem&)rFooterSet.Get( pPool->GetWhich( SID_ATTR_PAGE_SIZE ) );
+ static_cast<const SvxSizeItem&>(rFooterSet.Get( pPool->GetWhich( SID_ATTR_PAGE_SIZE ) ));
- const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)rFooterSet.Get(
- pPool->GetWhich( SID_ATTR_ULSPACE ) );
- const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)rFooterSet.Get(
- pPool->GetWhich( SID_ATTR_LRSPACE ) );
+ const SvxULSpaceItem& rUL = static_cast<const SvxULSpaceItem&>(rFooterSet.Get(
+ pPool->GetWhich( SID_ATTR_ULSPACE ) ));
+ const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(rFooterSet.Get(
+ pPool->GetWhich( SID_ATTR_LRSPACE ) ));
SetFtHeight( rSize.GetSize().Height() - rUL.GetUpper());
SetFtDist( rUL.GetUpper() );
@@ -181,7 +181,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
if( rFooterSet.GetItemState( RES_BOX ) == SfxItemState::SET )
{
const SvxBoxItem& rItem =
- (const SvxBoxItem&)rFooterSet.Get( RES_BOX );
+ static_cast<const SvxBoxItem&>(rFooterSet.Get( RES_BOX ));
SetFtBorder( rItem );
}
}
@@ -597,11 +597,11 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
DELETEZ(pGridItem);
//get the grid information
if(SfxItemState::DEFAULT <= rSet.GetItemState(RES_TEXTGRID, true))
- pGridItem = (SwTextGridItem*)static_cast<const SwTextGridItem&>(rSet.Get(RES_TEXTGRID)).Clone();
+ pGridItem = static_cast<SwTextGridItem*>(static_cast<const SwTextGridItem&>(rSet.Get(RES_TEXTGRID)).Clone());
if( SfxItemState::DEFAULT <= rSet.GetItemState( RES_FRAMEDIR, true ))
{
const SvxFrameDirectionItem& rDirItem =
- (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
+ static_cast<const SvxFrameDirectionItem&>(rSet.Get(RES_FRAMEDIR));
m_bVertical = rDirItem.GetValue() == FRMDIR_VERT_TOP_RIGHT||
rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT;
}
diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx
index 94e04b6599f5..3f040b844358 100644
--- a/sw/source/uibase/frmdlg/colmgr.cxx
+++ b/sw/source/uibase/frmdlg/colmgr.cxx
@@ -110,15 +110,15 @@ void SwColMgr::SetActualWidth(sal_uInt16 nW)
// ctor
SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) :
- aFmtCol((const SwFmtCol&)rSet.Get(RES_COL)),
+ aFmtCol(static_cast<const SwFmtCol&>(rSet.Get(RES_COL))),
nWidth(nActWidth)
{
if(nWidth == USHRT_MAX)
{
- nWidth = (sal_uInt16)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth();
+ nWidth = (sal_uInt16)static_cast<const SwFmtFrmSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth();
if (nWidth < MINLAY)
nWidth = USHRT_MAX;
- const SvxLRSpaceItem &rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
+ const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE));
nWidth = nWidth - (sal_uInt16)rLR.GetLeft();
nWidth = nWidth - (sal_uInt16)rLR.GetRight();
}
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index b4285c82731e..c455b0d48d7d 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -57,7 +57,7 @@ static sal_uInt16 aFrmMgrRange[] = {
// determine frame attributes via Shell
SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) :
- m_aSet( (SwAttrPool&)pSh->GetAttrPool(), aFrmMgrRange ),
+ m_aSet( static_cast<SwAttrPool&>(pSh->GetAttrPool()), aFrmMgrRange ),
m_pOwnSh( pSh ),
m_bAbsPos( false ),
m_bNewFrm( bNew ),
@@ -116,7 +116,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm()
const SfxPoolItem* pItem = 0;
if (m_aSet.GetItemState(FN_SET_FRM_NAME, false, &pItem) == SfxItemState::SET)
- m_pOwnSh->SetFlyName(((SfxStringItem *)pItem)->GetValue());
+ m_pOwnSh->SetFlyName(static_cast<const SfxStringItem *>(pItem)->GetValue());
m_pOwnSh->SetModified();
@@ -253,7 +253,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
// OD 18.09.2003 #i18732# - adjustment for allowing vertical position
// aligned to page for fly frame anchored to paragraph or to character.
const RndStdIds eAnchorType = static_cast<RndStdIds >(rVal.nAnchorType);
- const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)m_aSet.Get(RES_FRM_SIZE);
+ const SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>(m_aSet.Get(RES_FRM_SIZE));
m_pOwnSh->CalcBoundRect( aBoundRect, eAnchorType,
rVal.nHRelOrient,
rVal.nVRelOrient,
@@ -517,7 +517,7 @@ void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight )
{
OSL_ENSURE( LONG_MAX != nLeft && LONG_MAX != nRight, "Welchen Raend setzen?" );
- SvxLRSpaceItem aTmp( (SvxLRSpaceItem&)m_aSet.Get( RES_LR_SPACE ) );
+ SvxLRSpaceItem aTmp( static_cast<const SvxLRSpaceItem&>(m_aSet.Get( RES_LR_SPACE )) );
if( LONG_MAX != nLeft )
aTmp.SetLeft( sal_uInt16(nLeft) );
if( LONG_MAX != nRight )
@@ -529,7 +529,7 @@ void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom )
{
OSL_ENSURE(LONG_MAX != nTop && LONG_MAX != nBottom, "Welchen Raend setzen?" );
- SvxULSpaceItem aTmp( (SvxULSpaceItem&)m_aSet.Get( RES_UL_SPACE ) );
+ SvxULSpaceItem aTmp( static_cast<const SvxULSpaceItem&>(m_aSet.Get( RES_UL_SPACE )) );
if( LONG_MAX != nTop )
aTmp.SetUpper( sal_uInt16(nTop) );
if( LONG_MAX != nBottom )
diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx
index 5ff34cdcc378..73ebf0167287 100644
--- a/sw/source/uibase/inc/content.hxx
+++ b/sw/source/uibase/inc/content.hxx
@@ -48,9 +48,9 @@ class SwOutlineContent : public SwContent
SwContent(pCnt, rName, nYPos),
nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {}
- sal_uInt16 GetPos(){return nOutlinePos;}
- sal_uInt8 GetOutlineLevel(){return nOutlineLevel;}
- bool IsMoveable(){return bIsMoveable;};
+ sal_uInt16 GetPos() const {return nOutlinePos;}
+ sal_uInt8 GetOutlineLevel() const {return nOutlineLevel;}
+ bool IsMoveable() const {return bIsMoveable;};
};
class SwRegionContent : public SwContent
@@ -83,7 +83,7 @@ public:
{}
virtual bool IsProtect() const SAL_OVERRIDE;
- const OUString& GetURL() { return sURL; }
+ const OUString& GetURL() const { return sURL; }
const SwTxtINetFmt* GetINetAttr() { return pINetAttr; }
};
@@ -112,10 +112,10 @@ public:
, mbPostIt(false)
{}
- const SwFmtFld* GetPostIt() { return pFld; }
+ const SwFmtFld* GetPostIt() const { return pFld; }
SwRangeRedline* GetRedline() { return pRedline; }
virtual bool IsProtect() const SAL_OVERRIDE;
- bool IsPostIt() {return mbPostIt; }
+ bool IsPostIt() const {return mbPostIt; }
};
class SwGraphicContent : public SwContent
diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx
index 6ae6b7fb2b1e..466ca759f26c 100644
--- a/sw/source/uibase/inc/envlop.hxx
+++ b/sw/source/uibase/inc/envlop.hxx
@@ -98,7 +98,7 @@ class SwEnvPage : public SfxTabPage
void InitDatabaseBox();
- SwEnvDlg* GetParentSwEnvDlg() {return (SwEnvDlg*)GetParentDialog();}
+ SwEnvDlg* GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>(GetParentDialog());}
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx
index 2f8c56c3596a..9027732b0ada 100644
--- a/sw/source/uibase/inc/frmmgr.hxx
+++ b/sw/source/uibase/inc/frmmgr.hxx
@@ -149,7 +149,7 @@ inline const SwFmtVertOrient &SwFlyFrmAttrMgr::GetVertOrient() const
}
inline const SwFmtHoriOrient &SwFlyFrmAttrMgr::GetHoriOrient() const
{
- return ((SwFmtHoriOrient &)m_aSet.Get(RES_HORI_ORIENT));
+ return static_cast<const SwFmtHoriOrient &>(m_aSet.Get(RES_HORI_ORIENT));
}
inline const SwFmtFrmSize& SwFlyFrmAttrMgr::GetFrmSize() const
{
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index 12bb2111a2ce..3a230b940bc5 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -470,7 +470,7 @@ class SwTOXStylesTabPage : public SfxTabPage
SwForm& GetForm()
{
- SwMultiTOXTabDialog* pDlg = (SwMultiTOXTabDialog*)GetTabDialog();
+ SwMultiTOXTabDialog* pDlg = static_cast<SwMultiTOXTabDialog*>(GetTabDialog());
return *pDlg->GetForm(pDlg->GetCurrentTOXType());
}
diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx
index e18c4665d2fe..a1b1a21a712e 100644
--- a/sw/source/uibase/index/toxmgr.cxx
+++ b/sw/source/uibase/index/toxmgr.cxx
@@ -359,8 +359,8 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
//Special handling for TOX_AUTHORITY
if(TOX_AUTHORITIES == eCurTOXType)
{
- SwAuthorityFieldType* pFType = (SwAuthorityFieldType*)
- pSh->GetFldType(RES_AUTHORITY, aEmptyOUStr);
+ SwAuthorityFieldType* pFType = static_cast<SwAuthorityFieldType*>(
+ pSh->GetFldType(RES_AUTHORITY, aEmptyOUStr));
if (!pFType)
{
SwAuthorityFieldType const type(pSh->GetDoc());
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index 3061cb9b24c4..5314869113ef 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -503,7 +503,7 @@ void SwHHCWrapper::ReplaceUnit(
OSL_ENSURE( pTargetFont, "target font missing?" );
if (pTargetFont && pNewUnitLanguage)
{
- SvxFontItem aFontItem = (SvxFontItem&) aSet.Get( RES_CHRATR_CJK_FONT );
+ SvxFontItem aFontItem(static_cast<const SvxFontItem&>( aSet.Get( RES_CHRATR_CJK_FONT ) ));
aFontItem.SetFamilyName( pTargetFont->GetName());
aFontItem.SetFamily( pTargetFont->GetFamily());
aFontItem.SetStyleName( pTargetFont->GetStyleName());
diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx
index 31905b260106..fbbfd851d60b 100644
--- a/sw/source/uibase/misc/glshell.cxx
+++ b/sw/source/uibase/misc/glshell.cxx
@@ -81,9 +81,9 @@ static void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq )
}
else
{
- const SfxBoolItem* pRes = ( const SfxBoolItem* )
+ const SfxBoolItem* pRes = static_cast< const SfxBoolItem* >(
rSh.ExecuteSlot( rReq,
- rSh.SfxObjectShell::GetInterface() );
+ rSh.SfxObjectShell::GetInterface() ));
if( pRes->GetValue() )
rSh.GetDoc()->getIDocumentState().ResetModified();
}
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index 725198198fe3..e6eb6a82b6e7 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -116,7 +116,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
if(bInsert)
{
sal_Int32 nEntry = InsertEntry(rNames.GetString(i), nPos);
- SetEntryData( nEntry, (void*)nValue );
+ SetEntryData( nEntry, reinterpret_cast<void*>(nValue) );
}
}
if(0 != (nTypeFlags&INSERT_NUM_EXTENDED_TYPES) )
@@ -128,11 +128,11 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
sal_Int16 nCurrent = pTypes[nType];
if(nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N)
{
- if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(sal_uLong)nCurrent))
+ if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos(reinterpret_cast<void*>((sal_uLong)nCurrent)))
{
OUString aIdent = pImpl->xInfo->getNumberingIdentifier( nCurrent );
sal_Int32 nPos = InsertEntry(aIdent);
- SetEntryData(nPos,(void*)(sal_uLong)nCurrent);
+ SetEntryData(nPos, reinterpret_cast<void*>((sal_uLong)nCurrent));
}
}
}
@@ -146,7 +146,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
sal_Int16 nRet = 0;
sal_Int32 nSelPos = GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nSelPos)
- nRet = (sal_Int16)(sal_uLong)GetEntryData(nSelPos);
+ nRet = (sal_Int16)reinterpret_cast<sal_uLong>(GetEntryData(nSelPos));
#if OSL_DEBUG_LEVEL > 0
else
OSL_FAIL("SwNumberingTypeListBox not selected");
@@ -156,7 +156,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType)
{
- sal_Int32 nPos = GetEntryPos((void*)(sal_uLong)nType);
+ sal_Int32 nPos = GetEntryPos(reinterpret_cast<void*>((sal_uLong)nType));
SelectEntryPos( nPos );
return LISTBOX_ENTRY_NOTFOUND != nPos;
}
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 4610db7bc42e..b13e30d6561f 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -69,7 +69,7 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( vcl::Window* _pParent,
{
pWindow = new SwModelessRedlineAcceptDlg( pBindings, this, _pParent);
- ((SwModelessRedlineAcceptDlg *)pWindow)->Initialize(pInfo);
+ static_cast<SwModelessRedlineAcceptDlg *>(pWindow)->Initialize(pInfo);
}
// newly initialise dialog after document switch
diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx
index 10f85f6240de..cd520a19f67a 100644
--- a/sw/source/uibase/ribbar/concustomshape.cxx
+++ b/sw/source/uibase/ribbar/concustomshape.cxx
@@ -64,7 +64,7 @@ OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
if ( pArgs )
{
- const SfxStringItem& rItm = (const SfxStringItem&)pArgs->Get( rReq.GetSlot() );
+ const SfxStringItem& rItm = static_cast<const SfxStringItem&>(pArgs->Get( rReq.GetSlot() ));
aRet = rItm.GetValue();
}
return aRet;
diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx
index dc738b4346ee..a97bd3304c62 100644
--- a/sw/source/uibase/ribbar/conrect.cxx
+++ b/sw/source/uibase/ribbar/conrect.cxx
@@ -98,7 +98,7 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
}
else if(mbVertical && pObj && pObj->ISA(SdrTextObj))
{
- SdrTextObj* pText = (SdrTextObj*)pObj;
+ SdrTextObj* pText = static_cast<SdrTextObj*>(pObj);
SfxItemSet aSet(pSdrView->GetModel()->GetItemPool());
pText->SetVerticalWriting(true);
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index c453185db05e..e3a044ad1235 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -283,7 +283,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if(m_pWin->GetFrmColCount() > 1)
{
SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL);
- SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL));
+ SwFmtCol aCol(static_cast<const SwFmtCol&>(aSet.Get(RES_COL)));
aCol.Init(m_pWin->GetFrmColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth());
aSet.Put(aCol);
// Template AutoUpdate
diff --git a/sw/source/uibase/ribbar/tbxanchr.cxx b/sw/source/uibase/ribbar/tbxanchr.cxx
index 55af895c7d23..1b747b16daa9 100644
--- a/sw/source/uibase/ribbar/tbxanchr.cxx
+++ b/sw/source/uibase/ribbar/tbxanchr.cxx
@@ -87,7 +87,7 @@ void SwTbxAnchor::Click()
if(pViewFrame)
{
const TypeId aTypeId = TYPE(SwView);
- SwView* pView = (SwView*)SfxViewShell::GetFirst(&aTypeId);
+ SwView* pView = static_cast<SwView*>(SfxViewShell::GetFirst(&aTypeId));
while( pView )
{
if(pView->GetViewFrame() == pViewFrame)
@@ -95,7 +95,7 @@ void SwTbxAnchor::Click()
pActiveView = pView;
break;
}
- pView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId);
+ pView = static_cast<SwView*>(SfxViewShell::GetNext(*pView, &aTypeId));
}
}
if(!pActiveView)
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 1bdb608d7eb6..2f2a502fe5de 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -679,7 +679,7 @@ void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
{
sal_uInt16 nId = GetId();
GetToolBox().EnableItem( nId, (GetItemState(pState) != SfxItemState::DISABLED) );
- SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() );
+ SwZoomBox_Impl* pBox = static_cast<SwZoomBox_Impl*>(GetToolBox().GetItemWindow( GetId() ));
if(SfxItemState::DEFAULT <= eState)
{
OUString sZoom(unicode::formatPercent(static_cast<const SfxUInt16Item*>(pState)->GetValue(),