diff options
-rw-r--r-- | sw/source/ui/chrdlg/chardlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/drpcps.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/numpara.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/tblnumfm.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/config/optload.cxx | 28 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 42 | ||||
-rw-r--r-- | sw/source/ui/dialog/docstdlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dialog/macassgn.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/uiregionsw.cxx | 26 | ||||
-rw-r--r-- | sw/source/ui/envelp/envfmt.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/envelp/envfmt.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/envelp/envlop1.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/envelp/envprt.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/envelp/envprt.hxx | 3 | ||||
-rw-r--r-- | sw/source/ui/envelp/label1.cxx | 22 | ||||
-rw-r--r-- | sw/source/ui/envelp/labfmt.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/envelp/labfmt.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/envelp/labprt.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/envelp/swuilabimp.hxx | 2 |
20 files changed, 91 insertions, 90 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 63d82606d06d..f2f19afc0174 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -103,7 +103,7 @@ void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if (nId == m_nCharStdId) { - SvxFontListItem aFontListItem( *( (SvxFontListItem*) + SvxFontListItem aFontListItem( *static_cast<const SvxFontListItem*>( ( m_rView.GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) ) ); aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); if(m_nDialogMode != DLG_CHAR_DRAW && m_nDialogMode != DLG_CHAR_ANN) @@ -193,7 +193,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) const SfxPoolItem* pItem; if ( SfxItemState::SET == rSet->GetItemState( RES_TXTATR_INETFMT, false, &pItem ) ) { - const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*) pItem; + const SwFmtINetFmt* pINetFmt = static_cast<const SwFmtINetFmt*>( pItem); m_pURLED->SetText(INetURLObject::decode(pINetFmt->GetValue(), '%', INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8)); diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 0dd86918c4e3..a27d739c6efb 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -247,7 +247,7 @@ void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _ { SfxItemSet aSet( _rPage.rSh.GetAttrPool(), _nWhich, _nWhich); _rPage.rSh.GetCurAttr(aSet); - SvxFontItem aFmtFont((SvxFontItem &) aSet.Get(_nWhich)); + SvxFontItem aFmtFont(static_cast<const SvxFontItem &>( aSet.Get(_nWhich))); _rFont.SetFamily (aFmtFont.GetFamily()); _rFont.SetName (aFmtFont.GetFamilyName()); @@ -509,7 +509,7 @@ void SwDropCapsPict::_InitPrinter() SwDropCapsDlg::SwDropCapsDlg(vcl::Window *pParent, const SfxItemSet &rSet ) : SfxSingleTabDialog(pParent, rSet) { - SwDropCapsPage* pNewPage = (SwDropCapsPage*) SwDropCapsPage::Create(get_content_area(), &rSet); + SwDropCapsPage* pNewPage = static_cast<SwDropCapsPage*>( SwDropCapsPage::Create(get_content_area(), &rSet)); pNewPage->SetFormat(false); SetTabPage(pNewPage); } @@ -591,7 +591,7 @@ bool SwDropCapsPage::FillItemSet(SfxItemSet *rSet) void SwDropCapsPage::Reset(const SfxItemSet *rSet) { // Characters, lines, gap and text - SwFmtDrop aFmtDrop((SwFmtDrop &) rSet->Get(RES_PARATR_DROP)); + SwFmtDrop aFmtDrop(static_cast<const SwFmtDrop &>( rSet->Get(RES_PARATR_DROP))); if (aFmtDrop.GetLines() > 1) { m_pDropCapsField->SetValue(aFmtDrop.GetChars()); diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 5fbe842596d0..a13ca013826f 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -106,10 +106,10 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) if( m_pOutlineLvLB->IsValueChangedFromSaved()) { const sal_uInt16 aOutlineLv = m_pOutlineLvLB->GetSelectEntryPos(); - const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( *rSet, SID_ATTR_PARA_OUTLINE_LEVEL); + const SfxUInt16Item* pOldOutlineLv = static_cast<const SfxUInt16Item*>(GetOldItem( *rSet, SID_ATTR_PARA_OUTLINE_LEVEL)); if (pOldOutlineLv) { - SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone(); + SfxUInt16Item* pOutlineLv = static_cast<SfxUInt16Item*>(pOldOutlineLv->Clone()); pOutlineLv->SetValue( aOutlineLv ); rSet->Put(*pOutlineLv); delete pOutlineLv; @@ -122,8 +122,8 @@ bool SwParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) OUString aStyle; if(m_pNumberStyleLB->GetSelectEntryPos()) aStyle = m_pNumberStyleLB->GetSelectEntry(); - const SfxStringItem* pOldRule = (const SfxStringItem*)GetOldItem( *rSet, SID_ATTR_PARA_NUMRULE); - SfxStringItem* pRule = pOldRule ? (SfxStringItem*)pOldRule->Clone() : NULL; + const SfxStringItem* pOldRule = static_cast<const SfxStringItem*>(GetOldItem( *rSet, SID_ATTR_PARA_NUMRULE)); + SfxStringItem* pRule = pOldRule ? static_cast<SfxStringItem*>(pOldRule->Clone()) : NULL; if (pRule) { pRule->SetValue(aStyle); @@ -207,7 +207,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) if(eItemState > SfxItemState::DEFAULT ) { bCurNumrule = true; - const SfxBoolItem& rStart = (const SfxBoolItem&)rSet->Get(FN_NUMBER_NEWSTART); + const SfxBoolItem& rStart = static_cast<const SfxBoolItem&>(rSet->Get(FN_NUMBER_NEWSTART)); m_pNewStartCB->SetState(rStart.GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); @@ -235,7 +235,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet ) StyleHdl_Impl(m_pNumberStyleLB); if( SfxItemState::DEFAULT <= rSet->GetItemState(RES_LINENUMBER)) { - SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet->Get(RES_LINENUMBER); + const SwFmtLineNumber& rNum = static_cast<const SwFmtLineNumber&>(rSet->Get(RES_LINENUMBER)); sal_uLong nStartValue = rNum.GetStartValue(); bool bCount = rNum.IsCount(); m_pCountParaCB->SetState( bCount ? TRISTATE_TRUE : TRISTATE_FALSE ); diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx index 77031502a2ce..e3244f3320a0 100644 --- a/sw/source/ui/chrdlg/tblnumfm.cxx +++ b/sw/source/ui/chrdlg/tblnumfm.cxx @@ -42,7 +42,7 @@ SwNumFmtDlg::SwNumFmtDlg(vcl::Window* pParent, const SfxItemSet& rSet) { SfxTabPage* pNewPage = (*fnCreatePage)( get_content_area(), &rSet ); SfxAllItemSet aSet(*(rSet.GetPool())); - aSet.Put ( SvxNumberInfoItem( (const SvxNumberInfoItem&)pNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO ))); + aSet.Put ( SvxNumberInfoItem( static_cast<const SvxNumberInfoItem&>(pNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO )))); pNewPage->PageCreated(aSet); SetTabPage(pNewPage); } diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 29d8a8bbc6b4..2006fd56f802 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -192,7 +192,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) const SfxPoolItem* pItem = NULL; SfxObjectShell* pObjShell = NULL; if ( SfxItemState::SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) ) - m_pWrtShell = (SwWrtShell*)( (const SwPtrItem*)pItem )->GetValue(); + m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue()); if ( m_pWrtShell ) { pObjShell = m_pWrtShell->GetView().GetDocShell(); @@ -292,7 +292,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) bUseOurTabStops, bNoExtLeading, bUseLineSpacing, bAddTableSpacing, bUseObjPos, bUseOurTextWrapping, bConsiderWrappingStyle, bExpandWordSpace ); - m_pFormattingLB->SetEntryData( nPos, (void*)(sal_IntPtr)nOptions ); + m_pFormattingLB->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)nOptions) ); } m_pFormattingLB->SetDropDownLineCount( m_pFormattingLB->GetEntryCount() ); @@ -301,7 +301,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl) { const sal_Int32 nPos = m_pFormattingLB->GetSelectEntryPos(); - sal_uLong nOptions = (sal_uLong)(void*)m_pFormattingLB->GetEntryData( nPos ); + sal_uLong nOptions = reinterpret_cast<sal_uLong>((void*)m_pFormattingLB->GetEntryData( nPos )); SetCurrentOptions( nOptions ); return 0; diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 57871047c656..b9cb0293d02f 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -99,7 +99,7 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet) { // use only these metrics sal_Int32 nPos = m_pMetricLB->InsertEntry( sMetric ); - m_pMetricLB->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit ); + m_pMetricLB->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)eFUnit) ); } default:; //prevent warning } @@ -178,7 +178,7 @@ bool SwLoadOptPage::FillItemSet( SfxItemSet* rSet ) if ( m_pMetricLB->IsValueChangedFromSaved() ) { // Double-Cast for VA3.0 - const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos ); + const sal_uInt16 nFieldUnit = (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pMetricLB->GetEntryData( nMPos )); rSet->Put( SfxUInt16Item( SID_ATTR_METRIC, nFieldUnit ) ); bRet = true; } @@ -281,12 +281,12 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet) m_pMetricLB->SetNoSelection(); if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT ) { - const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet->Get( SID_ATTR_METRIC ); + const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(rSet->Get( SID_ATTR_METRIC )); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); for ( sal_Int32 i = 0; i < m_pMetricLB->GetEntryCount(); ++i ) { - if ( (int)(sal_IntPtr)m_pMetricLB->GetEntryData( i ) == (int)eFieldUnit ) + if ( (int)reinterpret_cast<sal_IntPtr>(m_pMetricLB->GetEntryData( i )) == (int)eFieldUnit ) { m_pMetricLB->SelectEntryPos( i ); break; @@ -336,7 +336,7 @@ IMPL_LINK_NOARG(SwLoadOptPage, MetricHdl) if(nMPos != LISTBOX_ENTRY_NOTFOUND) { // Double-Cast for VA3.0 - FieldUnit eFieldUnit = (FieldUnit)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos ); + FieldUnit eFieldUnit = (FieldUnit)reinterpret_cast<sal_IntPtr>(m_pMetricLB->GetEntryData( nMPos )); bool bModified = m_pTabMF->IsModified(); long nVal = bModified ? sal::static_int_cast<sal_Int32, sal_Int64 >( m_pTabMF->Denormalize( m_pTabMF->GetValue( FUNIT_TWIP ) )) : @@ -488,8 +488,8 @@ SwCaptionOptPage::SwCaptionOptPage( vcl::Window* pParent, const SfxItemSet& rSet if (pSh) { - SwSetExpFieldType* pFldType = (SwSetExpFieldType*)pMgr->GetFldType( - RES_SETEXPFLD, m_pCategoryBox->GetText() ); + SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>(pMgr->GetFldType( + RES_SETEXPFLD, m_pCategoryBox->GetText() )); if( pFldType ) { sDelim = pFldType->GetDelimiter(); @@ -659,7 +659,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl) { SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i ); if( pType->Which() == RES_SETEXPFLD && - ((SwSetExpFieldType *) pType)->GetType() & nsSwGetSetExpType::GSE_SEQ ) + static_cast<SwSetExpFieldType *>( pType)->GetType() & nsSwGetSetExpType::GSE_SEQ ) m_pCategoryBox->InsertSwEntry(SwBoxEntry(pType->GetName())); } } @@ -693,7 +693,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl) for (sal_Int32 i = 0; i < m_pFormatBox->GetEntryCount(); i++) { - if (pOpt->GetNumType() == (sal_uInt16)(sal_uLong)m_pFormatBox->GetEntryData(i)) + if (pOpt->GetNumType() == (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetEntryData(i))) { m_pFormatBox->SelectEntryPos(i); break; @@ -761,7 +761,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry) pOpt->SetCategory(""); else pOpt->SetCategory(comphelper::string::strip(aName, ' ')); - pOpt->SetNumType((sal_uInt16)(sal_uLong)m_pFormatBox->GetEntryData(m_pFormatBox->GetSelectEntryPos())); + pOpt->SetNumType((sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetEntryData(m_pFormatBox->GetSelectEntryPos()))); pOpt->SetCaption(m_pTextEdit->IsEnabled() ? m_pTextEdit->GetText() : OUString() ); pOpt->SetPos(m_pPosBox->GetSelectEntryPos()); sal_Int32 nPos = m_pLbLevel->GetSelectEntryPos(); @@ -829,8 +829,8 @@ void SwCaptionOptPage::DrawSample() //#i61007# order of captions bool bOrderNumberingFirst = m_pLbCaptionOrder->GetSelectEntryPos() == 1; // number - const sal_uInt16 nNumFmt = (sal_uInt16)(sal_uLong)m_pFormatBox->GetEntryData( - m_pFormatBox->GetSelectEntryPos() ); + const sal_uInt16 nNumFmt = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetEntryData( + m_pFormatBox->GetSelectEntryPos() )); if( SVX_NUM_NUMBER_NONE != nNumFmt ) { //#i61007# order of captions @@ -843,8 +843,8 @@ void SwCaptionOptPage::DrawSample() SwWrtShell *pSh = ::GetActiveWrtShell(); if (pSh) { - SwSetExpFieldType* pFldType = (SwSetExpFieldType*)pMgr->GetFldType( - RES_SETEXPFLD, m_pCategoryBox->GetText() ); + SwSetExpFieldType* pFldType = static_cast<SwSetExpFieldType*>(pMgr->GetFldType( + RES_SETEXPFLD, m_pCategoryBox->GetText() )); if( pFldType && pFldType->GetOutlineLvl() < MAXLEVEL ) { sal_uInt8 nLvl = pFldType->GetOutlineLvl(); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 3e6529482b54..1a3dad150388 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -138,15 +138,15 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, if ( eFUnit != FUNIT_LINE ) { sal_Int32 nPos = m_pMetricLB->InsertEntry( sMetric ); - m_pMetricLB->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit ); + m_pMetricLB->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)eFUnit) ); m_pHMetric->InsertEntry( sMetric ); - m_pHMetric->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit ); + m_pHMetric->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)eFUnit) ); } // a vertical ruler has not the 'character' unit if ( eFUnit != FUNIT_CHAR ) { sal_Int32 nPos = m_pVMetric->InsertEntry( sMetric ); - m_pVMetric->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit ); + m_pVMetric->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)eFUnit) ); } } default:;//prevent warning @@ -172,7 +172,7 @@ static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemS FieldUnit eFieldUnit = (FieldUnit)static_cast<const SfxUInt16Item*>(pItem)->GetValue(); for ( sal_Int32 i = 0; i < rMetric->GetEntryCount(); ++i ) { - if ( (int)(sal_IntPtr)rMetric->GetEntryData( i ) == (int)eFieldUnit ) + if ( (int)reinterpret_cast<sal_IntPtr>(rMetric->GetEntryData( i )) == (int)eFieldUnit ) { rMetric->SelectEntryPos( i ); break; @@ -213,8 +213,8 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet) bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) { - const SwElemItem* pOldAttr = (const SwElemItem*) - GetOldItem(GetItemSet(), FN_PARAM_ELEM); + const SwElemItem* pOldAttr = static_cast<const SwElemItem*>( + GetOldItem(GetItemSet(), FN_PARAM_ELEM)); SwElemItem aElem; if(pOldAttr) @@ -242,7 +242,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) if ( m_pMetricLB->IsValueChangedFromSaved() ) { // Double-Cast for VA3.0 - const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos ); + const sal_uInt16 nFieldUnit = (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pMetricLB->GetEntryData( nMPos )); rSet->Put( SfxUInt16Item( SID_ATTR_METRIC, nFieldUnit ) ); bRet = true; } @@ -251,7 +251,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) if ( m_pHMetric->IsValueChangedFromSaved() || nMPos != nGlobalMetricPos ) { // Double-Cast for VA3.0 - const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pHMetric->GetEntryData( nMPos ); + const sal_uInt16 nFieldUnit = (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pHMetric->GetEntryData( nMPos )); rSet->Put( SfxUInt16Item( FN_HSCROLL_METRIC, nFieldUnit ) ); bRet = true; } @@ -259,7 +259,7 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) if ( m_pVMetric->IsValueChangedFromSaved() || nMPos != nGlobalMetricPos ) { // Double-Cast for VA3.0 - const sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pVMetric->GetEntryData( nMPos ); + const sal_uInt16 nFieldUnit = (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pVMetric->GetEntryData( nMPos )); rSet->Put( SfxUInt16Item( FN_VSCROLL_METRIC, nFieldUnit ) ); bRet = true; } @@ -860,7 +860,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) const sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE : FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE ); - const SvxFontHeightItem& rFontHeightStandard = (const SvxFontHeightItem& )pColl->GetFmtAttr(nFontHeightWhich); + const SvxFontHeightItem& rFontHeightStandard = static_cast<const SvxFontHeightItem& >(pColl->GetFmtAttr(nFontHeightWhich)); nStandardHeight = (sal_Int32)rFontHeightStandard.GetHeight(); pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_HEADLINE_BASE); @@ -868,7 +868,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellTitle = sOutBackup = rFontHL.GetFamilyName(); - const SvxFontHeightItem& rFontHeightTitle = (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, true ); + const SvxFontHeightItem& rFontHeightTitle = static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr( nFontHeightWhich, true )); nTitleHeight = (sal_Int32)rFontHeightTitle.GetHeight(); const sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( @@ -880,7 +880,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) bListDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); sShellList = sListBackup = rFontLS.GetFamilyName(); - const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); + const SvxFontHeightItem& rFontHeightList = static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr(nFontHeightWhich, true)); nListHeight = (sal_Int32)rFontHeightList.GetHeight(); bListHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); @@ -889,7 +889,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellLabel = sCapBackup = rFontCP.GetFamilyName(); - const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); + const SvxFontHeightItem& rFontHeightLabel = static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr(nFontHeightWhich, true)); nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight(); bLabelHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); @@ -898,7 +898,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() : FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont(); sShellIndex = sIdxBackup = rFontIDX.GetFamilyName(); - const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, true); + const SvxFontHeightItem& rFontHeightIndex = static_cast<const SvxFontHeightItem&>(pColl->GetFmtAttr(nFontHeightWhich, true)); nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight(); bIndexHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false); } @@ -1189,7 +1189,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT ) { - const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet->Get( SID_ATTR_METRIC ); + const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(rSet->Get( SID_ATTR_METRIC )); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); ::SetFieldUnit( *pRowMoveMF, eFieldUnit ); ::SetFieldUnit( *pColMoveMF, eFieldUnit ); @@ -1292,7 +1292,7 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( vcl::Window* pParent, SwShadowCursorItem aOpt; if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) - aOpt = *(SwShadowCursorItem*)pItem; + aOpt = *static_cast<const SwShadowCursorItem*>(pItem); m_pOnOffCB->Check( aOpt.IsOn() ); sal_uInt8 eMode = aOpt.GetMode(); @@ -1374,8 +1374,8 @@ bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet* rSet ) bRet = true; } - const SwDocDisplayItem* pOldAttr = (const SwDocDisplayItem*) - GetOldItem(GetItemSet(), FN_PARAM_DOCDISP); + const SwDocDisplayItem* pOldAttr = static_cast<const SwDocDisplayItem*>( + GetOldItem(GetItemSet(), FN_PARAM_DOCDISP)); SwDocDisplayItem aDisp; if(pOldAttr) @@ -1404,7 +1404,7 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet ) SwShadowCursorItem aOpt; if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )) - aOpt = *(SwShadowCursorItem*)pItem; + aOpt = *static_cast<const SwShadowCursorItem*>(pItem); m_pOnOffCB->Check( aOpt.IsOn() ); sal_uInt8 eMode = aOpt.GetMode(); @@ -1848,12 +1848,12 @@ bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet* ) { // update all documents TypeId aType(TYPE(SwDocShell)); - SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType); + SwDocShell* pDocShell = static_cast<SwDocShell*>(SfxObjectShell::GetFirst(&aType)); while( pDocShell ) { pDocShell->GetWrtShell()->UpdateRedlineAttr(); - pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType); + pDocShell = static_cast<SwDocShell*>(SfxObjectShell::GetNext(*pDocShell, &aType)); } } diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index 839bc69cce27..48ae2aa587d1 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -62,7 +62,7 @@ SwDocStatPage::SwDocStatPage(vcl::Window *pParent, const SfxItemSet &rSet) Update(); m_pUpdatePB->SetClickHdl(LINK(this, SwDocStatPage, UpdateHdl)); //#111684# is the current view a page preview no SwFEShell can be found -> hide the update button - SwDocShell* pDocShell = (SwDocShell*) SfxObjectShell::Current(); + SwDocShell* pDocShell = static_cast<SwDocShell*>( SfxObjectShell::Current() ); SwFEShell* pFEShell = pDocShell->GetFEShell(); if(!pFEShell) { @@ -127,7 +127,7 @@ void SwDocStatPage::Update() IMPL_LINK_NOARG(SwDocStatPage, UpdateHdl) { Update(); - SwDocShell* pDocShell = (SwDocShell*) SfxObjectShell::Current(); + SwDocShell* pDocShell = static_cast<SwDocShell*>( SfxObjectShell::Current()); SwFEShell* pFEShell = pDocShell->GetFEShell(); if(pFEShell) m_pLineNo->SetText( OUString::number( pFEShell->GetLineCount(false))); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index a6b99a8c8f8b..9bbd471bface 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -45,7 +45,7 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) { SfxEventNamesItem aItem(SID_EVENTCONFIG); - sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); + sal_uInt16 nHtmlMode = ::GetHtmlMode(static_cast<const SwDocShell*>(SfxObjectShell::Current())); bool bHtmlMode = nHtmlMode & HTMLMODE_ON; switch( eType ) diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 8c6c7d1e1853..ecf9f935e761 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1090,19 +1090,19 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) { SectReprPtr pRepr = (SectReprPtr)pSelEntry->GetUserData(); if( SfxItemState::SET == eColState ) - pRepr->GetCol() = *(SwFmtCol*)pColItem; + pRepr->GetCol() = *static_cast<const SwFmtCol*>(pColItem); if( SfxItemState::SET == eBrushState ) - pRepr->GetBackground() = *(SvxBrushItem*)pBrushItem; + pRepr->GetBackground() = *static_cast<const SvxBrushItem*>(pBrushItem); if( SfxItemState::SET == eFtnState ) - pRepr->GetFtnNtAtEnd() = *(SwFmtFtnAtTxtEnd*)pFtnItem; + pRepr->GetFtnNtAtEnd() = *static_cast<const SwFmtFtnAtTxtEnd*>(pFtnItem); if( SfxItemState::SET == eEndState ) - pRepr->GetEndNtAtEnd() = *(SwFmtEndAtTxtEnd*)pEndItem; + pRepr->GetEndNtAtEnd() = *static_cast<const SwFmtEndAtTxtEnd*>(pEndItem); if( SfxItemState::SET == eBalanceState ) pRepr->GetBalance().SetValue(static_cast<const SwFmtNoBalancedColumns*>(pBalanceItem)->GetValue()); if( SfxItemState::SET == eFrmDirState ) pRepr->GetFrmDir().SetValue(static_cast<const SvxFrameDirectionItem*>(pFrmDirItem)->GetValue()); if( SfxItemState::SET == eLRState ) - pRepr->GetLRSpace() = *(SvxLRSpaceItem*)pLRSpaceItem; + pRepr->GetLRSpace() = *static_cast<const SvxLRSpaceItem*>(pLRSpaceItem); pSelEntry = m_pTree->NextSelected(pSelEntry); } @@ -1315,7 +1315,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg ) sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) - sPassword = ( (SfxStringItem*)pItem )->GetValue(); + sPassword = static_cast<const SfxStringItem*>(pItem )->GetValue(); ::lcl_ReadSections(*pMedium, *m_pSubRegionED); } } @@ -1433,7 +1433,7 @@ void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) } else if (nId == m_nColumnPageId) { - const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)GetInputSetImpl()->Get(RES_FRM_SIZE); + const SwFmtFrmSize& rSize = static_cast<const SwFmtFrmSize&>(GetInputSetImpl()->Get(RES_FRM_SIZE)); static_cast<SwColumnPage&>(rPage).SetPageWidth(rSize.GetWidth()); static_cast<SwColumnPage&>(rPage).ShowBalance(true); static_cast<SwColumnPage&>(rPage).SetInSection(true); @@ -1780,7 +1780,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil m_sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) - m_sFilePasswd = ( (SfxStringItem*)pItem )->GetValue(); + m_sFilePasswd = static_cast<const SfxStringItem*>(pItem)->GetValue(); m_pFileNameED->SetText( INetURLObject::decode( m_sFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) ); ::lcl_ReadSections(*pMedium, *m_pSubRegionED); @@ -1969,10 +1969,10 @@ void SwSectionFtnEndTabPage::ResetState( bool bFtn, void SwSectionFtnEndTabPage::Reset( const SfxItemSet* rSet ) { - ResetState( true, (const SwFmtFtnAtTxtEnd&)rSet->Get( - RES_FTN_AT_TXTEND, false )); - ResetState( false, (const SwFmtEndAtTxtEnd&)rSet->Get( - RES_END_AT_TXTEND, false )); + ResetState( true, static_cast<const SwFmtFtnAtTxtEnd&>(rSet->Get( + RES_FTN_AT_TXTEND, false ))); + ResetState( false, static_cast<const SwFmtEndAtTxtEnd&>(rSet->Get( + RES_END_AT_TXTEND, false ))); } SfxTabPage* SwSectionFtnEndTabPage::Create( vcl::Window* pParent, @@ -2122,7 +2122,7 @@ void SwSectionIndentTabPage::Reset( const SfxItemSet* rSet) if ( eItemState >= SfxItemState::DEFAULT ) { const SvxLRSpaceItem& rSpace = - (const SvxLRSpaceItem&)rSet->Get( RES_LR_SPACE ); + static_cast<const SvxLRSpaceItem&>(rSet->Get( RES_LR_SPACE )); m_pBeforeMF->SetValue( m_pBeforeMF->Normalize(rSpace.GetLeft()), FUNIT_TWIP ); m_pAfterMF->SetValue( m_pAfterMF->Normalize(rSpace.GetRight()), FUNIT_TWIP ); diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 34179316f140..ee77182d7ac0 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -277,8 +277,8 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) SfxAllItemSet aTmpSet(*pCollSet); // Insert tabs, default tabs into ItemSet - const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&) - pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP); + const SvxTabStopItem& rDefTabs = static_cast<const SvxTabStopItem&>( + pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP)); const sal_uInt16 nDefDist = static_cast<sal_uInt16>(::GetTabDist( rDefTabs )); SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist ); @@ -492,7 +492,7 @@ bool SwEnvFmtPage::FillItemSet(SfxItemSet* rSet) void SwEnvFmtPage::Reset(const SfxItemSet* rSet) { - const SwEnvItem& rItem = (const SwEnvItem&) rSet->Get(FN_ENVELOP); + const SwEnvItem& rItem = static_cast<const SwEnvItem&>( rSet->Get(FN_ENVELOP)); Paper ePaper = SvxPaperInfo::GetSvxPaper( Size( std::min(rItem.lWidth, rItem.lHeight), diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx index 1348c5bd31ce..0d89e4f79d3e 100644 --- a/sw/source/ui/envelp/envfmt.hxx +++ b/sw/source/ui/envelp/envfmt.hxx @@ -53,7 +53,7 @@ class SwEnvFmtPage : public SfxTabPage SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, bool bSender); - SwEnvDlg *GetParentSwEnvDlg() {return (SwEnvDlg*) GetParentDialog();} + SwEnvDlg *GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>(GetParentDialog());} using TabPage::ActivatePage; using TabPage::DeactivatePage; diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 0714f226f512..908d8739d383 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -134,7 +134,7 @@ SwEnvDlg::SwEnvDlg(vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert) : SfxTabDialog(pParent, "EnvDialog", "modules/swriter/ui/envdialog.ui", &rSet) - , aEnvItem((const SwEnvItem&) rSet.Get(FN_ENVELOP)) + , aEnvItem(static_cast<const SwEnvItem&>( rSet.Get(FN_ENVELOP))) , pSh(pWrtSh) , pPrinter(pPrt) , pAddresseeSet(0) @@ -339,7 +339,7 @@ bool SwEnvPage::FillItemSet(SfxItemSet* rSet) void SwEnvPage::Reset(const SfxItemSet* rSet) { - SwEnvItem aItem = (const SwEnvItem&) rSet->Get(FN_ENVELOP); + SwEnvItem aItem = static_cast<const SwEnvItem&>( rSet->Get(FN_ENVELOP)); m_pAddrEdit->SetText(convertLineEnd(aItem.aAddrText, GetSystemLineEnd())); m_pSenderEdit->SetText(convertLineEnd(aItem.aSendText, GetSystemLineEnd())); m_pSenderBox->Check (aItem.bSend); diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx index b4976e7a6d14..288884a9a2d2 100644 --- a/sw/source/ui/envelp/envprt.cxx +++ b/sw/source/ui/envelp/envprt.cxx @@ -121,7 +121,7 @@ IMPL_LINK_NOARG(SwEnvPrtPage, AlignHdl) else { // GetCurItemId() == 0 is possible! - const SwEnvItem& rItem = (const SwEnvItem&) GetItemSet().Get(FN_ENVELOP); + const SwEnvItem& rItem = static_cast<const SwEnvItem&>( GetItemSet().Get(FN_ENVELOP) ); m_pAlignBox->CheckItem(m_aIds[rItem.eAlign], true); } return 0; @@ -173,7 +173,7 @@ bool SwEnvPrtPage::FillItemSet(SfxItemSet* rSet) void SwEnvPrtPage::Reset(const SfxItemSet* rSet) { // Read item - const SwEnvItem& rItem = (const SwEnvItem&) rSet->Get(FN_ENVELOP); + const SwEnvItem& rItem = static_cast<const SwEnvItem&>( rSet->Get(FN_ENVELOP) ); m_pAlignBox->CheckItem(m_aIds[rItem.eAlign]); if (rItem.bPrintFromAbove) diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx index e6f427caa95d..bee494477667 100644 --- a/sw/source/ui/envelp/envprt.hxx +++ b/sw/source/ui/envelp/envprt.hxx @@ -29,6 +29,7 @@ #include <svtools/stdctrl.hxx> #include "envimg.hxx" +#include "envlop.hxx" class SwEnvDlg; @@ -52,7 +53,7 @@ class SwEnvPrtPage : public SfxTabPage DECL_LINK(AlignHdl, void *); DECL_LINK( ButtonHdl, Button * ); - SwEnvDlg* GetParentSwEnvDlg() {return (SwEnvDlg*) GetParentDialog();} + SwEnvDlg* GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>( GetParentDialog());} using TabPage::ActivatePage; using TabPage::DeactivatePage; diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index fe1a7d6c1289..f217acdb2d6d 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -86,7 +86,7 @@ void SwLabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) static_cast<SwLabPage*>(&rPage)->SetToBusinessCard(); } else if (nId == m_nOptionsId) - pPrtPage = (SwLabPrtPage*)&rPage; + pPrtPage = static_cast<SwLabPrtPage*>(&rPage); } SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet, @@ -130,7 +130,7 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet, SetText(m_sBusinessCardDlg); } // Read user label from writer.cfg - SwLabItem aItem((const SwLabItem&)rSet.Get( FN_LABEL )); + SwLabItem aItem(static_cast<const SwLabItem&>(rSet.Get( FN_LABEL ))); SwLabRec* pRec = new SwLabRec; pRec->aMake = pRec->aType = SW_RESSTR( STR_CUSTOM ); pRec->SetFromItem( aItem ); @@ -175,8 +175,8 @@ SwLabDlg::~SwLabDlg() void SwLabDlg::GetLabItem(SwLabItem &rItem) { - const SwLabItem& rActItem = (const SwLabItem&)GetExampleSet()->Get(FN_LABEL); - const SwLabItem& rOldItem = (const SwLabItem&)GetInputSetImpl()->Get(FN_LABEL); + const SwLabItem& rActItem = static_cast<const SwLabItem&>(GetExampleSet()->Get(FN_LABEL)); + const SwLabItem& rOldItem = static_cast<const SwLabItem&>(GetInputSetImpl()->Get(FN_LABEL)); if (rActItem != rOldItem) { @@ -229,7 +229,7 @@ SwLabPage::SwLabPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "CardMediumPage", "modules/swriter/ui/cardmediumpage.ui", &rSet) , pDBManager(NULL) - , aItem((const SwLabItem&)rSet.Get(FN_LABEL)) + , aItem(static_cast<const SwLabItem&>(rSet.Get(FN_LABEL))) , m_bLabel(false) { WaitObject aWait( pParent ); @@ -502,7 +502,7 @@ bool SwLabPage::FillItemSet(SfxItemSet* rSet) void SwLabPage::Reset(const SfxItemSet* rSet) { - aItem = (const SwLabItem&) rSet->Get(FN_LABEL); + aItem = static_cast<const SwLabItem&>( rSet->Get(FN_LABEL)); OUString sDBName = aItem.sDBName; OUString aWriting(convertLineEnd(aItem.aWriting, GetSystemLineEnd())); @@ -660,7 +660,7 @@ static bool lcl_FindBlock(SvTreeListBox& rAutoTextLB, const OUString& rBlockName void SwVisitingCardPage::Reset(const SfxItemSet* rSet) { - aLabItem = (const SwLabItem&) rSet->Get(FN_LABEL); + aLabItem = static_cast<const SwLabItem&>( rSet->Get(FN_LABEL) ); bool bFound = false; sal_Int32 i; @@ -748,7 +748,7 @@ int SwPrivateDataPage::DeactivatePage(SfxItemSet* _pSet) bool SwPrivateDataPage::FillItemSet(SfxItemSet* rSet) { - SwLabItem aItem = (const SwLabItem&) GetTabDialog()->GetExampleSet()->Get(FN_LABEL); + SwLabItem aItem = static_cast<const SwLabItem&>( GetTabDialog()->GetExampleSet()->Get(FN_LABEL) ); aItem.aPrivFirstName = m_pFirstNameED->GetText(); aItem.aPrivName = m_pNameED->GetText( ); aItem.aPrivShortCut = m_pShortCutED->GetText( ); @@ -774,7 +774,7 @@ bool SwPrivateDataPage::FillItemSet(SfxItemSet* rSet) void SwPrivateDataPage::Reset(const SfxItemSet* rSet) { - const SwLabItem& aItem = (const SwLabItem&) rSet->Get(FN_LABEL); + const SwLabItem& aItem = static_cast<const SwLabItem&>( rSet->Get(FN_LABEL) ); m_pFirstNameED->SetText(aItem.aPrivFirstName); m_pNameED->SetText(aItem.aPrivName); m_pShortCutED->SetText(aItem.aPrivShortCut); @@ -835,7 +835,7 @@ int SwBusinessDataPage::DeactivatePage(SfxItemSet* _pSet) bool SwBusinessDataPage::FillItemSet(SfxItemSet* rSet) { - SwLabItem aItem = (const SwLabItem&) GetTabDialog()->GetExampleSet()->Get(FN_LABEL); + SwLabItem aItem = static_cast<const SwLabItem&>( GetTabDialog()->GetExampleSet()->Get(FN_LABEL) ); aItem.aCompCompany = m_pCompanyED->GetText(); aItem.aCompCompanyExt= m_pCompanyExtED->GetText(); @@ -858,7 +858,7 @@ bool SwBusinessDataPage::FillItemSet(SfxItemSet* rSet) void SwBusinessDataPage::Reset(const SfxItemSet* rSet) { - const SwLabItem& aItem = (const SwLabItem&) rSet->Get(FN_LABEL); + const SwLabItem& aItem = static_cast<const SwLabItem&>( rSet->Get(FN_LABEL) ); m_pCompanyED->SetText(aItem.aCompCompany); m_pCompanyExtED->SetText(aItem.aCompCompanyExt); m_pSloganED->SetText(aItem.aCompSlogan); diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 8d9915f88a6d..c07f4f9a0418 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -290,7 +290,7 @@ SwLabFmtPage::SwLabFmtPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "LabelFormatPage", "modules/swriter/ui/labelformatpage.ui", &rSet) , bModified(false) - , aItem((const SwLabItem&) rSet.Get(FN_LABEL)) + , aItem(static_cast<const SwLabItem&>( rSet.Get(FN_LABEL) )) { SetExchangeSupport(); diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index b4b760621e82..f90bde30c7f5 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -111,7 +111,7 @@ public: virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE; - SwLabDlg* GetParentSwLabDlg() {return (SwLabDlg*)GetParentDialog();} + SwLabDlg* GetParentSwLabDlg() {return static_cast<SwLabDlg*>(GetParentDialog());} }; class SwSaveLabelDlg : public ModalDialog diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index 109e30bc8544..67e92d2a705c 100644 --- a/sw/source/ui/envelp/labprt.hxx +++ b/sw/source/ui/envelp/labprt.hxx @@ -49,7 +49,7 @@ class SwLabPrtPage : public SfxTabPage DECL_LINK( CountHdl, Button * ); - SwLabDlg* GetParentSwLabDlg() {return (SwLabDlg*)GetParentDialog();} + SwLabDlg* GetParentSwLabDlg() {return static_cast<SwLabDlg*>(GetParentDialog());} using TabPage::ActivatePage; using TabPage::DeactivatePage; diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index 30cd7a34db76..d7b3a5da2591 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -72,7 +72,7 @@ public: virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE; - SwLabDlg* GetParentSwLabDlg() {return (SwLabDlg*) GetParentDialog();} + SwLabDlg* GetParentSwLabDlg() {return static_cast<SwLabDlg*>(GetParentDialog());} void SetToBusinessCard(); |