summaryrefslogtreecommitdiff
path: root/eventattacher
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:24:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:24:59 +0200
commitffec518e56027fd3aa64af61bfb60811ea78b26d (patch)
treeab64f5188a7aedbd5b0af67804e2bfc3d349d884 /eventattacher
parentd5dde729086c680c99e660220d7c73a6c3771ae4 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: Ic657326fc9a73e97bf0a2ac650ce3700e0ca865b
Diffstat (limited to 'eventattacher')
-rw-r--r--eventattacher/source/eventattacher.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx
index 6e7cd7cbbdc3..6dcae48b302e 100644
--- a/eventattacher/source/eventattacher.cxx
+++ b/eventattacher/source/eventattacher.cxx
@@ -97,7 +97,7 @@ Reference< XInterface > createAllListenerAdapter
if( xInvocationAdapterFactory.is() && xListenerType.is() && xListener.is() )
{
Reference< XInvocation > xInvocationToAllListenerMapper =
- (XInvocation*)new InvocationToAllListenerMapper( xListenerType, xListener, Helper );
+ static_cast<XInvocation*>(new InvocationToAllListenerMapper( xListenerType, xListener, Helper ));
Type aListenerType( xListenerType->getTypeClass(), xListenerType->getName());
Sequence<Type> arg2(1);
arg2[0] = aListenerType;
@@ -163,7 +163,7 @@ Any SAL_CALL InvocationToAllListenerMapper::invoke(const OUString& FunctionName,
}
AllEventObject aAllEvent;
- aAllEvent.Source = (OWeakObject*) this;
+ aAllEvent.Source = static_cast<OWeakObject*>(this);
aAllEvent.Helper = m_Helper;
aAllEvent.ListenerType = Type(m_xListenerType->getTypeClass(), m_xListenerType->getName());
aAllEvent.MethodName = FunctionName;
@@ -296,7 +296,7 @@ EventAttacherImpl::~EventAttacherImpl()
Reference< XInterface > SAL_CALL EventAttacherImpl_CreateInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( Exception )
{
- XEventAttacher *pEventAttacher = (XEventAttacher*) new EventAttacherImpl( comphelper::getComponentContext(rSMgr) );
+ XEventAttacher *pEventAttacher = static_cast<XEventAttacher*>(new EventAttacherImpl( comphelper::getComponentContext(rSMgr) ));
Reference< XInterface > xRet = Reference<XInterface>::query(pEventAttacher);
@@ -762,8 +762,8 @@ Reference< XEventListener > EventAttacherImpl::attachSingleEventListener
throw( IllegalArgumentException, ServiceNotRegisteredException, CannotCreateAdapterException, IntrospectionException, RuntimeException, std::exception )
{
// Subscribe FilterListener
- Reference< XAllListener > aFilterListener = (XAllListener*)
- new FilterAllListenerImpl( this, EventMethod, AllListener );
+ Reference< XAllListener > aFilterListener = static_cast<XAllListener*>(
+ new FilterAllListenerImpl( this, EventMethod, AllListener ));
return attachListener( xObject, aFilterListener, Helper, ListenerType, AddListenerParam);
}
@@ -880,8 +880,8 @@ Sequence< Reference<XEventListener> > EventAttacherImpl::attachMultipleEventList
Sequence< Reference<XAllListener> > aFilterListeners(nCount);
for (sal_Int32 i = 0; i < nCount; ++i)
{
- aFilterListeners[i] = (XAllListener*)
- new FilterAllListenerImpl(this, aListeners[i].EventMethod, aListeners[i].AllListener);
+ aFilterListeners[i] = static_cast<XAllListener*>(
+ new FilterAllListenerImpl(this, aListeners[i].EventMethod, aListeners[i].AllListener));
}
return attachListeners(xObject, aFilterListeners, aListeners);