diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-02 14:33:47 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-12-02 14:34:10 +0200 |
commit | 8dba4716d2e7fcaf00cc347d4989c24539ea0fe6 (patch) | |
tree | d7bbdcd98a8270744429c36d23975002e03648eb /sw/source/ui/misc | |
parent | 724bc1ac11bd9a07d3391a8535d308353003e3b9 (diff) |
loplugin: cstylecast
Change-Id: I922fe2b4177687863d9749c2f46aab9ddd86621a
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/misc/insfnote.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/linenum.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/num.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 18 | ||||
-rw-r--r-- | sw/source/ui/misc/titlepage.cxx | 2 |
7 files changed, 21 insertions, 21 deletions
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index b938a07761fe..15cfb9493333 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -379,7 +379,7 @@ bool SwEndNoteOptionPage::FillItemSet( SfxItemSet * ) } else { - SwFtnInfo *pI = (SwFtnInfo*)pInf.get(); + SwFtnInfo *pI = static_cast<SwFtnInfo*>(pInf.get()); pI->ePos = m_pPosPageBox->IsChecked() ? FTNPOS_PAGE : FTNPOS_CHAPTER; pI->eNum = (SwFtnNum)GetNumbering(); pI->aQuoVadis = m_pContEdit->GetText(); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index f5f1d18cb707..2b9a3d536b13 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -768,7 +768,7 @@ IMPL_LINK_NOARG_INLINE_END(SwGlossaryDlg, EditHdl) IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox ) { OUString aName(m_pNewName->GetText()); - SwGlossaryDlg* pDlg = (SwGlossaryDlg*)GetParent(); + SwGlossaryDlg* pDlg = static_cast<SwGlossaryDlg*>(GetParent()); if (pBox == m_pNewName) m_pNewShort->SetText( lcl_GetValidShortCut( aName ) ); @@ -781,7 +781,7 @@ IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox ) IMPL_LINK_NOARG(SwNewGlosNameDlg, Rename) { - SwGlossaryDlg* pDlg = (SwGlossaryDlg*)GetParent(); + SwGlossaryDlg* pDlg = static_cast<SwGlossaryDlg*>(GetParent()); OUString sNew = GetAppCharClass().uppercase(m_pNewShort->GetText()); if( pDlg->pGlossaryHdl->HasShortName(m_pNewShort->GetText()) && sNew != m_pOldShort->GetText() ) @@ -896,7 +896,7 @@ DragDropMode SwGlTreeListBox::NotifyStartDrag( eRet = SV_DRAGDROP_NONE; else { - SwGlossaryDlg* pDlg = (SwGlossaryDlg*)GetParentDialog(); + SwGlossaryDlg* pDlg = static_cast<SwGlossaryDlg*>(GetParentDialog()); SvTreeListEntry* pParent = GetParent(pEntry); GroupUserData* pGroupData = (GroupUserData*)pParent->GetUserData(); @@ -961,7 +961,7 @@ TriState SwGlTreeListBox::NotifyCopyingOrMoving( bool bRet = false; if(pDestParent != pSrcParent) { - SwGlossaryDlg* pDlg = (SwGlossaryDlg*)GetParentDialog(); + SwGlossaryDlg* pDlg = static_cast<SwGlossaryDlg*>(GetParentDialog()); SwWait aWait( *pDlg->pSh->GetView().GetDocShell(), true ); GroupUserData* pGroupData = (GroupUserData*)pSrcParent->GetUserData(); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 50d720f3cd9e..2d6ba9e7afb0 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -62,7 +62,7 @@ void SwInsFootNoteDlg::Apply() rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); - SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); + const SvxFontItem &rFont = static_cast<const SvxFontItem &>( aSet.Get( RES_CHRATR_FONT )); SvxFontItem aFont( rFont.GetFamily(), m_aFontName, rFont.GetStyleName(), rFont.GetPitch(), eCharSet, RES_CHRATR_FONT ); @@ -112,7 +112,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl) SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); - const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); + const SvxFontItem &rFont = static_cast<const SvxFontItem &>( aSet.Get( RES_CHRATR_FONT ) ); SfxAllItemSet aAllSet( rSh.GetAttrPool() ); aAllSet.Put( SfxBoolItem( FN_PARAM_1, false ) ); @@ -228,7 +228,7 @@ void SwInsFootNoteDlg::Init() rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); - const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); + const SvxFontItem &rFont = static_cast<const SvxFontItem &>( aSet.Get( RES_CHRATR_FONT ) ); aFont = m_pNumberCharEdit->GetFont(); m_aFontName = rFont.GetFamilyName(); diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index e4f86d4dc293..5eb3e4e763d0 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -43,7 +43,7 @@ static rtl::Reference<SwDocStyleSheet> lcl_getDocStyleSheet(const OUString& rNam SAL_WARN_IF( !pStyle, "linenumbering.ui", "Style not found" ); if(!pStyle) return NULL; - return new SwDocStyleSheet(*(SwDocStyleSheet*)pStyle); + return new SwDocStyleSheet(*static_cast<SwDocStyleSheet*>(pStyle)); } static void lcl_setLineNumbering(const OUString& rName, SwWrtShell* pSh, bool bLineNumber) @@ -150,7 +150,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw) if(xStyleSheet.is()) { SfxItemSet& rSet = xStyleSheet->GetItemSet(); - SwFmtLineNumber &aFmt = (SwFmtLineNumber&)(rSet.Get(RES_LINENUMBER)); + const SwFmtLineNumber &aFmt = static_cast<const SwFmtLineNumber&>(rSet.Get(RES_LINENUMBER)); if(aFmt.IsCount()) m_pNumberingOnFooterHeader->SetState(TRISTATE_TRUE); else diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 459c038c6da3..ae35a0012cbf 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -429,7 +429,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet* rSet ) m_pLevelLB->EnableMultiSelection(false); } else if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_ACT_NUMBER, false, &pItem)) - pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule(); + pSaveNum = const_cast<SwUINumRuleItem*>(static_cast<const SwUINumRuleItem*>(pItem))->GetNumRule(); nActNumLvl = SwOutlineTabDialog::GetActNumLevel(); sal_uInt16 nMask = 1; diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 0076090ded22..0042d67328be 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -191,7 +191,7 @@ void SwTextGridPage::Reset(const SfxItemSet *rSet) { if(SfxItemState::DEFAULT <= rSet->GetItemState(RES_TEXTGRID, true)) { - const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet->Get(RES_TEXTGRID); + const SwTextGridItem& rGridItem = static_cast<const SwTextGridItem&>(rSet->Get(RES_TEXTGRID)); RadioButton* pButton = 0; switch(rGridItem.GetGridType()) { @@ -281,20 +281,20 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) if( SfxItemState::UNKNOWN != 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; } if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) { - const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( - SID_ATTR_PAGE_SIZE); - const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( - RES_LR_SPACE ); - const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get( - RES_UL_SPACE ); - const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX); + const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get( + SID_ATTR_PAGE_SIZE)); + const SvxLRSpaceItem& rLRSpace = static_cast<const SvxLRSpaceItem&>(rSet.Get( + RES_LR_SPACE )); + const SvxULSpaceItem& rULSpace = static_cast<const SvxULSpaceItem&>(rSet.Get( + RES_UL_SPACE )); + const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX)); sal_Int32 nDistanceLR = rLRSpace.GetLeft() + rLRSpace.GetRight(); sal_Int32 nDistanceUL = rULSpace.GetUpper() + rULSpace.GetLower(); diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index d29f24c446a3..2dbd5ec742c6 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -42,7 +42,7 @@ namespace if (oNumOffset) rPageNo = oNumOffset.get(); if (ppPageFmtDesc) - (*ppPageFmtDesc) = (const SwFmtPageDesc *)(pItem->Clone()); + (*ppPageFmtDesc) = static_cast<const SwFmtPageDesc *>(pItem->Clone()); bRet = true; } } |