summaryrefslogtreecommitdiff
path: root/UnoControls/source/base
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:09:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:14 +0100
commit3bf5bc03748a8f9a49bb286195a47e6a76d6464d (patch)
tree0d437456fb187bbe5e7b2e41804b8b2edc53ed78 /UnoControls/source/base
parent7ab1fb297253971a04c57bbe201e79a4d7df590d (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I8be8b75317f0a8cf9005feefea05c053b76c7b0f
Diffstat (limited to 'UnoControls/source/base')
-rw-r--r--UnoControls/source/base/basecontainercontrol.cxx6
-rw-r--r--UnoControls/source/base/basecontrol.cxx16
-rw-r--r--UnoControls/source/base/multiplexer.cxx2
3 files changed, 12 insertions, 12 deletions
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx
index e3a45af9d2ed..cb00544b67d6 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -76,15 +76,15 @@ Sequence< Type > SAL_CALL BaseContainerControl::getTypes() throw( RuntimeExcepti
// 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; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL!
- static OTypeCollection* pTypeCollection = NULL;
+ static OTypeCollection* pTypeCollection = nullptr;
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( Mutex::getGlobalMutex() );
// Control these pointer again ... it can be, that another instance will be faster then these!
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
// Create a static typecollection ...
static OTypeCollection aTypeCollection ( cppu::UnoType<XControlModel>::get(),
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index 08474e7469e9..79c5fd6fc48a 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star::awt;
namespace unocontrols{
-#define DEFAULT_PMULTIPLEXER NULL
+#define DEFAULT_PMULTIPLEXER nullptr
#define DEFAULT_X 0
#define DEFAULT_Y 0
#define DEFAULT_WIDTH 100
@@ -119,15 +119,15 @@ Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException, std::
// 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; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL!
- static OTypeCollection* pTypeCollection = NULL;
+ static OTypeCollection* pTypeCollection = nullptr;
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
// Ready for multithreading; get global mutex for first call of this method only! see before
MutexGuard aGuard( Mutex::getGlobalMutex() );
// Control these pointer again ... it can be, that another instance will be faster then these!
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
// Create a static typecollection ...
static OTypeCollection aTypeCollection( cppu::UnoType<XPaintListener>::get(),
@@ -220,7 +220,7 @@ void SAL_CALL BaseControl::dispose() throw( RuntimeException, std::exception )
// Ready for multithreading
MutexGuard aGuard( m_aMutex );
- if ( m_pMultiplexer != NULL )
+ if ( m_pMultiplexer != nullptr )
{
// to all other paint, focus, etc.
m_pMultiplexer->disposeAndClear();
@@ -292,7 +292,7 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo
if ( m_xPeerWindow.is() )
{
- if ( m_pMultiplexer != NULL )
+ if ( m_pMultiplexer != nullptr )
{
m_pMultiplexer->setPeer( m_xPeerWindow );
}
@@ -773,7 +773,7 @@ void BaseControl::impl_releasePeer()
m_xPeerWindow.clear();
m_xPeer.clear();
- if ( m_pMultiplexer != NULL )
+ if ( m_pMultiplexer != nullptr )
{
// take changes on multiplexer
m_pMultiplexer->setPeer( Reference< XWindow >() );
@@ -785,7 +785,7 @@ void BaseControl::impl_releasePeer()
OMRCListenerMultiplexerHelper* BaseControl::impl_getMultiplexer()
{
- if ( m_pMultiplexer == NULL )
+ if ( m_pMultiplexer == nullptr )
{
m_pMultiplexer = new OMRCListenerMultiplexerHelper( static_cast<XWindow*>(this), m_xPeerWindow );
m_xMultiplexer.set( static_cast<OWeakObject*>(m_pMultiplexer), UNO_QUERY );
diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx
index e6ddac31c4d5..fbf13bff4957 100644
--- a/UnoControls/source/base/multiplexer.cxx
+++ b/UnoControls/source/base/multiplexer.cxx
@@ -37,7 +37,7 @@ namespace unocontrols{
/* First get all interfaces from container with right type.*/ \
OInterfaceContainerHelper* pContainer = m_aListenerHolder.getContainer( cppu::UnoType<INTERFACE>::get() ); \
/* Do the follow only, if elements in container exist.*/ \
- if( pContainer != NULL ) \
+ if( pContainer != nullptr ) \
{ \
OInterfaceIteratorHelper aIterator( *pContainer ); \
EVENTTYP aLocalEvent = EVENT; \