diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-03 10:43:11 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-12-03 10:43:53 +0200 |
commit | 0e2927ed2cffdc718085cadce3cc41e34cd6a04f (patch) | |
tree | fde369e43a16f06aac84e8b48f727f3e7a74b0fe /sw/source/ui/misc | |
parent | 0b30d5344cad60967aa79bad86916debbf4371e9 (diff) |
loplugin: cstylecast
Change-Id: Ic48a59c209e77382a0e431a5502c24a62407334b
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/glosbib.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/misc/pgfnote.cxx | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 9aab2ff9e24d..6f93bc1e30ae 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -87,7 +87,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent, nCaseReadonly |= PATH_READONLY; else if( SWUnoHelper::UCB_IsCaseSensitiveFileName( aTempFile.GetURL())) nCaseReadonly |= PATH_CASE_SENSITIVE; - m_pPathLB->SetEntryData(i, (void*)nCaseReadonly); + m_pPathLB->SetEntryData(i, reinterpret_cast<void*>(nCaseReadonly)); } m_pPathLB->SelectEntryPos(0); m_pPathLB->Enable(true); @@ -318,7 +318,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) bool bEnableNew = true; bool bEnableDel = false; sal_uLong nCaseReadonly = - (sal_uLong)m_pPathLB->GetEntryData(m_pPathLB->GetSelectEntryPos()); + reinterpret_cast<sal_uLong>(m_pPathLB->GetEntryData(m_pPathLB->GetSelectEntryPos())); bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY); if(sEntry.isEmpty() || bDirReadonly) @@ -333,8 +333,8 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) for(sal_uLong i = 0; i < m_pGroupTLB->GetEntryCount(); i++) { OUString sTemp = m_pGroupTLB->GetEntryText( i, 0 ); - nCaseReadonly = (sal_uLong)m_pPathLB->GetEntryData( - m_pPathLB->GetEntryPos(m_pGroupTLB->GetEntryText(i,1))); + nCaseReadonly = reinterpret_cast<sal_uLong>(m_pPathLB->GetEntryData( + m_pPathLB->GetEntryPos(m_pGroupTLB->GetEntryText(i,1)))); bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE); if( !bCase && rSCmp.isEqual( sTemp, sEntry )) diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index bf3632ed2dbb..cd0d81bb7a6b 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -150,7 +150,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) const SfxPoolItem* pItem = SfxTabPage::GetItem(*rSet, FN_PARAM_FTN_INFO); if( pItem ) { - pFtnInfo = &((const SwPageFtnInfoItem*)pItem)->GetPageFtnInfo(); + pFtnInfo = &static_cast<const SwPageFtnInfoItem*>(pItem)->GetPageFtnInfo(); } else { @@ -212,7 +212,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) { const SfxPoolItem* pColorItem = pDocSh->GetItem( SID_COLOR_TABLE ); if ( pColorItem != NULL ) - pColorList = ( (SvxColorListItem*)pColorItem )->GetColorList(); + pColorList = static_cast<const SvxColorListItem*>(pColorItem)->GetColorList(); } OSL_ENSURE( pColorList.is(), "ColorTable not found!" ); @@ -257,7 +257,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) // stuff attributes into the set, when OK bool SwFootNotePage::FillItemSet(SfxItemSet *rSet) { - SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO)); + SwPageFtnInfoItem aItem(static_cast<const SwPageFtnInfoItem&>(GetItemSet().Get(FN_PARAM_FTN_INFO))); // that's the original SwPageFtnInfo &rFtnInfo = aItem.GetPageFtnInfo(); @@ -304,7 +304,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet) void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) { - const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( RES_FRM_SIZE ); + const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get( RES_FRM_SIZE )); lMaxHeight = rSize.GetSize().Height(); const SfxPoolItem* pItem; @@ -312,12 +312,12 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) { const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet(); const SfxBoolItem& rHeaderOn = - (const SfxBoolItem&)rHeaderSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) ); + static_cast<const SfxBoolItem&>(rHeaderSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) )); if ( rHeaderOn.GetValue() ) { const SvxSizeItem& rSizeItem = - (const SvxSizeItem&)rHeaderSet.Get(rSet.GetPool()->GetWhich(SID_ATTR_PAGE_SIZE)); + static_cast<const SvxSizeItem&>(rHeaderSet.Get(rSet.GetPool()->GetWhich(SID_ATTR_PAGE_SIZE))); lMaxHeight -= rSizeItem.GetSize().Height(); } } @@ -327,19 +327,19 @@ void SwFootNotePage::ActivatePage(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& rSizeItem = - (const SvxSizeItem&)rFooterSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_SIZE ) ); + static_cast<const SvxSizeItem&>(rFooterSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_SIZE ) )); lMaxHeight -= rSizeItem.GetSize().Height(); } } if ( rSet.GetItemState( RES_UL_SPACE , false ) == SfxItemState::SET ) { - const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE ); + const SvxULSpaceItem &rUL = static_cast<const SvxULSpaceItem&>(rSet.Get( RES_UL_SPACE )); lMaxHeight -= rUL.GetUpper() + rUL.GetLower(); } |