summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-31 13:16:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-03-31 13:16:18 +0200
commit64f6190d84055f4c19b024017079fea0dce999a4 (patch)
tree33b268c714b03d099f361af3da40c6815433b47b /sd
parent6b97231ba338e7d69f882316b7615feecb54cb33 (diff)
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I0b1cbc96f85b6345b8abc843e5d609f9cc8a24b9
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/html/htmlex.cxx2
-rw-r--r--sd/source/ui/app/sdxfer.cxx2
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx6
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx4
-rw-r--r--sd/source/ui/unoidl/facreg.cxx2
-rw-r--r--sd/source/ui/view/viewshel.cxx2
7 files changed, 10 insertions, 10 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index eb4e77e86105..3bdbae53f114 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1081,7 +1081,7 @@ OUString HtmlExport::DocumentMetadata() const
" ", RTL_TEXTENCODING_UTF8,
&aNonConvertableCharacters);
- OString aData(reinterpret_cast<const char*>(aStream.GetData()), aStream.GetSize());
+ OString aData(static_cast<const char*>(aStream.GetData()), aStream.GetSize());
return OStringToOUString(aData, RTL_TEXTENCODING_UTF8);
}
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 67170e969f4a..32b0278d8686 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -827,7 +827,7 @@ bool SdTransferable::SetTableRTF( SdDrawDocument* pModel, const DataFlavor& rFla
{
SvMemoryStream aMemStm( 65535, 65535 );
sdr::table::SdrTableObj::ExportAsRTF( aMemStm, *pTableObj );
- return SetAny( Any( Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ) ), rFlavor );
+ return SetAny( Any( Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ) ), rFlavor );
}
}
}
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index e478adf69c77..cd90acf2f1f7 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1226,7 +1226,7 @@ void SdPageObjsTLB::DoDrag()
SdrObject* pObject = NULL;
void* pUserData = GetCurEntry()->GetUserData();
if (pUserData != NULL && pUserData != reinterpret_cast<void*>(1))
- pObject = reinterpret_cast<SdrObject*>(pUserData);
+ pObject = static_cast<SdrObject*>(pUserData);
if (pObject != NULL)
{
// For shapes without a user supplied name (the automatically
@@ -1413,8 +1413,8 @@ TriState SdPageObjsTLB::NotifyMoving(
while (GetParent(pDestination) != NULL && GetParent(GetParent(pDestination)) != NULL)
pDestination = GetParent(pDestination);
- SdrObject* pTargetObject = reinterpret_cast<SdrObject*>(pDestination->GetUserData());
- SdrObject* pSourceObject = reinterpret_cast<SdrObject*>(pEntry->GetUserData());
+ SdrObject* pTargetObject = static_cast<SdrObject*>(pDestination->GetUserData());
+ SdrObject* pSourceObject = static_cast<SdrObject*>(pEntry->GetUserData());
if (pSourceObject == reinterpret_cast<SdrObject*>(1))
pSourceObject = NULL;
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index ec7852cde50e..6a0e7b35082b 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -465,7 +465,7 @@ MasterPagesSelector::UserData* MasterPagesSelector::GetUserData (int nIndex) con
const ::osl::MutexGuard aGuard (maMutex);
if (nIndex>0 && static_cast<unsigned int>(nIndex)<=PreviewValueSet::GetItemCount())
- return reinterpret_cast<UserData*>(PreviewValueSet::GetItemData((sal_uInt16)nIndex));
+ return static_cast<UserData*>(PreviewValueSet::GetItemData((sal_uInt16)nIndex));
else
return NULL;
}
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 21c95f0dd29f..1157b2973e3d 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -907,7 +907,7 @@ sal_Int8 Clipboard::ExecuteOrAcceptShapeDrop (
{
case DC_ACCEPT:
nResult = pDrawViewShell->AcceptDrop(
- *reinterpret_cast<const AcceptDropEvent*>(pDropEvent),
+ *static_cast<const AcceptDropEvent*>(pDropEvent),
rTargetHelper,
pTargetWindow,
nPage,
@@ -916,7 +916,7 @@ sal_Int8 Clipboard::ExecuteOrAcceptShapeDrop (
case DC_EXECUTE:
nResult = pDrawViewShell->ExecuteDrop(
- *reinterpret_cast<const ExecuteDropEvent*>(pDropEvent),
+ *static_cast<const ExecuteDropEvent*>(pDropEvent),
rTargetHelper,
pTargetWindow,
nPage,
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index 21f63c92e6d2..05ca4eae7b1d 100644
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -71,7 +71,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sd_component_getFactory(
if( pServiceManager )
{
- uno::Reference< lang::XMultiServiceFactory > xMSF( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
+ uno::Reference< lang::XMultiServiceFactory > xMSF( static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
uno::Reference<lang::XSingleServiceFactory> xFactory;
uno::Reference<lang::XSingleComponentFactory> xComponentFactory;
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 48451783aa18..9ffd64317c3d 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -667,7 +667,7 @@ bool ViewShell::Notify(NotifyEvent& rNEvt, ::sd::Window* pWin)
if( rNEvt.GetType() == MouseNotifyEvent::COMMAND )
{
// note: dynamic_cast is not possible as GetData() returns a void*
- CommandEvent* pCmdEvent = reinterpret_cast< CommandEvent* >(rNEvt.GetData());
+ CommandEvent* pCmdEvent = static_cast< CommandEvent* >(rNEvt.GetData());
nRet = HandleScrollCommand(*pCmdEvent, pWin);
}
return nRet;