From 5139fad429cc70c5c235714e1e9530c28f9b722d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 18 Sep 2014 14:38:54 +0200 Subject: loplugin: cstylecast Change-Id: I84873c9f84651dc8a1337f37c63020b461314e1b --- comphelper/source/eventattachermgr/eventattachermgr.cxx | 4 ++-- comphelper/source/misc/accessiblewrapper.cxx | 6 +++--- comphelper/source/misc/numberedcollection.cxx | 4 ++-- comphelper/source/property/propagg.cxx | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx index 1de52115dfed..21d8c399a211 100644 --- a/comphelper/source/eventattachermgr/eventattachermgr.cxx +++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx @@ -195,7 +195,7 @@ void SAL_CALL AttacherAllListener_Impl::firing(const AllEventObject& Event) // Iterate over all listeners and pass events. OInterfaceIteratorHelper aIt( mpManager->aScriptListeners ); while( aIt.hasMoreElements() ) - ((XScriptListener *)aIt.next())->firing( aScriptEvent ); + static_cast(aIt.next())->firing( aScriptEvent ); } @@ -263,7 +263,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even OInterfaceIteratorHelper aIt( mpManager->aScriptListeners ); while( aIt.hasMoreElements() ) { - aRet = ((XScriptListener *)aIt.next())->approveFiring( aScriptEvent ); + aRet = static_cast(aIt.next())->approveFiring( aScriptEvent ); try { Reference< XIdlClass > xListenerType = mpManager->getReflection()-> diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 1b4d26ebcb4d..7a1fba581757 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -142,7 +142,7 @@ namespace comphelper else if ( _bCreate ) { // not found in the cache, and allowed to create // -> new wrapper - xValue = new OAccessibleWrapper( m_xContext, _rxKey, (Reference< XAccessible >)m_aOwningAccessible ); + xValue = new OAccessibleWrapper( m_xContext, _rxKey, m_aOwningAccessible ); // see if we do cache children if ( !m_bTransientChildren ) @@ -336,7 +336,7 @@ namespace comphelper Reference< XAccessibleContext > OAccessibleWrapper::getContextNoCreate( ) const { - return (Reference< XAccessibleContext >)m_aContext; + return m_aContext; } @@ -349,7 +349,7 @@ namespace comphelper Reference< XAccessibleContext > SAL_CALL OAccessibleWrapper::getAccessibleContext( ) throw (RuntimeException, std::exception) { // see if the context is still alive (we cache it) - Reference< XAccessibleContext > xContext = (Reference< XAccessibleContext >)m_aContext; + Reference< XAccessibleContext > xContext = m_aContext; if ( !xContext.is() ) { // create a new context diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx index 4283360bf06a..e927475df95b 100644 --- a/comphelper/source/misc/numberedcollection.cxx +++ b/comphelper/source/misc/numberedcollection.cxx @@ -74,7 +74,7 @@ void NumberedCollection::setUntitledPrefix(const OUString& sPrefix) if ( ! xComponent.is ()) throw css::lang::IllegalArgumentException (OUString(ERRMSG_INVALID_COMPONENT_PARAM), m_xOwner.get(), 1); - sal_IntPtr pComponent = (sal_IntPtr) xComponent.get (); + sal_IntPtr pComponent = reinterpret_cast( xComponent.get() ); TNumberedItemHash::const_iterator pIt = m_lComponents.find (pComponent); // a) component already exists - return it's number directly @@ -150,7 +150,7 @@ void SAL_CALL NumberedCollection::releaseNumberForComponent(const css::uno::Refe if ( ! xComponent.is ()) throw css::lang::IllegalArgumentException (OUString(ERRMSG_INVALID_COMPONENT_PARAM), m_xOwner.get(), 1); - sal_IntPtr pComponent = (sal_IntPtr) xComponent.get (); + sal_IntPtr pComponent = reinterpret_cast( xComponent.get() ); TNumberedItemHash::iterator pIt = m_lComponents.find (pComponent); // a) component exists and will be removed diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index 95fe1f5768ab..9edc06400a32 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -624,7 +624,7 @@ void SAL_CALL OPropertySetAggregationHelper::addPropertiesChangeListener(const sal_Int32 OPropertySetAggregationHelper::getOriginalHandle(sal_Int32 nHandle) const { - OPropertyArrayAggregationHelper& rPH = (OPropertyArrayAggregationHelper&)const_cast(this)->getInfoHelper(); + OPropertyArrayAggregationHelper& rPH = static_cast( const_cast(this)->getInfoHelper() ); sal_Int32 nOriginalHandle = -1; (void)rPH.fillAggregatePropertyInfoByHandle(NULL, &nOriginalHandle, nHandle); return nOriginalHandle; @@ -662,7 +662,7 @@ void SAL_CALL OPropertySetAggregationHelper::setFastPropertyValue(sal_Int32 _nHa void OPropertySetAggregationHelper::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle) const { - OPropertyArrayAggregationHelper& rPH = (OPropertyArrayAggregationHelper&)const_cast(this)->getInfoHelper(); + OPropertyArrayAggregationHelper& rPH = static_cast( const_cast(this)->getInfoHelper() ); OUString aPropName; sal_Int32 nOriginalHandle = -1; -- cgit