summaryrefslogtreecommitdiff
path: root/svx/source/form
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-20 11:52:06 +0200
committerNoel Grandin <noel@peralex.com>2014-10-20 13:33:58 +0200
commit3bb30a68e0604b3006f367fdb4c0a797846c23bc (patch)
treec5f5d11d9a0656c92ff7196984ca9238df2e89ee /svx/source/form
parentefa7f1a549ebf2580d50f6f0bb96e294a5fce670 (diff)
loplugin: cstylecast
Change-Id: If50022b55a558c4124d71acbbe0ef5eb48801d0b
Diffstat (limited to 'svx/source/form')
-rw-r--r--svx/source/form/filtnav.cxx26
-rw-r--r--svx/source/form/fmPropBrw.cxx4
-rw-r--r--svx/source/form/fmsrcimp.cxx4
-rw-r--r--svx/source/form/tabwin.cxx4
-rw-r--r--svx/source/form/tbxform.cxx6
5 files changed, 22 insertions, 22 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 72b815a9a1c7..ae552aa64761 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -792,7 +792,7 @@ void FmFilterModel::Remove(FmFilterData* pData)
sal_Int32 nPos = i - rItems.begin();
if (pData->ISA(FmFilterItems))
{
- FmFormItem* pFormItem = (FmFormItem*)pParent;
+ FmFormItem* pFormItem = static_cast<FmFormItem*>(pParent);
try
{
@@ -802,7 +802,7 @@ void FmFilterModel::Remove(FmFilterData* pData)
if ( bEmptyLastTerm )
{
// remove all children (by setting an empty predicate expression)
- ::std::vector< FmFilterData* >& rChildren = ((FmFilterItems*)pData)->GetChildren();
+ ::std::vector< FmFilterData* >& rChildren = static_cast<FmFilterItems*>(pData)->GetChildren();
while ( !rChildren.empty() )
{
::std::vector< FmFilterData* >::iterator removePos = rChildren.end() - 1;
@@ -937,7 +937,7 @@ void FmFilterModel::SetCurrentItems(FmFilterItems* pCurrent)
// search for the condition
if (pCurrent)
{
- FmFormItem* pFormItem = (FmFormItem*)pCurrent->GetParent();
+ FmFormItem* pFormItem = static_cast<FmFormItem*>(pCurrent->GetParent());
::std::vector<FmFilterData*>& rItems = pFormItem->GetChildren();
::std::vector<FmFilterData*>::const_iterator i = ::std::find(rItems.begin(), rItems.end(), pCurrent);
@@ -1025,7 +1025,7 @@ void FmFilterItemsString::Paint(
const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry)
{
FmFilterItems* pRow = (FmFilterItems*)pEntry->GetUserData();
- FmFormItem* pForm = (FmFormItem*)pRow->GetParent();
+ FmFormItem* pForm = static_cast<FmFormItem*>(pRow->GetParent());
// current filter is significant painted
const bool bIsCurrentFilter = pForm->GetChildren()[ pForm->GetFilterController()->getActiveTerm() ] == pRow;
@@ -1443,21 +1443,21 @@ bool FmFilterNavigator::Select( SvTreeListEntry* pEntry, bool bSelect )
{
FmFormItem* pFormItem = NULL;
if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem))
- pFormItem = (FmFormItem*)((FmFilterItem*)pEntry->GetUserData())->GetParent()->GetParent();
+ pFormItem = static_cast<FmFormItem*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()->GetParent());
else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItems))
- pFormItem = (FmFormItem*)((FmFilterItem*)pEntry->GetUserData())->GetParent()->GetParent();
+ pFormItem = static_cast<FmFormItem*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()->GetParent());
else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFormItem))
pFormItem = (FmFormItem*)pEntry->GetUserData();
if (pFormItem)
{
// will the controller be exchanged?
- if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItem))
- m_pModel->SetCurrentItems((FmFilterItems*)((FmFilterItem*)pEntry->GetUserData())->GetParent());
- else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFilterItems))
+ if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItem))
+ m_pModel->SetCurrentItems(static_cast<FmFilterItems*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()));
+ else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItems))
m_pModel->SetCurrentItems((FmFilterItems*)pEntry->GetUserData());
- else if (((FmFilterData*)pEntry->GetUserData())->ISA(FmFormItem))
- m_pModel->SetCurrentController(((FmFormItem*)pEntry->GetUserData())->GetController());
+ else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFormItem))
+ m_pModel->SetCurrentController(static_cast<FmFormItem*>(pEntry->GetUserData())->GetController());
}
}
return true;
@@ -1912,7 +1912,7 @@ void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, c
if( eState >= SfxItemState::DEFAULT )
{
- FmFormShell* pShell = PTR_CAST( FmFormShell,((SfxObjectItem*)pState)->GetShell() );
+ FmFormShell* pShell = PTR_CAST( FmFormShell, static_cast<const SfxObjectItem*>(pState)->GetShell() );
UpdateContent( pShell );
}
else
@@ -1997,7 +1997,7 @@ FmFilterNavigatorWinMgr::FmFilterNavigatorWinMgr( vcl::Window *_pParent, sal_uIn
{
pWindow = new FmFilterNavigatorWin( _pBindings, this, _pParent );
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
- ((SfxDockingWindow*)pWindow)->Initialize( _pInfo );
+ static_cast<SfxDockingWindow*>(pWindow)->Initialize( _pInfo );
}
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 19685b5accfc..d28b67dabf7a 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -85,7 +85,7 @@ FmPropBrwMgr::FmPropBrwMgr( vcl::Window* _pParent, sal_uInt16 _nId,
{
pWindow = new FmPropBrw( ::comphelper::getProcessComponentContext(), _pBindings, this, _pParent, _pInfo );
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
- ((SfxFloatingWindow*)pWindow)->Initialize( _pInfo );
+ static_cast<SfxFloatingWindow*>(pWindow)->Initialize( _pInfo );
}
@@ -629,7 +629,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool
{
if (eState >= SfxItemState::DEFAULT)
{
- FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
+ FmFormShell* pShell = PTR_CAST(FmFormShell, static_cast<const SfxObjectItem*>(pState)->GetShell());
InterfaceBag aSelection;
if ( pShell )
pShell->GetImpl()->getCurrentSelection( aSelection );
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index 32e0116c3031..4c9f2fa4cde2 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -145,7 +145,7 @@ void FmRecordCountListener::NotifyCurrentCount()
if (m_lnkWhoWantsToKnow.IsSet())
{
DBG_ASSERT(m_xListening.is(), "FmRecordCountListener::NotifyCurrentCount : I have no propset ... !?");
- void* pTheCount = (void*)(sal_IntPtr)::comphelper::getINT32(m_xListening->getPropertyValue(FM_PROP_ROWCOUNT));
+ void* pTheCount = reinterpret_cast<void*>(::comphelper::getINT32(m_xListening->getPropertyValue(FM_PROP_ROWCOUNT)));
m_lnkWhoWantsToKnow.Call(pTheCount);
}
}
@@ -1111,7 +1111,7 @@ IMPL_LINK(FmSearchEngine, OnNewRecordCount, void*, pCounterAsVoid)
return 0L;
FmSearchProgress aProgress;
- aProgress.nCurrentRecord = (sal_uIntPtr)pCounterAsVoid;
+ aProgress.nCurrentRecord = reinterpret_cast<sal_uIntPtr>(pCounterAsVoid);
aProgress.aSearchState = FmSearchProgress::STATE_PROGRESS_COUNTING;
m_aProgressHandler.Call(&aProgress);
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 8f0d11bf6124..111ab2b5d684 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -282,7 +282,7 @@ void FmFieldWin::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoo
if (eState >= SfxItemState::DEFAULT)
{
- FmFormShell* pShell = PTR_CAST(FmFormShell,((SfxObjectItem*)pState)->GetShell());
+ FmFormShell* pShell = PTR_CAST(FmFormShell, static_cast<const SfxObjectItem*>(pState)->GetShell());
UpdateContent(pShell);
}
else
@@ -418,7 +418,7 @@ FmFieldWinMgr::FmFieldWinMgr(vcl::Window* _pParent, sal_uInt16 _nId,
pWindow = new FmFieldWin(_pBindings, this, _pParent);
SetHideNotDelete(true);
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
- ((SfxFloatingWindow*)pWindow)->Initialize( _pInfo );
+ static_cast<SfxFloatingWindow*>(pWindow)->Initialize( _pInfo );
}
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 06ce8aa30902..f72ad7ce9b8b 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -157,7 +157,7 @@ void SvxFmTbxCtlConfig::StateChanged(sal_uInt16 nSID, SfxItemState eState, const
{
sal_uInt16 nSlot = 0;
if (eState >= SfxItemState::DEFAULT)
- nSlot = ((SfxUInt16Item*)pState)->GetValue();
+ nSlot = static_cast<const SfxUInt16Item*>(pState)->GetValue();
switch( nSlot )
{
@@ -253,7 +253,7 @@ void SvxFmTbxCtlAbsRec::StateChanged( sal_uInt16 nSID, SfxItemState eState, cons
{
sal_uInt16 nId = GetId();
ToolBox* pToolBox = &GetToolBox();
- SvxFmAbsRecWin* pWin = (SvxFmAbsRecWin*)( pToolBox->GetItemWindow(nId) );
+ SvxFmAbsRecWin* pWin = static_cast<SvxFmAbsRecWin*>( pToolBox->GetItemWindow(nId) );
assert(pWin && "Control not found!");
@@ -370,7 +370,7 @@ void SvxFmTbxCtlRecTotal::StateChanged( sal_uInt16 nSID, SfxItemState eState, co
OUString aText;
if (pState)
- aText = ((SfxStringItem*)pState)->GetValue();
+ aText = static_cast<const SfxStringItem*>(pState)->GetValue();
else
aText = "?";