diff options
-rw-r--r-- | cppuhelper/source/component.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/weak.cxx | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index ec154f855476..dd5bf47f3762 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -168,7 +168,7 @@ void OComponentHelper::dispose() try { Reference<XInterface > xSource( - Reference<XInterface >::query( (XComponent *)this ) ); + Reference<XInterface >::query( static_cast<XComponent *>(this) ) ); EventObject aEvt; aEvt.Source = xSource; // inform all listeners to release this object @@ -218,7 +218,7 @@ void OComponentHelper::addEventListener( if (rBHelper.bDisposed || rBHelper.bInDispose) { aGuard.clear(); - Reference< XInterface > x( (XComponent *)this, UNO_QUERY ); + Reference< XInterface > x( static_cast<XComponent *>(this), UNO_QUERY ); rxListener->disposing( EventObject( x ) ); } else diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index 5be08741b499..153a92139865 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -648,7 +648,7 @@ void OPropertySetHelper::fire // create the event sequence of all changed properties Sequence< PropertyChangeEvent > aEvts( nHandles ); PropertyChangeEvent * pEvts = aEvts.getArray(); - Reference < XInterface > xSource( (XPropertySet *)this, UNO_QUERY ); + Reference < XInterface > xSource( static_cast<XPropertySet *>(this), UNO_QUERY ); sal_Int32 i; sal_Int32 nChangesLen = 0; // Loop over all changed properties to fill the event struct @@ -975,7 +975,7 @@ void OPropertySetHelper::firePropertiesChangeEvent( { // must lock the mutex outside the loop. So all values are consistent. MutexGuard aGuard( rBHelper.rMutex ); - Reference < XInterface > xSource( (XPropertySet *)this, UNO_QUERY ); + Reference < XInterface > xSource( static_cast<XPropertySet *>(this), UNO_QUERY ); sal_Int32 nFirePos = 0; for( i = 0; i < nLen; i++ ) { diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index deb3a2b64743..7532955ad4e6 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -350,7 +350,7 @@ OWeakRefListener::OWeakRefListener(const Reference< XInterface >& xInt) if (m_XWeakConnectionPoint.is()) { - m_XWeakConnectionPoint->addReference((XReference*)this); + m_XWeakConnectionPoint->addReference(static_cast<XReference*>(this)); } } } @@ -365,7 +365,7 @@ OWeakRefListener::~OWeakRefListener() if (m_XWeakConnectionPoint.is()) { acquire(); // dont die again - m_XWeakConnectionPoint->removeReference((XReference*)this); + m_XWeakConnectionPoint->removeReference(static_cast<XReference*>(this)); } } catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected() @@ -405,7 +405,7 @@ void SAL_CALL OWeakRefListener::dispose() } if( xAdp.is() ) - xAdp->removeReference((XReference*)this); + xAdp->removeReference(static_cast<XReference*>(this)); } @@ -441,7 +441,7 @@ void WeakReferenceHelper::clear() if (m_pImpl->m_XWeakConnectionPoint.is()) { m_pImpl->m_XWeakConnectionPoint->removeReference( - (XReference*)m_pImpl); + static_cast<XReference*>(m_pImpl)); m_pImpl->m_XWeakConnectionPoint.clear(); } m_pImpl->release(); |