Kaydet (Commit) b997705c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:cstylecast: deal with remaining pointer casts

Change-Id: I2828f5fe78efffaa5dee19a3d56592d12878d956
üst 43cc6fa1
......@@ -134,7 +134,7 @@ public:
/**_______________________________________________________________________________________________________
*/
operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() const { return ((OWeakObject*)this);}
operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() const { return (static_cast<OWeakObject*>(const_cast<OMRCListenerMultiplexerHelper *>(this)));}
/**_______________________________________________________________________________________________________
*/
......
......@@ -179,7 +179,7 @@ void SAL_CALL BaseContainerControl::dispose() throw( RuntimeException, std::exce
// remove listeners
EventObject aObject;
aObject.Source = Reference< XComponent > ( (XControlContainer*)this, UNO_QUERY );
aObject.Source = Reference< XComponent > ( static_cast<XControlContainer*>(this), UNO_QUERY );
m_aListeners.disposeAndClear( aObject );
// remove controls
......@@ -236,7 +236,7 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re
maControlInfoList.push_back( pNewControl );
// initialize new control
pNewControl->xControl->setContext ( (OWeakObject*)this );
pNewControl->xControl->setContext ( static_cast<OWeakObject*>(this) );
pNewControl->xControl->addEventListener ( static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) ) );
// when container has a peer ...
......
......@@ -361,7 +361,7 @@ Reference< XView > SAL_CALL BaseControl::getView() throw( RuntimeException, std:
{
// Ready for multithreading
MutexGuard aGuard( m_aMutex );
return Reference< XView >( (OWeakObject*)this, UNO_QUERY );
return Reference< XView >( static_cast<OWeakObject*>(this), UNO_QUERY );
}
// XControl
......@@ -787,8 +787,8 @@ OMRCListenerMultiplexerHelper* BaseControl::impl_getMultiplexer()
{
if ( m_pMultiplexer == NULL )
{
m_pMultiplexer = new OMRCListenerMultiplexerHelper( (XWindow*)this, m_xPeerWindow );
m_xMultiplexer = Reference< XInterface >( (OWeakObject*)m_pMultiplexer, UNO_QUERY );
m_pMultiplexer = new OMRCListenerMultiplexerHelper( static_cast<XWindow*>(this), m_xPeerWindow );
m_xMultiplexer = Reference< XInterface >( static_cast<OWeakObject*>(m_pMultiplexer), UNO_QUERY );
}
return m_pMultiplexer;
......
......@@ -112,7 +112,7 @@ Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryCon
MutexGuard aGuard( m_aSharedMutex );
// If this container contains elements, build a connectionpoint-instance.
OConnectionPointHelper* pNewConnectionPoint = new OConnectionPointHelper( m_aSharedMutex, this, aType );
xConnectionPoint = Reference< XConnectionPoint >( (OWeakObject*)pNewConnectionPoint, UNO_QUERY );
xConnectionPoint = Reference< XConnectionPoint >( static_cast<OWeakObject*>(pNewConnectionPoint), UNO_QUERY );
}
return xConnectionPoint;
......
......@@ -382,13 +382,13 @@ Reference< XPropertySetInfo > SAL_CALL FrameControl::getPropertySetInfo() throw(
// Optimize this method !
// We initialize a static variable only one time. And we don't must use a mutex at every call!
// For the first call; pInfo is NULL - for the second call pInfo is different from NULL!
static Reference< XPropertySetInfo >* pInfo = (Reference< XPropertySetInfo >*)0;
if ( pInfo == (Reference< XPropertySetInfo >*)0 )
static Reference< XPropertySetInfo >* pInfo = nullptr;
if ( pInfo == nullptr )
{
// Ready for multithreading
MutexGuard aGuard ( Mutex::getGlobalMutex () );
// Control this pointer again, another instance can be faster then these!
if ( pInfo == (Reference< XPropertySetInfo >*)0 )
if ( pInfo == nullptr )
{
// Create structure of propertysetinfo for baseclass "OPropertySetHelper".
// (Use method "getInfoHelper()".)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment