From 1f1c7a4b0d582dffa920c7a51a55ea32c4d203fe Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 24 Nov 2014 10:39:58 +0200 Subject: loplugin: cstylecast Change-Id: I74d655f24396c35305e90e26c91e45c6fc44df75 --- sw/source/ui/chrdlg/pardlg.cxx | 8 ++++---- sw/source/ui/chrdlg/swuiccoll.cxx | 2 +- sw/source/ui/config/optload.cxx | 6 +++--- sw/source/ui/config/optpage.cxx | 10 +++++----- sw/source/ui/dbui/mmoutputpage.cxx | 2 +- sw/source/ui/dialog/ascfldlg.cxx | 2 +- sw/source/ui/dialog/docstdlg.cxx | 4 ++-- sw/source/ui/dialog/macassgn.cxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 22 +++++++++++----------- sw/source/ui/envelp/envfmt.cxx | 4 ++-- sw/source/ui/envelp/envlop1.cxx | 4 ++-- sw/source/ui/envelp/label1.cxx | 6 +++--- sw/source/ui/envelp/labfmt.cxx | 2 +- sw/source/ui/fldui/flddb.cxx | 6 +++--- sw/source/ui/fldui/flddinf.cxx | 8 ++++---- sw/source/ui/fldui/flddok.cxx | 12 ++++++------ sw/source/ui/fldui/fldpage.cxx | 2 +- sw/source/ui/fldui/fldref.cxx | 2 +- sw/source/ui/fldui/fldvar.cxx | 24 ++++++++++++------------ sw/source/ui/fmtui/tmpdlg.cxx | 32 ++++++++++++++++---------------- sw/source/ui/frmdlg/cption.cxx | 4 ++-- sw/source/ui/frmdlg/frmdlg.cxx | 28 ++++++++++++++-------------- sw/source/ui/index/swuiidxmrk.cxx | 4 ++-- sw/source/ui/misc/docfnote.cxx | 4 ++-- sw/source/ui/misc/glossary.cxx | 2 +- sw/source/ui/misc/linenum.cxx | 2 +- sw/source/ui/misc/outline.cxx | 12 ++++++------ sw/source/ui/misc/pgfnote.cxx | 4 ++-- 28 files changed, 110 insertions(+), 110 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 3b007cabcc04..903ce472956f 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -218,7 +218,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) } else if( m_nParaDrpCps == nId ) { - ((SwDropCapsPage&)rPage).SetFormat(false); + static_cast(rPage).SetFormat(false); } else if( m_nParaBckGrnd == nId ) { @@ -241,11 +241,11 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) SwTxtFmtColl* pTmpColl = rSh.GetCurTxtFmtColl(); if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() ) { - ((SwParagraphNumTabPage&)rPage).DisableOutline() ; + static_cast(rPage).DisableOutline() ; } - ((SwParagraphNumTabPage&)rPage).EnableNewStart(); - ListBox & rBox = ((SwParagraphNumTabPage&)rPage).GetStyleBox(); + static_cast(rPage).EnableNewStart(); + ListBox & rBox = static_cast(rPage).GetStyleBox(); SfxStyleSheetBasePool* pPool = rView.GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SFX_STYLE_FAMILY_PSEUDO, SFXSTYLEBIT_ALL); const SfxStyleSheetBase* pBase = pPool->First(); diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 8891aff311fd..1cce4bc3ac11 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -183,7 +183,7 @@ void SwCondCollPage::Reset(const SfxItemSet *) const SwCollCondition* pCond = 0; if( pFmt && RES_CONDTXTFMTCOLL == pFmt->Which() && - 0 != ( pCond = ((SwConditionTxtFmtColl*)pFmt)-> + 0 != ( pCond = static_cast(pFmt)-> HasCondition( SwCollCondition( 0, pCmds[n].nCnd, pCmds[n].nSubCond ) ) ) && pCond->GetTxtFmtColl() ) { diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index fa84da7ba0fb..934988141b87 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -108,7 +108,7 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet) const SfxPoolItem* pItem; if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) - && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) + && static_cast(pItem)->GetValue() & HTMLMODE_ON) { m_pTabFT->Hide(); m_pTabMF->Hide(); @@ -297,7 +297,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) m_pMetricLB->SaveValue(); if(SfxItemState::SET == rSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem)) { - m_nLastTab = ((SfxUInt16Item*)pItem)->GetValue(); + m_nLastTab = static_cast(pItem)->GetValue(); m_pTabMF->SetValue(m_pTabMF->Normalize(m_nLastTab), FUNIT_TWIP); } m_pTabMF->SaveValue(); @@ -462,7 +462,7 @@ SwCaptionOptPage::SwCaptionOptPage( vcl::Window* pParent, const SfxItemSet& rSet pFldType = pMgr->GetFldType(USHRT_MAX, --i); if (pFldType->GetName().equals(m_pCategoryBox->GetText())) { - nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat(); + nSelFmt = (sal_uInt16)static_cast(pFldType)->GetSeqFormat(); break; } } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index cca1d2873316..c2b594be1144 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -102,7 +102,7 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, /* This part is visible only with Writer/Web->View dialogue. */ const SfxPoolItem* pItem; if (! (SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) - && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)) + && static_cast(pItem)->GetValue() & HTMLMODE_ON)) { m_pSettingsFrame->Hide(); m_pSettingsLabel->Hide(); @@ -169,7 +169,7 @@ static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemS const SfxPoolItem* pItem; if( rSet.GetItemState( nSID, false, &pItem ) >= SfxItemState::DEFAULT ) { - FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); + FieldUnit eFieldUnit = (FieldUnit)static_cast(pItem)->GetValue(); for ( sal_Int32 i = 0; i < rMetric->GetEntryCount(); ++i ) { if ( (int)(sal_IntPtr)rMetric->GetEntryData( i ) == (int)eFieldUnit ) @@ -339,7 +339,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(vcl::Window* pParent, const SfxPoolItem* pItem; if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem ) - && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) + && static_cast(pItem)->GetValue() & HTMLMODE_ON) { m_pLeftPageCB->Hide(); m_pRightPageCB->Hide(); @@ -1302,7 +1302,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent, m_pFillSpaceRB->Check( FILL_SPACE == eMode ); if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem ) - && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) + && static_cast(pItem)->GetValue() & HTMLMODE_ON) { m_pTabCB->Hide(); m_pCharHiddenCB->Hide(); @@ -1356,7 +1356,7 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet ) bool bRet = false; const SfxPoolItem* pItem = 0; if( SfxItemState::SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ) - || ((SwShadowCursorItem&)*pItem) != aOpt ) + || static_cast(*pItem) != aOpt ) { rSet->Put( aOpt ); bRet = true; diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 1cb5613982fa..51c5af60b19f 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1080,7 +1080,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SwAsciiOptions aOpt; sal_uInt16 nAppScriptType = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ); sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType); - aOpt.SetLanguage( ((SvxLanguageItem&)pTargetView->GetWrtShell(). + aOpt.SetLanguage( static_cast(pTargetView->GetWrtShell(). GetDefault( nWhich )).GetLanguage()); aOpt.SetParaFlags( LINEEND_CR ); aOpt.WriteUserData( sFilterOptions ); diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index d8e8f93a1517..90d09a5476a4 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -146,7 +146,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( vcl::Window* pParent, SwDocShell& rDocSh, if(pDoc) { const sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType); - aOpt.SetLanguage( ((SvxLanguageItem&)pDoc-> + aOpt.SetLanguage( static_cast(pDoc-> GetDefault( nWhich )).GetLanguage()); } else diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index d9760b6eb0ab..839bc69cce27 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -107,9 +107,9 @@ void SwDocStatPage::Update() SfxViewShell *pVSh = SfxViewShell::Current(); SwViewShell *pSh = 0; if ( pVSh->ISA(SwView) ) - pSh = ((SwView*)pVSh)->GetWrtShellPtr(); + pSh = static_cast(pVSh)->GetWrtShellPtr(); else if ( pVSh->ISA(SwPagePreview) ) - pSh = ((SwPagePreview*)pVSh)->GetViewShell(); + pSh = static_cast(pVSh)->GetViewShell(); OSL_ENSURE( pSh, "Shell not found" ); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 97b445e1a3c2..a6b99a8c8f8b 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -130,7 +130,7 @@ bool SwMacroAssignDlg::INetFmtDlg( vcl::Window* pParent, SwWrtShell& rSh, const SfxPoolItem* pItem; if( SfxItemState::SET == pOutSet->GetItemState( RES_FRMMACRO, false, &pItem )) { - rpINetItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() ); + rpINetItem->SetMacroTable( static_cast(pItem)->GetMacroTable() ); bRet = true; } } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 0f61d30b2f94..b0c0903db8ee 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1098,9 +1098,9 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) if( SfxItemState::SET == eEndState ) pRepr->GetEndNtAtEnd() = *(SwFmtEndAtTxtEnd*)pEndItem; if( SfxItemState::SET == eBalanceState ) - pRepr->GetBalance().SetValue(((SwFmtNoBalancedColumns*)pBalanceItem)->GetValue()); + pRepr->GetBalance().SetValue(static_cast(pBalanceItem)->GetValue()); if( SfxItemState::SET == eFrmDirState ) - pRepr->GetFrmDir().SetValue(((SvxFrameDirectionItem*)pFrmDirItem)->GetValue()); + pRepr->GetFrmDir().SetValue(static_cast(pFrmDirItem)->GetValue()); if( SfxItemState::SET == eLRState ) pRepr->GetLRSpace() = *(SvxLRSpaceItem*)pLRSpaceItem; @@ -1424,7 +1424,7 @@ SwInsertSectionTabDialog::~SwInsertSectionTabDialog() void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { if (nId == m_nSectionPageId) - ((SwInsertSectionTabPage&)rPage).SetWrtShell(rWrtSh); + static_cast(rPage).SetWrtShell(rWrtSh); else if (nId == m_nBackPageId) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); @@ -1434,12 +1434,12 @@ void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) else if (nId == m_nColumnPageId) { const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)GetInputSetImpl()->Get(RES_FRM_SIZE); - ((SwColumnPage&)rPage).SetPageWidth(rSize.GetWidth()); - ((SwColumnPage&)rPage).ShowBalance(true); - ((SwColumnPage&)rPage).SetInSection(true); + static_cast(rPage).SetPageWidth(rSize.GetWidth()); + static_cast(rPage).ShowBalance(true); + static_cast(rPage).SetInSection(true); } else if (nId == m_nIndentPage) - ((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh); + static_cast(rPage).SetWrtShell(rWrtSh); } void SwInsertSectionTabDialog::SetSectionData(SwSectionData const& rSect) @@ -1627,7 +1627,7 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet* ) FILE_LINK_SECTION); } } - ((SwInsertSectionTabDialog*)GetTabDialog())->SetSectionData(aSection); + static_cast(GetTabDialog())->SetSectionData(aSection); return true; } @@ -2076,11 +2076,11 @@ void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage } else if (nId == m_nColumnPageId) { - ((SwColumnPage&)rPage).ShowBalance(true); - ((SwColumnPage&)rPage).SetInSection(true); + static_cast(rPage).ShowBalance(true); + static_cast(rPage).SetInSection(true); } else if (nId == m_nIndentPage) - ((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh); + static_cast(rPage).SetWrtShell(rWrtSh); } SwSectionIndentTabPage::SwSectionIndentTabPage(vcl::Window *pParent, const SfxItemSet &rAttrSet) diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 627661d8c529..34179316f140 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -289,7 +289,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) aTmpSet.Put( aTabPos ); // left border as offset - const long nOff = ((SvxLRSpaceItem&)aTmpSet.Get( RES_LR_SPACE )). + const long nOff = static_cast(aTmpSet.Get( RES_LR_SPACE )). GetTxtLeft(); SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff ); aTmpSet.Put( aOff ); @@ -309,7 +309,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) if( SfxItemState::SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, false, &pItem ) && - nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) + nDefDist != (nNewDist = static_cast(pItem)->GetValue()) ) { SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); MakeDefTabs( nNewDist, aDefTabs ); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 5a34f29f61f5..0714f226f512 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -74,7 +74,7 @@ void SwEnvPreview::Paint(const Rectangle &) const StyleSettings& rSettings = GetSettings().GetStyleSettings(); const SwEnvItem& rItem = - ((SwEnvDlg*) GetParentDialog())->aEnvItem; + static_cast( GetParentDialog())->aEnvItem; const long nPageW = std::max(rItem.lWidth, rItem.lHeight); const long nPageH = std::min(rItem.lWidth, rItem.lHeight); @@ -161,7 +161,7 @@ void SwEnvDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { if (nId == m_nEnvPrintId) { - ((SwEnvPrtPage*)&rPage)->SetPrt(pPrinter); + static_cast(&rPage)->SetPrt(pPrinter); } } diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index a44e8509bdd1..fe1a7d6c1289 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -79,11 +79,11 @@ void SwLabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { if(m_bLabel) { - ((SwLabPage*)&rPage)->SetDBManager(pDBManager); - ((SwLabPage*)&rPage)->InitDatabaseBox(); + static_cast(&rPage)->SetDBManager(pDBManager); + static_cast(&rPage)->InitDatabaseBox(); } else - ((SwLabPage*)&rPage)->SetToBusinessCard(); + static_cast(&rPage)->SetToBusinessCard(); } else if (nId == m_nOptionsId) pPrtPage = (SwLabPrtPage*)&rPage; diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index dbc8d70c10da..8d9915f88a6d 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -379,7 +379,7 @@ IMPL_LINK_NOARG_INLINE_END(SwLabFmtPage, PreviewHdl) // LoseFocus-Handler: Update on change IMPL_LINK_INLINE_START( SwLabFmtPage, LoseFocusHdl, Control *, pControl ) { - if (((Edit*) pControl)->IsModified()) + if (static_cast( pControl)->IsModified()) PreviewHdl(0); return 0; } diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 556b69ada489..fb9d25e0508c 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -287,12 +287,12 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox ) OUString sColumnName; if (nTypeId == TYP_DBFLD) { - aData = ((SwDBField*)GetCurField())->GetDBData(); - sColumnName = ((SwDBFieldType*)GetCurField()->GetTyp())->GetColumnName(); + aData = static_cast(GetCurField())->GetDBData(); + sColumnName = static_cast(GetCurField()->GetTyp())->GetColumnName(); } else { - aData = ((SwDBNameInfField*)GetCurField())->GetDBData(pSh->GetDoc()); + aData = static_cast(GetCurField())->GetDBData(pSh->GetDoc()); } m_pDatabaseTLB->Select(aData.sDataSource, aData.sCommand, sColumnName); } diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 04d551ffda27..021e9ae6383d 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -109,7 +109,7 @@ void SwFldDokInfPage::Reset(const SfxItemSet* ) if (IsFldEdit()) { const SwField* pCurField = GetCurField(); - nSubType = ((SwDocInfoField*)pCurField)->GetSubType() & 0xff; + nSubType = static_cast(pCurField)->GetSubType() & 0xff; if( nSubType == DI_CUSTOM ) { m_sOldCustomFieldName = static_cast(pCurField)->GetName(); @@ -315,9 +315,9 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl) bEnable = true; } - sal_uLong nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0; + sal_uLong nFormat = IsFldEdit() ? static_cast(GetCurField())->GetFormat() : 0; - sal_uInt16 nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0; + sal_uInt16 nOldSubType = IsFldEdit() ? (static_cast(GetCurField())->GetSubType() & 0xff00) : 0; if (IsFldEdit()) { @@ -375,7 +375,7 @@ sal_Int32 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType) sal_uInt16 nSize = 0; sal_Int32 nSelPos = LISTBOX_ENTRY_NOTFOUND; - sal_uInt16 nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0; + sal_uInt16 nExtSubType = IsFldEdit() ? (static_cast(GetCurField())->GetSubType() & 0xff00) : 0; if (IsFldEdit()) { diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index f88813a687c0..fd26e987395f 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -243,9 +243,9 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) case TYP_TIMEFLD: nPos = m_pSelectionLB->InsertEntry(aLst[i]); m_pSelectionLB->SetEntryData(nPos, reinterpret_cast(i)); - if (((SwDateTimeField*)GetCurField())->IsFixed() && !i) + if (static_cast(GetCurField())->IsFixed() && !i) m_pSelectionLB->SelectEntryPos(nPos); - if (!((SwDateTimeField*)GetCurField())->IsFixed() && i) + if (!static_cast(GetCurField())->IsFixed() && i) m_pSelectionLB->SelectEntryPos(nPos); break; @@ -320,7 +320,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) m_pDateOffsetED->SetLast(31); if (IsFldEdit()) - m_pDateOffsetED->SetValue( ((SwDateTimeField*)GetCurField())->GetOffset() / 24 / 60); + m_pDateOffsetED->SetValue( static_cast(GetCurField())->GetOffset() / 24 / 60); break; case TYP_TIMEFLD: @@ -334,7 +334,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) m_pDateOffsetED->SetLast(1440); if (IsFldEdit()) - m_pDateOffsetED->SetValue( ((SwDateTimeField*)GetCurField())->GetOffset() ); + m_pDateOffsetED->SetValue( static_cast(GetCurField())->GetOffset() ); break; case TYP_PREVPAGEFLD: @@ -357,7 +357,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) m_pValueED->SetText(aEmptyOUStr); } else - m_pValueED->SetText(((SwPageNumberField*)GetCurField())->GetUserString()); + m_pValueED->SetText(static_cast(GetCurField())->GetUserString()); } bValue = true; break; @@ -365,7 +365,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl) case TYP_CHAPTERFLD: m_pValueFT->SetText(SW_RESSTR(STR_LEVEL)); if (IsFldEdit()) - m_pLevelED->SetText(OUString::number(((SwChapterField*)GetCurField())->GetLevel() + 1)); + m_pLevelED->SetText(OUString::number(static_cast(GetCurField())->GetLevel() + 1)); bLevel = true; break; diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index c5b2d204a083..adbf589c066b 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -194,7 +194,7 @@ bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUStrin aData.nCommandType = rPar1.getToken(0, DB_DELIM, nPos).toInt32(); sPar1 = rPar1.copy(nPos); - ((SwDBNameInfField*)pTmpFld)->SetDBData(aData); + static_cast(pTmpFld)->SetDBData(aData); } break; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 360c080c9a26..1fd8f07aa8c3 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -314,7 +314,7 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl) break; case REF_SEQUENCEFLD: - sName = ((SwGetRefField*)GetCurField())->GetSetRefName(); + sName = static_cast(GetCurField())->GetSetRefName(); nFlag = REFFLDFLAG; break; } diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 830bc1e14fcf..7f935c00ddd8 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -335,7 +335,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) // It must be used though because otherwise in GetPar2 only // the value calculated by Kalkulator would be displayed // (instead of test2 = test + 1) - m_pValueED->SetText(((SwSetExpField*)GetCurField())->GetFormula()); + m_pValueED->SetText(static_cast(GetCurField())->GetFormula()); } m_pValueED->SetDropEnable(true); break; @@ -422,7 +422,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) } } if (GetCurField() && IsFldEdit() && (!pBox || bInit) ) - m_pValueED->SetText(((SwSetExpField*)GetCurField())->GetPromptText()); + m_pValueED->SetText(static_cast(GetCurField())->GetPromptText()); } else // USERFLD bFormat = bNumFmt = false; @@ -476,7 +476,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) } if( GetCurField() && IsFldEdit() ) - m_pValueED->SetText( ((SwSetExpField*)GetCurField())-> + m_pValueED->SetText( static_cast(GetCurField())-> GetFormula() ); if( IsFldEdit() || pBox ) // only when interacting via mouse @@ -484,12 +484,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if( pFldTyp ) { - sal_uInt8 nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl(); + sal_uInt8 nLevel = static_cast(pFldTyp)->GetOutlineLvl(); if( 0x7f == nLevel ) m_pChapterLevelLB->SelectEntryPos( 0 ); else m_pChapterLevelLB->SelectEntryPos( nLevel + 1 ); - OUString sDelim = ((SwSetExpFieldType*)pFldTyp)->GetDelimiter(); + OUString sDelim = static_cast(pFldTyp)->GetDelimiter(); m_pSeparatorED->SetText( sDelim ); ChapterHdl(); } @@ -508,7 +508,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) { bValue = true; // SubType OFF - knows no Offset if (GetCurField() && IsFldEdit()) - m_pValueED->SetText(OUString::number(((SwRefPageSetField*)GetCurField())->GetOffset())); + m_pValueED->SetText(OUString::number(static_cast(GetCurField())->GetOffset())); } } break; @@ -627,8 +627,8 @@ void SwFldVarPage::UpdateSubType() case TYP_SETREFPAGEFLD: { if (GetCurField() != NULL - && ((((SwRefPageSetField*)GetCurField())->IsOn() - && i) || (!((SwRefPageSetField*)GetCurField()) + && ((static_cast(GetCurField())->IsOn() + && i) || (!static_cast(GetCurField()) ->IsOn() && !i))) { sOldSel = aList[i]; @@ -1008,8 +1008,8 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) // that nFmt = SwValueField::GetSystemFormat(pSh->GetNumberFormatter(), nFmt); } - ((SwUserFieldType*)pType)->SetContent(m_pValueED->GetText(), nFmt); - ((SwUserFieldType*)pType)->SetType( + static_cast(pType)->SetContent(m_pValueED->GetText(), nFmt); + static_cast(pType)->SetType( nNumFormatPos == 0 ? nsSwGetSetExpType::GSE_STRING : nsSwGetSetExpType::GSE_EXPR ); } } @@ -1022,8 +1022,8 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox ) sal_Int32 nTmpPos = 0; sValue = sValue.replaceFirst( " ", OUString(sfx2::cTokenSeparator), &nTmpPos ); sValue = sValue.replaceFirst( " ", OUString(sfx2::cTokenSeparator), &nTmpPos ); - ((SwDDEFieldType*)pType)->SetCmd(sValue); - ((SwDDEFieldType*)pType)->SetType((sal_uInt16)nFormat); + static_cast(pType)->SetCmd(sValue); + static_cast(pType)->SetType((sal_uInt16)nFormat); } } pType->UpdateFlds(); diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 998e0d1ee43e..dd3e8d72d601 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -211,7 +211,7 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent, m_nConditionId = AddTabPage("condition", SwCondCollPage::Create, SwCondCollPage::GetRanges ); - if( (!bNewStyle && RES_CONDTXTFMTCOLL != ((SwDocStyleSheet&)rBase).GetCollection()->Which()) + if( (!bNewStyle && RES_CONDTXTFMTCOLL != static_cast(rBase).GetCollection()->Which()) || nHtmlMode & HTMLMODE_ON ) RemoveTabPage("condition"); @@ -351,7 +351,7 @@ short SwTemplateDlg::Ok() *pExItem != *pOutItem )) { if( GetOutputItemSet() ) - ((SfxItemSet*)GetOutputItemSet())->Put( *pExItem ); + const_cast(GetOutputItemSet())->Put( *pExItem ); else nRet = RET_CANCEL; } @@ -435,10 +435,10 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SwTxtFmtColl* pTmpColl = pWrtShell->FindTxtFmtCollByName( GetStyleSheet().GetName() ); if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() ) { - ((SwParagraphNumTabPage&)rPage).DisableOutline() ; - ((SwParagraphNumTabPage&)rPage).DisableNumbering(); + static_cast(rPage).DisableOutline() ; + static_cast(rPage).DisableNumbering(); }//<-end - ListBox & rBox = ((SwParagraphNumTabPage&)rPage).GetStyleBox(); + ListBox & rBox = static_cast(rPage).GetStyleBox(); SfxStyleSheetBasePool* pPool = pWrtShell->GetView().GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SFX_STYLE_FAMILY_PSEUDO, SFXSTYLEBIT_ALL); const SfxStyleSheetBase* pBase = pPool->First(); @@ -458,23 +458,23 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nTypeId) { - ((SwFrmPage&)rPage).SetNewFrame( true ); - ((SwFrmPage&)rPage).SetFormatUsed( true ); + static_cast(rPage).SetNewFrame( true ); + static_cast(rPage).SetFormatUsed( true ); } else if (nId == m_nOptionsId) { - ((SwFrmAddPage&)rPage).SetFormatUsed(true); - ((SwFrmAddPage&)rPage).SetNewFrame(true); + static_cast(rPage).SetFormatUsed(true); + static_cast(rPage).SetNewFrame(true); } else if (nId == m_nWrapId) { - ((SwWrapTabPage&)rPage).SetFormatUsed( true, false ); + static_cast(rPage).SetFormatUsed( true, false ); } else if (nId == m_nColumnId) { if( nType == SFX_STYLE_FAMILY_FRAME ) - ((SwColumnPage&)rPage).SetFrmMode(true); - ((SwColumnPage&)rPage).SetFormatUsed( true ); + static_cast(rPage).SetFrmMode(true); + static_cast(rPage).SetFormatUsed( true ); } //UUUU do not remove; many other style dialog combinations still use the SfxTabPage // for the SvxBrushItem (see RID_SVXPAGE_BACKGROUND) @@ -492,8 +492,8 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nConditionId) { - ((SwCondCollPage&)rPage).SetCollection( - ((SwDocStyleSheet&)GetStyleSheet()).GetCollection(), bNewStyle ); + static_cast(rPage).SetCollection( + static_cast(GetStyleSheet()).GetCollection(), bNewStyle ); } else if (nId == m_nPageId) { @@ -573,7 +573,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { if(0 == (nHtmlMode & HTMLMODE_ON )) { - ((SvxHeaderPage&)rPage).EnableDynamicSpacing(); + static_cast(rPage).EnableDynamicSpacing(); } //UUUU set DrawingLayer FillStyles active @@ -584,7 +584,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { if(0 == (nHtmlMode & HTMLMODE_ON )) { - ((SvxFooterPage&)rPage).EnableDynamicSpacing(); + static_cast(rPage).EnableDynamicSpacing(); } //UUUU set DrawingLayer FillStyles active diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 93424cf6fcc7..2ee98b0f4c66 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -210,7 +210,7 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : pFldType = pMgr->GetFldType(USHRT_MAX, --i); if( pFldType->GetName().equals(m_pCategoryBox->GetText()) ) { - nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat(); + nSelFmt = (sal_uInt16)static_cast(pFldType)->GetSeqFormat(); break; } } @@ -321,7 +321,7 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl) : 0; m_pOKButton->Enable( bCorrectFldName && (!pType || - ((SwSetExpFieldType*)pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) ); + static_cast(pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) ); m_pOptionButton->Enable( m_pOKButton->IsEnabled() && !bNone ); m_pNumberingSeparatorFT->Enable( bOrderNumberingFirst && !bNone ); m_pNumberingSeparatorED->Enable( bOrderNumberingFirst && !bNone ); diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index ca6f722e8a95..19e074decfb0 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -61,7 +61,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, , m_bNew(bNewFrm) , m_rSet(rCoreSet) , m_sDlgType(sResType) - , m_pWrtShell(((SwView*)pViewFrame->GetViewShell())->GetWrtShellPtr()) + , m_pWrtShell(static_cast(pViewFrame->GetViewShell())->GetWrtShellPtr()) , m_nStdId(0) , m_nAddId(0) , m_nWrapId(0) @@ -146,31 +146,31 @@ void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if (nId == m_nStdId) { - ((SwFrmPage&)rPage).SetNewFrame(m_bNew); - ((SwFrmPage&)rPage).SetFormatUsed(m_bFormat); - ((SwFrmPage&)rPage).SetFrmType(m_sDlgType); + static_cast(rPage).SetNewFrame(m_bNew); + static_cast(rPage).SetFormatUsed(m_bFormat); + static_cast(rPage).SetFrmType(m_sDlgType); } else if (nId == m_nAddId) { - ((SwFrmAddPage&)rPage).SetFormatUsed(m_bFormat); - ((SwFrmAddPage&)rPage).SetFrmType(m_sDlgType); - ((SwFrmAddPage&)rPage).SetNewFrame(m_bNew); - ((SwFrmAddPage&)rPage).SetShell(m_pWrtShell); + static_cast(rPage).SetFormatUsed(m_bFormat); + static_cast(rPage).SetFrmType(m_sDlgType); + static_cast(rPage).SetNewFrame(m_bNew); + static_cast(rPage).SetShell(m_pWrtShell); } else if (nId == m_nWrapId) { - ((SwWrapTabPage&)rPage).SetNewFrame(m_bNew); - ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, false); - ((SwWrapTabPage&)rPage).SetShell(m_pWrtShell); + static_cast(rPage).SetNewFrame(m_bNew); + static_cast(rPage).SetFormatUsed(m_bFormat, false); + static_cast(rPage).SetShell(m_pWrtShell); } else if (nId == m_nColumnId) { - ((SwColumnPage&)rPage).SetFrmMode(true); - ((SwColumnPage&)rPage).SetFormatUsed(m_bFormat); + static_cast(rPage).SetFrmMode(true); + static_cast(rPage).SetFormatUsed(m_bFormat); const SwFmtFrmSize& rSize = (const SwFmtFrmSize&) m_rSet.Get( RES_FRM_SIZE ); - ((SwColumnPage&)rPage).SetPageWidth( rSize.GetWidth() ); + static_cast(rPage).SetPageWidth( rSize.GetWidth() ); } else if (nId == m_nMacroId) { diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 1daede431e21..5cf90a486e9b 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1397,8 +1397,8 @@ void SwAuthorMarkPane::InitControls() if(bNewEntry || !pField || pField->GetTyp()->Which() != RES_AUTHORITY) return; - const SwAuthEntry* pEntry = ((SwAuthorityFieldType*)pField->GetTyp())-> - GetEntryByHandle(((SwAuthorityField*)pField)->GetHandle()); + const SwAuthEntry* pEntry = static_cast(pField->GetTyp())-> + GetEntryByHandle(static_cast(pField)->GetHandle()); OSL_ENSURE(pEntry, "No authority entry found"); if(!pEntry) diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 74188d14fa7f..b938a07761fe 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -53,7 +53,7 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg(vcl::Window *pParent, SwWrtShell &rS) void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage ) { - ((SwEndNoteOptionPage&)rPage).SetShell( rSh ); + static_cast(rPage).SetShell( rSh ); } IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn ) @@ -339,7 +339,7 @@ static SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFmtNa pBase = pPool->Find(rCharFmtName, SFX_STYLE_FAMILY_CHAR); if(!pBase) pBase = &pPool->Make(rCharFmtName, SFX_STYLE_FAMILY_CHAR); - pFmt = ((SwDocStyleSheet*)pBase)->GetCharFmt(); + pFmt = static_cast(pBase)->GetCharFmt(); } return pFmt; } diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 179c64a5693f..f5f1d18cb707 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -530,7 +530,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) if ( pMacroDlg && pMacroDlg->Execute() == RET_OK && SfxItemState::SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) ) { - const SvxMacroTableDtor& rTbl = ((SvxMacroItem*)pItem)->GetMacroTable(); + const SvxMacroTableDtor& rTbl = static_cast(pItem)->GetMacroTable(); pGlossaryHdl->SetMacros( m_pShortNameEdit->GetText(), rTbl.Get( SW_EVENT_START_INS_GLOSSARY ), rTbl.Get( SW_EVENT_END_INS_GLOSSARY ) ); diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index b28b2a754bfb..e4f86d4dc293 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -185,7 +185,7 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl) pBase = pPool->Find(sCharFmtName, SFX_STYLE_FAMILY_CHAR); if(!pBase) pBase = &pPool->Make(sCharFmtName, SFX_STYLE_FAMILY_CHAR); - pCharFmt = ((SwDocStyleSheet*)pBase)->GetCharFmt(); + pCharFmt = static_cast(pBase)->GetCharFmt(); } if (pCharFmt) diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 5b52fc15227d..930c73726911 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -200,12 +200,12 @@ void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) { if (nPageId == m_nNumPosId) { - ((SwNumPositionTabPage&)rPage).SetWrtShell(&rWrtSh); - ((SwNumPositionTabPage&)rPage).SetOutlineTabDialog(this); + static_cast(rPage).SetWrtShell(&rWrtSh); + static_cast(rPage).SetOutlineTabDialog(this); } else if (nPageId == m_nOutlineId) { - ((SwOutlineSettingsTabPage&)rPage).SetWrtShell(&rWrtSh); + static_cast(rPage).SetWrtShell(&rWrtSh); } } @@ -717,7 +717,7 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFmtHdl) pBase = pPool->Find(sEntry, SFX_STYLE_FAMILY_CHAR); if(!pBase) pBase = &pPool->Make(sEntry, SFX_STYLE_FAMILY_PAGE); - pFmt = ((SwDocStyleSheet*)pBase)->GetCharFmt(); + pFmt = static_cast(pBase)->GetCharFmt(); } } @@ -746,8 +746,8 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) { pSh = pShell; // query this document's NumRules - pNumRule = ((SwOutlineTabDialog*)GetTabDialog())->GetNumRule(); - pCollNames = ((SwOutlineTabDialog*)GetTabDialog())->GetCollNames(); + pNumRule = static_cast(GetTabDialog())->GetNumRule(); + pCollNames = static_cast(GetTabDialog())->GetCollNames(); m_pPreviewWIN->SetNumRule(pNumRule); m_pPreviewWIN->SetOutlineNames(pCollNames); diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index e81e2c34d6f4..bf3632ed2dbb 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -310,7 +310,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) const SfxPoolItem* pItem; if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) ) { - const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); + const SfxItemSet& rHeaderSet = static_cast(pItem)->GetItemSet(); const SfxBoolItem& rHeaderOn = (const SfxBoolItem&)rHeaderSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) ); @@ -325,7 +325,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET), false, &pItem ) ) { - const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); + const SfxItemSet& rFooterSet = static_cast(pItem)->GetItemSet(); const SfxBoolItem& rFooterOn = (const SfxBoolItem&)rFooterSet.Get( SID_ATTR_PAGE_ON ); -- cgit v1.2.3