summaryrefslogtreecommitdiff
path: root/sfx2/source/control
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:06:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:25 +0100
commit65e9940d8d13e0e2ac9cac3421955124d1c73390 (patch)
tree089685d7ac1e2978bba363900b02b9f3cc015452 /sfx2/source/control
parent8d6c8d7fa0a4c56ebcf9d141d8cd99706d756991 (diff)
Clean up C-style casts from pointers to void
Change-Id: I717c260ecdc378a9fd33494f2b98eccec0417d66
Diffstat (limited to 'sfx2/source/control')
-rw-r--r--sfx2/source/control/dispatch.cxx2
-rw-r--r--sfx2/source/control/objface.cxx10
-rw-r--r--sfx2/source/control/shell.cxx6
3 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 142646dc19f9..f7b2961ad309 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1610,7 +1610,7 @@ void SfxDispatcher::SetSlotFilter(SfxSlotFilterState nEnable,
extern "C" int SAL_CALL SfxCompareSIDs_Impl(const void* pSmaller, const void* pBigger)
{
- return ( (long) *((sal_uInt16*)pSmaller) ) - ( (long) *((sal_uInt16*)pBigger) );
+ return ( (long) *static_cast<sal_uInt16 const *>(pSmaller) ) - ( (long) *static_cast<sal_uInt16 const *>(pBigger) );
}
/** Searches for 'nSID' in the Filter set by <SetSlotFilter()> and
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index a9256120f8e6..b36a20d293c8 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -40,15 +40,15 @@ extern "C" {
static int SAL_CALL
SfxCompareSlots_qsort( const void* pSmaller, const void* pBigger )
{
- return ( (int) ((SfxSlot*)pSmaller)->GetSlotId() ) -
- ( (int) ((SfxSlot*)pBigger)->GetSlotId() );
+ return ( (int) static_cast<SfxSlot const *>(pSmaller)->GetSlotId() ) -
+ ( (int) static_cast<SfxSlot const *>(pBigger)->GetSlotId() );
}
static int SAL_CALL
SfxCompareSlots_bsearch( const void* pSmaller, const void* pBigger )
{
- return ( (int) *((sal_uInt16*)pSmaller) ) -
- ( (int) ((SfxSlot*)pBigger)->GetSlotId() );
+ return ( (int) *static_cast<sal_uInt16 const *>(pSmaller) ) -
+ ( (int) static_cast<SfxSlot const *>(pBigger)->GetSlotId() );
}
}
@@ -306,7 +306,7 @@ const SfxSlot* SfxInterface::GetSlot( sal_uInt16 nFuncId ) const
if ( !p && pGenoType )
return pGenoType->GetSlot( nFuncId );
- return p ? (const SfxSlot*)p : 0;
+ return p ? static_cast<const SfxSlot*>(p) : 0;
}
const SfxSlot* SfxInterface::GetSlot( const OUString& rCommand ) const
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index b055444c1808..9e5a9b5b5c23 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -408,7 +408,7 @@ bool SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
sal_IntPtr ShellCall_Impl( void* pObj, void* pArg )
{
- ((SfxShell* )pObj)->ExecuteSlot( *(SfxRequest*)pArg, (SfxInterface*)0L );
+ static_cast<SfxShell*>(pObj)->ExecuteSlot( *static_cast<SfxRequest*>(pArg), (SfxInterface*)0L );
return 0;
}
@@ -669,8 +669,8 @@ bool SfxShell::HasUIFeature( sal_uInt32 )
sal_IntPtr DispatcherUpdate_Impl( void*, void* pArg )
{
- ((SfxDispatcher*) pArg)->Update_Impl( true );
- ((SfxDispatcher*) pArg)->GetBindings()->InvalidateAll(false);
+ static_cast<SfxDispatcher*>(pArg)->Update_Impl( true );
+ static_cast<SfxDispatcher*>(pArg)->GetBindings()->InvalidateAll(false);
return 0;
}