summaryrefslogtreecommitdiff
path: root/UnoControls
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:22:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:22:58 +0200
commitb997705c07810d032c2f0293d4cfbccf14679855 (patch)
tree32e27284e27efef1a33d2ba8c35615ac6004e704 /UnoControls
parent43cc6fa1fa704ff53e56e8fe34e673c6733c9b4e (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I2828f5fe78efffaa5dee19a3d56592d12878d956
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/inc/multiplexer.hxx2
-rw-r--r--UnoControls/source/base/basecontainercontrol.cxx4
-rw-r--r--UnoControls/source/base/basecontrol.cxx6
-rw-r--r--UnoControls/source/controls/OConnectionPointContainerHelper.cxx2
-rw-r--r--UnoControls/source/controls/framecontrol.cxx6
5 files changed, 10 insertions, 10 deletions
diff --git a/UnoControls/inc/multiplexer.hxx b/UnoControls/inc/multiplexer.hxx
index 0c706479c052..f0217502a026 100644
--- a/UnoControls/inc/multiplexer.hxx
+++ b/UnoControls/inc/multiplexer.hxx
@@ -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)));}
/**_______________________________________________________________________________________________________
*/
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx
index 7c8e5e0e67e7..006a7b614073 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -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 ...
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index 5da9907b88ef..09a8734b2d96 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -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;
diff --git a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
index f7125f9b8a12..2034db78ef98 100644
--- a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
@@ -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;
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index da8fd36e274f..3b34a9fe4d29 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -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()".)