summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:11:47 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:19 +0100
commitfb4ce444c2239aa089b0b3c8f4b7629a624edea2 (patch)
tree518ecd4aeddc5d7b68a8051c66107751b7600451 /comphelper
parent87a9abf351d1547638ec25c72d7fcb27d1b61440 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Ibd0e6ae5e3243464b2484a009f2b4781bdaac471
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/container.cxx2
-rw-r--r--comphelper/source/container/containermultiplexer.cxx18
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx8
-rw-r--r--comphelper/source/container/enumerablemap.cxx6
-rw-r--r--comphelper/source/misc/SelectionMultiplex.cxx14
-rw-r--r--comphelper/source/misc/accessiblecontexthelper.cxx8
-rw-r--r--comphelper/source/misc/accessibleeventnotifier.cxx2
-rw-r--r--comphelper/source/misc/accessiblewrapper.cxx4
-rw-r--r--comphelper/source/misc/accimplaccess.cxx6
-rw-r--r--comphelper/source/misc/anytostring.cxx26
-rw-r--r--comphelper/source/misc/componentbase.cxx2
-rw-r--r--comphelper/source/misc/componentmodule.cxx4
-rw-r--r--comphelper/source/misc/configuration.cxx8
-rw-r--r--comphelper/source/misc/evtmethodhelper.cxx4
-rw-r--r--comphelper/source/misc/instancelocker.cxx8
-rw-r--r--comphelper/source/misc/namedvaluecollection.cxx2
-rw-r--r--comphelper/source/misc/proxyaggregation.cxx2
-rw-r--r--comphelper/source/misc/random.cxx2
-rw-r--r--comphelper/source/misc/servicedecl.cxx2
-rw-r--r--comphelper/source/misc/solarmutex.cxx2
-rw-r--r--comphelper/source/misc/storagehelper.cxx2
-rw-r--r--comphelper/source/misc/syntaxhighlight.cxx4
-rw-r--r--comphelper/source/misc/threadpool.cxx4
-rw-r--r--comphelper/source/misc/types.cxx4
-rw-r--r--comphelper/source/officeinstdir/officeinstallationdirectories.cxx8
-rw-r--r--comphelper/source/property/opropertybag.cxx4
-rw-r--r--comphelper/source/property/propagg.cxx8
-rw-r--r--comphelper/source/property/property.cxx2
-rw-r--r--comphelper/source/property/propertybag.cxx16
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx8
-rw-r--r--comphelper/source/property/propertysethelper.cxx30
-rw-r--r--comphelper/source/property/propmultiplex.cxx14
-rw-r--r--comphelper/source/streaming/oslfile2streamwrap.cxx2
33 files changed, 118 insertions, 118 deletions
diff --git a/comphelper/source/container/container.cxx b/comphelper/source/container/container.cxx
index a8bd89639451..379ac9825338 100644
--- a/comphelper/source/container/container.cxx
+++ b/comphelper/source/container/container.cxx
@@ -31,7 +31,7 @@ namespace comphelper
IndexAccessIterator::IndexAccessIterator(css::uno::Reference< css::uno::XInterface> xStartingPoint)
:m_xStartingPoint(xStartingPoint)
- ,m_xCurrentObject(NULL)
+ ,m_xCurrentObject(nullptr)
{
OSL_ENSURE(m_xStartingPoint.is(), "IndexAccessIterator::IndexAccessIterator : no starting point !");
}
diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx
index 8758b4271225..c8fd633a0282 100644
--- a/comphelper/source/container/containermultiplexer.cxx
+++ b/comphelper/source/container/containermultiplexer.cxx
@@ -29,7 +29,7 @@ namespace comphelper
using namespace ::com::sun::star::container;
OContainerListener::OContainerListener(::osl::Mutex& _rMutex)
- :m_pAdapter(NULL)
+ :m_pAdapter(nullptr)
,m_rMutex(_rMutex)
{
}
@@ -40,7 +40,7 @@ namespace comphelper
if (m_pAdapter)
{
m_pAdapter->dispose();
- m_pAdapter = NULL;
+ m_pAdapter = nullptr;
}
}
@@ -75,7 +75,7 @@ namespace comphelper
{
::osl::MutexGuard aGuard(m_rMutex);
m_pAdapter->release();
- m_pAdapter = NULL;
+ m_pAdapter = nullptr;
}
if (pAdapter)
@@ -121,14 +121,14 @@ namespace comphelper
{
Reference< XContainerListener > xPreventDelete(this);
m_xContainer->removeContainerListener(xPreventDelete);
- m_pListener->setAdapter(NULL);
+ m_pListener->setAdapter(nullptr);
}
catch(const Exception&)
{
OSL_FAIL("Exception caught!");
}
- m_xContainer = NULL;
- m_pListener = NULL;
+ m_xContainer = nullptr;
+ m_pListener = nullptr;
}
}
@@ -142,11 +142,11 @@ namespace comphelper
m_pListener->_disposing(_rSource);
// disconnect the listener
if ( m_pListener )
- m_pListener->setAdapter(NULL);
+ m_pListener->setAdapter(nullptr);
}
- m_xContainer = NULL;
- m_pListener = NULL;
+ m_xContainer = nullptr;
+ m_pListener = nullptr;
}
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 09e93dd3e515..33814fbde73f 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -101,7 +101,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer()
pImpl->mxStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
pImpl->mbOwnsStorage = true;
pImpl->mbUserAllowsLinkUpdate = true;
- pImpl->mpTempObjectContainer = 0;
+ pImpl->mpTempObjectContainer = nullptr;
}
EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::XStorage >& rStor )
@@ -110,7 +110,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
pImpl->mxStorage = rStor;
pImpl->mbOwnsStorage = false;
pImpl->mbUserAllowsLinkUpdate = true;
- pImpl->mpTempObjectContainer = 0;
+ pImpl->mpTempObjectContainer = nullptr;
}
EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::XStorage >& rStor, const uno::Reference < uno::XInterface >& xModel )
@@ -119,7 +119,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
pImpl->mxStorage = rStor;
pImpl->mbOwnsStorage = false;
pImpl->mbUserAllowsLinkUpdate = true;
- pImpl->mpTempObjectContainer = 0;
+ pImpl->mpTempObjectContainer = nullptr;
pImpl->m_xModel = xModel;
}
@@ -438,7 +438,7 @@ void EmbeddedObjectContainer::AddEmbeddedObject( const css::uno::Reference < css
if ( xStream.is() )
{
InsertGraphicStream( xStream, rName, aMediaType );
- xStream = 0;
+ xStream = nullptr;
pImpl->mpTempObjectContainer->RemoveGraphicStream( aTempName );
}
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index f8f3ea8a9a6d..897bd020ac3a 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -277,7 +277,7 @@ namespace comphelper
const EnumerationType _type, const bool _isolated )
:ComponentBase( _rBHelper, ComponentBase::NoInitializationNeeded() )
,m_xKeepMapAlive( _parentMap )
- ,m_pMapDataCopy( _isolated ? new MapData( _mapData ) : NULL )
+ ,m_pMapDataCopy( _isolated ? new MapData( _mapData ) : nullptr )
,m_aEnumerator( *this, _isolated ? *m_pMapDataCopy : _mapData, _type )
{
}
@@ -352,7 +352,7 @@ namespace comphelper
throw IllegalTypeException("Unsupported value type.", *this );
// create the comparator for the KeyType, and throw if the type is not supported
- ::std::unique_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType, NULL ) );
+ ::std::unique_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType, nullptr ) );
if ( !pComparator.get() )
throw IllegalTypeException("Unsupported key type.", *this );
@@ -442,7 +442,7 @@ namespace comphelper
break;
pValueCompoundTypeDesc = pValueCompoundTypeDesc->pBaseTypeDescription;
}
- bValid = ( pValueCompoundTypeDesc != NULL );
+ bValid = ( pValueCompoundTypeDesc != nullptr );
}
}
break;
diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx
index bff3e33819fa..26a191c21f30 100644
--- a/comphelper/source/misc/SelectionMultiplex.cxx
+++ b/comphelper/source/misc/SelectionMultiplex.cxx
@@ -50,7 +50,7 @@ void OSelectionChangeListener::setAdapter(OSelectionChangeMultiplexer* pAdapter)
{
::osl::MutexGuard aGuard(m_rMutex);
m_pAdapter->release();
- m_pAdapter = NULL;
+ m_pAdapter = nullptr;
}
if (pAdapter)
@@ -103,13 +103,13 @@ void OSelectionChangeMultiplexer::dispose()
m_xSet->removeSelectionChangeListener(xPreventDelete);
- m_pListener->setAdapter(NULL);
+ m_pListener->setAdapter(nullptr);
- m_pListener = NULL;
+ m_pListener = nullptr;
m_bListening = false;
if (m_bAutoSetRelease)
- m_xSet = NULL;
+ m_xSet = nullptr;
}
}
@@ -124,14 +124,14 @@ void SAL_CALL OSelectionChangeMultiplexer::disposing( const EventObject& _rSour
m_pListener->_disposing(_rSource);
// disconnect the listener
if (m_pListener) // may have been reset whilest calling into _disposing
- m_pListener->setAdapter(NULL);
+ m_pListener->setAdapter(nullptr);
}
- m_pListener = NULL;
+ m_pListener = nullptr;
m_bListening = false;
if (m_bAutoSetRelease)
- m_xSet = NULL;
+ m_xSet = nullptr;
}
// XSelectionChangeListener
diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx
index de3209f0eb4d..ad56678b6c0c 100644
--- a/comphelper/source/misc/accessiblecontexthelper.cxx
+++ b/comphelper/source/misc/accessiblecontexthelper.cxx
@@ -60,7 +60,7 @@ namespace comphelper
public:
OContextHelper_Impl()
- :m_pExternalLock( NULL )
+ :m_pExternalLock( nullptr )
,m_nClientId( 0 )
{
}
@@ -74,7 +74,7 @@ namespace comphelper
OAccessibleContextHelper::OAccessibleContextHelper( IMutex* _pExternalLock )
:OAccessibleContextHelper_Base( GetMutex() )
- ,m_pImpl( NULL )
+ ,m_pImpl( nullptr )
{
assert(_pExternalLock);
m_pImpl = new OContextHelper_Impl();
@@ -84,7 +84,7 @@ namespace comphelper
void OAccessibleContextHelper::forgetExternalLock()
{
- m_pImpl->setExternalLock( NULL );
+ m_pImpl->setExternalLock( nullptr );
}
@@ -97,7 +97,7 @@ namespace comphelper
ensureDisposed();
delete m_pImpl;
- m_pImpl = NULL;
+ m_pImpl = nullptr;
}
diff --git a/comphelper/source/misc/accessibleeventnotifier.cxx b/comphelper/source/misc/accessibleeventnotifier.cxx
index c375abdfed70..8cf351993ef2 100644
--- a/comphelper/source/misc/accessibleeventnotifier.cxx
+++ b/comphelper/source/misc/accessibleeventnotifier.cxx
@@ -187,7 +187,7 @@ namespace comphelper
void AccessibleEventNotifier::revokeClientNotifyDisposing( const TClientId _nClient,
const Reference< XInterface >& _rxEventSource )
{
- ::cppu::OInterfaceContainerHelper* pListeners(0);
+ ::cppu::OInterfaceContainerHelper* pListeners(nullptr);
{
// rhbz#1001768 drop the mutex before calling disposeAndClear
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index 828e09b8d331..5e5262156e0d 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -347,7 +347,7 @@ namespace comphelper
,m_xInnerContext( _rxInnerAccessibleContext )
,m_xOwningAccessible( _rxOwningAccessible )
,m_xParentAccessible( _rxParentAccessible )
- ,m_pChildMapper( NULL )
+ ,m_pChildMapper( nullptr )
{
// initialize the mapper for our children
m_pChildMapper = new OWrappedAccessibleChildrenManager( getComponentContext() );
@@ -385,7 +385,7 @@ namespace comphelper
OSL_ENSURE( m_rBHelper.bDisposed, "OAccessibleContextWrapperHelper::~OAccessibleContextWrapperHelper: you should ensure (in your dtor) that the object is disposed!" );
m_pChildMapper->release();
- m_pChildMapper = NULL;
+ m_pChildMapper = nullptr;
}
diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx
index 757dbb5dcc10..e6a3f3cf4dc9 100644
--- a/comphelper/source/misc/accimplaccess.cxx
+++ b/comphelper/source/misc/accimplaccess.cxx
@@ -55,7 +55,7 @@ namespace comphelper
OAccessibleImplementationAccess::~OAccessibleImplementationAccess( )
{
delete m_pImpl;
- m_pImpl = NULL;
+ m_pImpl = nullptr;
}
@@ -101,7 +101,7 @@ namespace comphelper
OAccessibleImplementationAccess* OAccessibleImplementationAccess::getImplementation( const Reference< XAccessibleContext >& _rxComponent )
{
- OAccessibleImplementationAccess* pImplementation = NULL;
+ OAccessibleImplementationAccess* pImplementation = nullptr;
try
{
Reference< XUnoTunnel > xTunnel( _rxComponent, UNO_QUERY );
@@ -127,7 +127,7 @@ namespace comphelper
if ( pImplementation )
pImplementation->setAccessibleParent( _rxNewParent );
- return ( NULL != pImplementation );
+ return ( nullptr != pImplementation );
}
diff --git a/comphelper/source/misc/anytostring.cxx b/comphelper/source/misc/anytostring.cxx
index 11b1ade37d22..8a9056f028ac 100644
--- a/comphelper/source/misc/anytostring.cxx
+++ b/comphelper/source/misc/anytostring.cxx
@@ -61,7 +61,7 @@ void appendValue( OUStringBuffer & buf,
buf.append( "void" );
return;
}
- assert(val != 0);
+ assert(val != nullptr);
if (prependType &&
typeRef->eTypeClass != typelib_TypeClass_STRING &&
@@ -91,9 +91,9 @@ void appendValue( OUStringBuffer & buf,
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION: {
buf.append( "{ " );
- typelib_TypeDescription * typeDescr = 0;
+ typelib_TypeDescription * typeDescr = nullptr;
typelib_typedescriptionreference_getDescription( &typeDescr, typeRef );
- if (typeDescr == 0 || !typelib_typedescription_complete( &typeDescr )) {
+ if (typeDescr == nullptr || !typelib_typedescription_complete( &typeDescr )) {
appendTypeError( buf, typeRef );
}
else {
@@ -120,9 +120,9 @@ void appendValue( OUStringBuffer & buf,
{
buf.append( ppMemberNames[ nPos ] );
buf.append( " = " );
- typelib_TypeDescription * memberType = 0;
+ typelib_TypeDescription * memberType = nullptr;
TYPELIB_DANGER_GET( &memberType, ppTypeRefs[ nPos ] );
- if (memberType == 0) {
+ if (memberType == nullptr) {
appendTypeError( buf, ppTypeRefs[ nPos ] );
}
else {
@@ -137,23 +137,23 @@ void appendValue( OUStringBuffer & buf,
}
}
buf.append( " }" );
- if (typeDescr != 0)
+ if (typeDescr != nullptr)
typelib_typedescription_release( typeDescr );
break;
}
case typelib_TypeClass_SEQUENCE: {
- typelib_TypeDescription * typeDescr = 0;
+ typelib_TypeDescription * typeDescr = nullptr;
TYPELIB_DANGER_GET( &typeDescr, typeRef );
- if (typeDescr == 0) {
+ if (typeDescr == nullptr) {
appendTypeError( buf,typeRef );
}
else {
typelib_TypeDescriptionReference * elementTypeRef =
reinterpret_cast<
typelib_IndirectTypeDescription * >(typeDescr)->pType;
- typelib_TypeDescription * elementTypeDescr = 0;
+ typelib_TypeDescription * elementTypeDescr = nullptr;
TYPELIB_DANGER_GET( &elementTypeDescr, elementTypeRef );
- if (elementTypeDescr == 0)
+ if (elementTypeDescr == nullptr)
{
appendTypeError( buf, elementTypeRef );
}
@@ -219,9 +219,9 @@ void appendValue( OUStringBuffer & buf,
break;
}
case typelib_TypeClass_ENUM: {
- typelib_TypeDescription * typeDescr = 0;
+ typelib_TypeDescription * typeDescr = nullptr;
typelib_typedescriptionreference_getDescription( &typeDescr, typeRef );
- if (typeDescr == 0 || !typelib_typedescription_complete( &typeDescr )) {
+ if (typeDescr == nullptr || !typelib_typedescription_complete( &typeDescr )) {
appendTypeError( buf, typeRef );
}
else
@@ -246,7 +246,7 @@ void appendValue( OUStringBuffer & buf,
buf.append( "?unknown enum value?" );
}
}
- if (typeDescr != 0)
+ if (typeDescr != nullptr)
typelib_typedescription_release( typeDescr );
break;
}
diff --git a/comphelper/source/misc/componentbase.cxx b/comphelper/source/misc/componentbase.cxx
index c8ce6baec423..2904e4675b23 100644
--- a/comphelper/source/misc/componentbase.cxx
+++ b/comphelper/source/misc/componentbase.cxx
@@ -49,7 +49,7 @@ namespace comphelper
Reference< XInterface > ComponentBase::getComponent()
{
- return NULL;
+ return nullptr;
}
diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx
index b06604ee6ed3..b51e84b194b6 100644
--- a/comphelper/source/misc/componentmodule.cxx
+++ b/comphelper/source/misc/componentmodule.cxx
@@ -140,7 +140,7 @@ namespace comphelper
component->pComponentCreationFunc,
component->sImplementationName,
component->aSupportedServices,
- NULL
+ nullptr
);
if ( xReturn.is() )
{
@@ -150,7 +150,7 @@ namespace comphelper
}
}
- return NULL;
+ return nullptr;
}
diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx
index bb0047506da1..8b93ff97f1fb 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -145,7 +145,7 @@ void comphelper::detail::ConfigurationWrapper::setPropertyValue(
std::shared_ptr< ConfigurationChanges > const & batch,
OUString const & path, css::uno::Any const & value)
{
- assert(batch.get() != 0);
+ assert(batch.get() != nullptr);
batch->setPropertyValue(path, value);
}
@@ -161,7 +161,7 @@ void comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(
std::shared_ptr< ConfigurationChanges > const & batch,
OUString const & path, css::uno::Any const & value)
{
- assert(batch.get() != 0);
+ assert(batch.get() != nullptr);
batch->setPropertyValue(path, value);
}
@@ -181,7 +181,7 @@ comphelper::detail::ConfigurationWrapper::getGroupReadWrite(
std::shared_ptr< ConfigurationChanges > const & batch,
OUString const & path)
{
- assert(batch.get() != 0);
+ assert(batch.get() != nullptr);
return batch->getGroup(path);
}
@@ -201,7 +201,7 @@ comphelper::detail::ConfigurationWrapper::getSetReadWrite(
std::shared_ptr< ConfigurationChanges > const & batch,
OUString const & path)
{
- assert(batch.get() != 0);
+ assert(batch.get() != nullptr);
return batch->getSet(path);
}
diff --git a/comphelper/source/misc/evtmethodhelper.cxx b/comphelper/source/misc/evtmethodhelper.cxx
index 01f5d6f65d12..d02b423bab57 100644
--- a/comphelper/source/misc/evtmethodhelper.cxx
+++ b/comphelper/source/misc/evtmethodhelper.cxx
@@ -28,7 +28,7 @@ namespace comphelper
Sequence< OUString> getEventMethodsForType(const Type& type)
{
- typelib_InterfaceTypeDescription *pType=0;
+ typelib_InterfaceTypeDescription *pType=nullptr;
type.getDescription(reinterpret_cast<typelib_TypeDescription**>(&pType));
if(!pType)
@@ -41,7 +41,7 @@ namespace comphelper
// the description reference
typelib_TypeDescriptionReference* pMemberDescriptionReference = pType->ppMembers[i];
// the description for the reference
- typelib_TypeDescription* pMemberDescription = NULL;
+ typelib_TypeDescription* pMemberDescription = nullptr;
typelib_typedescriptionreference_getDescription(&pMemberDescription, pMemberDescriptionReference);
if (pMemberDescription)
{
diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx
index d43ecf606923..145531d42915 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -42,8 +42,8 @@ using namespace ::com::sun::star;
OInstanceLocker::OInstanceLocker( const uno::Reference< uno::XComponentContext >& xContext )
: m_xContext( xContext )
-, m_pLockListener( NULL )
-, m_pListenersContainer( NULL )
+, m_pLockListener( nullptr )
+, m_pListenersContainer( nullptr )
, m_bDisposed( false )
, m_bInitialized( false )
{
@@ -65,7 +65,7 @@ OInstanceLocker::~OInstanceLocker()
if ( m_pListenersContainer )
{
delete m_pListenersContainer;
- m_pListenersContainer = NULL;
+ m_pListenersContainer = nullptr;
}
}
@@ -88,7 +88,7 @@ void SAL_CALL OInstanceLocker::dispose()
if ( m_pLockListener )
{
m_pLockListener->Dispose();
- m_pLockListener = NULL;
+ m_pLockListener = nullptr;
}
m_xLockListener.clear();
}
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index 62705ace667b..9f14078ad340 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -258,7 +258,7 @@ namespace comphelper
aBuffer.append ( _rExpectedValueType.getTypeName() );
aBuffer.append( "\nFound: " );
aBuffer.append ( pos->second.getValueType().getTypeName() );
- throw IllegalArgumentException( aBuffer.makeStringAndClear(), NULL, 0 );
+ throw IllegalArgumentException( aBuffer.makeStringAndClear(), nullptr, 0 );
}
// argument does not exist
diff --git a/comphelper/source/misc/proxyaggregation.cxx b/comphelper/source/misc/proxyaggregation.cxx
index eca8a8aeaad1..d03b8acf2517 100644
--- a/comphelper/source/misc/proxyaggregation.cxx
+++ b/comphelper/source/misc/proxyaggregation.cxx
@@ -86,7 +86,7 @@ namespace comphelper
OProxyAggregation::~OProxyAggregation()
{
if ( m_xProxyAggregate.is() )
- m_xProxyAggregate->setDelegator( NULL );
+ m_xProxyAggregate->setDelegator( nullptr );
m_xProxyAggregate.clear();
m_xProxyTypeAccess.clear();
// this should remove the _two_only_ "real" references (means not delegated to
diff --git a/comphelper/source/misc/random.cxx b/comphelper/source/misc/random.cxx
index a70a73e3584b..ae12013d328f 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -39,7 +39,7 @@ struct RandomNumberGenerator
STD_RNG_ALGO global_rng;
RandomNumberGenerator()
{
- bool bRepeatable = (getenv("SAL_RAND_REPEATABLE") != 0);
+ bool bRepeatable = (getenv("SAL_RAND_REPEATABLE") != nullptr);
if (bRepeatable)
{
global_rng.seed(42);
diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx
index cff2432cf013..a7194ccf18fe 100644
--- a/comphelper/source/misc/servicedecl.cxx
+++ b/comphelper/source/misc/servicedecl.cxx
@@ -114,7 +114,7 @@ void * ServiceDecl::getFactory( sal_Char const* pImplName ) const
pFac->acquire();
return pFac;
}
- return 0;
+ return nullptr;
}
uno::Sequence<OUString> ServiceDecl::getSupportedServiceNames() const
diff --git a/comphelper/source/misc/solarmutex.cxx b/comphelper/source/misc/solarmutex.cxx
index 1d2375440804..4b573078dffd 100644
--- a/comphelper/source/misc/solarmutex.cxx
+++ b/comphelper/source/misc/solarmutex.cxx
@@ -28,7 +28,7 @@ SolarMutex::SolarMutex() {}
SolarMutex::~SolarMutex() {}
namespace {
- static SolarMutex* pSolarMutex = 0;
+ static SolarMutex* pSolarMutex = nullptr;
}
void SolarMutex::setSolarMutex( SolarMutex *pMutex )
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index b2fe5d92903f..76280017493f 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -589,7 +589,7 @@ uno::Reference< io::XStream > OStorageHelper::GetStreamAtPackageURL(
{
return GetStreamAtPath(xParentStorage, path, nOpenMode, rNastiness);
}
- return 0;
+ return nullptr;
}
}
diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx
index e071a93f5ec9..625490875567 100644
--- a/comphelper/source/misc/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -344,7 +344,7 @@ bool SyntaxHighlighter::Tokenizer::getNextToken(const sal_Unicode*& pos, /*out*/
reType = TT_IDENTIFIER;
// Keyword table
- if (ppListKeyWords != NULL)
+ if (ppListKeyWords != nullptr)
{
int nCount = pos - rpStartPos;
@@ -657,7 +657,7 @@ SyntaxHighlighter::Tokenizer::Tokenizer( HighlighterLanguage aLang ): aLanguage(
aCharTypeTab[(int)'\r'] |= CHAR_EOL;
aCharTypeTab[(int)'\n'] |= CHAR_EOL;
- ppListKeyWords = NULL;
+ ppListKeyWords = nullptr;
nKeyWordCount = 0;
}
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index 5732415c4008..9837ea6acf87 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -42,7 +42,7 @@ public:
ThreadTask *waitForWork()
{
- ThreadTask *pRet = NULL;
+ ThreadTask *pRet = nullptr;
osl::ResettableMutexGuard aGuard( mpPool->maGuard );
@@ -168,7 +168,7 @@ ThreadTask *ThreadPool::popWork()
return pTask;
}
else
- return NULL;
+ return nullptr;
}
void ThreadPool::startWork()
diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx
index 51fe425a472d..aaf03be99502 100644
--- a/comphelper/source/misc/types.cxx
+++ b/comphelper/source/misc/types.cxx
@@ -122,10 +122,10 @@ FontDescriptor getDefaultFont()
bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom)
{
// get the type lib descriptions
- typelib_TypeDescription* pAssignable = NULL;
+ typelib_TypeDescription* pAssignable = nullptr;
_rAssignable.getDescription(&pAssignable);
- typelib_TypeDescription* pFrom = NULL;
+ typelib_TypeDescription* pFrom = nullptr;
_rFrom.getDescription(&pFrom);
// and ask the type lib
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index 01d3efbe7a0c..4dc345f6b7fd 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -95,8 +95,8 @@ OfficeInstallationDirectories::OfficeInstallationDirectories(
: m_aOfficeBrandDirMacro( "$(brandbaseurl)" ),
m_aUserDirMacro( "$(userdataurl)" ),
m_xCtx( xCtx ),
- m_pOfficeBrandDir( 0 ),
- m_pUserDir( 0 )
+ m_pOfficeBrandDir( nullptr ),
+ m_pUserDir( nullptr )
{
}
@@ -271,10 +271,10 @@ OfficeInstallationDirectories::Create(
void OfficeInstallationDirectories::initDirs()
{
- if ( m_pOfficeBrandDir == 0 )
+ if ( m_pOfficeBrandDir == nullptr )
{
osl::MutexGuard aGuard( m_aMutex );
- if ( m_pOfficeBrandDir == 0 )
+ if ( m_pOfficeBrandDir == nullptr )
{
m_pOfficeBrandDir = new OUString;
m_pUserDir = new OUString;
diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx
index 6f37c1e78448..269c63a22d6b 100644
--- a/comphelper/source/property/opropertybag.cxx
+++ b/comphelper/source/property/opropertybag.cxx
@@ -269,7 +269,7 @@ namespace comphelper
{
// XSet is only a workaround for addProperty not being able to add default-void properties.
// So, everything of XSet except insert is implemented empty
- return NULL;
+ return nullptr;
}
@@ -558,7 +558,7 @@ namespace comphelper
::cppu::IPropertyArrayHelper& rPropInfo = getInfoHelper();
sal_Int16 nAttributes(0);
- OSL_VERIFY( rPropInfo.fillPropertyMembersByHandle( NULL, &nAttributes, _nHandle ) );
+ OSL_VERIFY( rPropInfo.fillPropertyMembersByHandle( nullptr, &nAttributes, _nHandle ) );
if ( ( nAttributes & PropertyAttribute::MAYBEDEFAULT ) == 0 )
return PropertyState_DIRECT_VALUE;
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 10da011f70e1..05f4b05a4c6f 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -53,7 +53,7 @@ namespace comphelper
Property aNameProp(_rName, 0, Type(), 0);
const Property* pResult = ::std::lower_bound(pProperties, pProperties + nLen, aNameProp, PropertyCompareByName());
if ( pResult && ( pResult == pProperties + nLen || pResult->Name != _rName) )
- pResult = NULL;
+ pResult = nullptr;
return pResult;
}
@@ -177,7 +177,7 @@ Property OPropertyArrayAggregationHelper::getPropertyByName( const OUString& _rP
sal_Bool OPropertyArrayAggregationHelper::hasPropertyByName(const OUString& _rPropertyName)
{
- return NULL != findPropertyByName( _rPropertyName );
+ return nullptr != findPropertyByName( _rPropertyName );
}
@@ -614,7 +614,7 @@ sal_Int32 OPropertySetAggregationHelper::getOriginalHandle(sal_Int32 nHandle) co
{
OPropertyArrayAggregationHelper& rPH = static_cast<OPropertyArrayAggregationHelper&>( const_cast<OPropertySetAggregationHelper*>(this)->getInfoHelper() );
sal_Int32 nOriginalHandle = -1;
- (void)rPH.fillAggregatePropertyInfoByHandle(NULL, &nOriginalHandle, nHandle);
+ (void)rPH.fillAggregatePropertyInfoByHandle(nullptr, &nOriginalHandle, nHandle);
return nOriginalHandle;
}
@@ -819,7 +819,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
if( pHandles[i] != -1 )
{
sal_Int16 nAttributes;
- rPH2.fillPropertyMembersByHandle( NULL, &nAttributes, pHandles[i] );
+ rPH2.fillPropertyMembersByHandle( nullptr, &nAttributes, pHandles[i] );
if( nAttributes & css::beans::PropertyAttribute::READONLY )
throw css::beans::PropertyVetoException();
// Will the property change?
diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx
index bcf76091b920..c89804d8bba2 100644
--- a/comphelper/source/property/property.cxx
+++ b/comphelper/source/property/property.cxx
@@ -183,7 +183,7 @@ bool tryPropertyValue(Any& _rConvertedValue, Any& _rOldValue, const Any& _rValue
{
if ( _rValueToSet.hasValue() && ( !_rExpectedType.equals( _rValueToSet.getValueType() ) ) )
{
- _rConvertedValue = Any( NULL, _rExpectedType.getTypeLibType() );
+ _rConvertedValue = Any( nullptr, _rExpectedType.getTypeLibType() );
if ( !uno_type_assignData(
const_cast< void* >( _rConvertedValue.getValue() ), _rConvertedValue.getValueType().getTypeLibType(),
diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx
index daa05cd58935..c8820c2cc271 100644
--- a/comphelper/source/property/propertybag.cxx
+++ b/comphelper/source/property/propertybag.cxx
@@ -78,7 +78,7 @@ namespace comphelper
throw IllegalArgumentException(
"The property name must not be empty.",
// TODO: resource
- NULL,
+ nullptr,
1
);
}
@@ -88,7 +88,7 @@ namespace comphelper
if ( _container.hasPropertyByName( _name ) || _container.hasPropertyByHandle( _handle ) )
throw PropertyExistException(
"Property name or handle already used.",
- NULL );
+ nullptr );
}
@@ -97,7 +97,7 @@ namespace comphelper
if ( _container.hasPropertyByName( _name ) || _container.hasPropertyByHandle( _handle ) )
throw ElementExistException(
"Property name or handle already used.",
- NULL );
+ nullptr );
}
@@ -110,7 +110,7 @@ namespace comphelper
throw IllegalArgumentException(
"Illegal property type: VOID",
// TODO: resource
- NULL,
+ nullptr,
1
);
@@ -120,7 +120,7 @@ namespace comphelper
// register the property
OSL_ENSURE( _nAttributes & PropertyAttribute::MAYBEVOID, "PropertyBag::addVoidProperty: this is for default-void properties only!" );
- registerPropertyNoMember( _rName, _nHandle, _nAttributes | PropertyAttribute::MAYBEVOID, _rType, NULL );
+ registerPropertyNoMember( _rName, _nHandle, _nAttributes | PropertyAttribute::MAYBEVOID, _rType, nullptr );
// remember the default
m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, Any() ) );
@@ -135,7 +135,7 @@ namespace comphelper
throw IllegalTypeException(
"The initial value must be non-NULL to determine the property type.",
// TODO: resource
- NULL );
+ nullptr );
// check name/handle sanity
lcl_checkForEmptyName( m_pImpl->m_bAllowEmptyPropertyName, _rName );
@@ -143,7 +143,7 @@ namespace comphelper
// register the property
registerPropertyNoMember( _rName, _nHandle, _nAttributes, aPropertyType,
- _rInitialValue.hasValue() ? _rInitialValue.getValue() : NULL );
+ _rInitialValue.hasValue() ? _rInitialValue.getValue() : nullptr );
// remember the default
m_pImpl->aDefaults.insert( MapInt2Any::value_type( _nHandle, _rInitialValue ) );
@@ -155,7 +155,7 @@ namespace comphelper
const Property& rProp = getProperty( _rName );
// will throw an UnknownPropertyException if necessary
if ( ( rProp.Attributes & PropertyAttribute::REMOVABLE ) == 0 )
- throw NotRemoveableException( OUString(), NULL );
+ throw NotRemoveableException( OUString(), nullptr );
const sal_Int32 nHandle = rProp.Handle;
revokeProperty( nHandle );
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index 335919b02cb7..3ed8fc4f83f7 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -210,7 +210,7 @@ namespace
aErrorMessage.append( "\", required property type \"" );
aErrorMessage.append( _rProperty.aProperty.Type.getTypeName() );
aErrorMessage.append( "\")" );
- throw IllegalArgumentException( aErrorMessage.makeStringAndClear(), NULL, 4 );
+ throw IllegalArgumentException( aErrorMessage.makeStringAndClear(), nullptr, 4 );
}
}
@@ -246,7 +246,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue(
// #i29490#
if ( !aNewRequestedValue.getValueType().equals( aPos->aProperty.Type ) )
{ // the actually given value is not of the same type as the one required
- Any aProperlyTyped( NULL, aPos->aProperty.Type.getTypeLibType() );
+ Any aProperlyTyped( nullptr, aPos->aProperty.Type.getTypeLibType() );
if ( uno_type_assignData(
const_cast< void* >( aProperlyTyped.getValue() ), aProperlyTyped.getValueType().getTypeLibType(),
@@ -272,7 +272,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue(
lcl_throwIllegalPropertyValueTypeException( *aPos, _rValue );
}
- Any* pPropContainer = NULL;
+ Any* pPropContainer = nullptr;
// the pointer to the any which holds the property value, no matter if located in the derived class
// or in out vector
@@ -318,7 +318,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue(
bool bConverted = false;
// a temporary any of the correct (required) type
- aProperlyTyped = Any( NULL, aPos->aProperty.Type.getTypeLibType() );
+ aProperlyTyped = Any( nullptr, aPos->aProperty.Type.getTypeLibType() );
// (need this as we do not want to overwrite the derived class member here)
if ( uno_type_assignData(
diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx
index de7df6a28b9d..daaadac738bc 100644
--- a/comphelper/source/property/propertysethelper.cxx
+++ b/comphelper/source/property/propertysethelper.cxx
@@ -50,7 +50,7 @@ PropertyMapEntry const * PropertySetHelperImpl::find( const OUString& aName ) co
}
else
{
- return NULL;
+ return nullptr;
}
}
@@ -86,10 +86,10 @@ void SAL_CALL PropertySetHelper::setPropertyValue( const OUString& aPropertyName
PropertyMapEntry const * aEntries[2];
aEntries[0] = mp->find( aPropertyName );
- if( NULL == aEntries[0] )
+ if( nullptr == aEntries[0] )
throw UnknownPropertyException( aPropertyName, static_cast< XPropertySet* >( this ) );
- aEntries[1] = NULL;
+ aEntries[1] = nullptr;
_setPropertyValues( aEntries, &aValue );
}
@@ -99,10 +99,10 @@ Any SAL_CALL PropertySetHelper::getPropertyValue( const OUString& PropertyName )
PropertyMapEntry const * aEntries[2];
aEntries[0] = mp->find( PropertyName );
- if( NULL == aEntries[0] )
+ if( nullptr == aEntries[0] )
throw UnknownPropertyException( PropertyName, static_cast< XPropertySet* >( this ) );
- aEntries[1] = NULL;
+ aEntries[1] = nullptr;
Any aAny;
_getPropertyValues( aEntries, &aAny );
@@ -142,7 +142,7 @@ void SAL_CALL PropertySetHelper::setPropertyValues( const Sequence< OUString >&
if( nCount )
{
std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
- pEntries[nCount] = NULL;
+ pEntries[nCount] = nullptr;
const OUString* pNames = rPropertyNames.getConstArray();
bool bUnknown = false;
@@ -150,7 +150,7 @@ void SAL_CALL PropertySetHelper::setPropertyValues( const Sequence< OUString >&
for( n = 0; !bUnknown && ( n < nCount ); n++, pNames++ )
{
pEntries[n] = mp->find( *pNames );
- bUnknown = NULL == pEntries[n];
+ bUnknown = nullptr == pEntries[n];
}
if( !bUnknown )
@@ -170,7 +170,7 @@ Sequence< Any > SAL_CALL PropertySetHelper::getPropertyValues(const Sequence< OU
if( nCount )
{
std::unique_ptr<PropertyMapEntry const *[]> pEntries(new PropertyMapEntry const *[nCount+1]);
- pEntries[nCount] = NULL;
+ pEntries[nCount] = nullptr;
const OUString* pNames = rPropertyNames.getConstArray();
bool bUnknown = false;
@@ -178,7 +178,7 @@ Sequence< Any > SAL_CALL PropertySetHelper::getPropertyValues(const Sequence< OU
for( n = 0; !bUnknown && ( n < nCount ); n++, pNames++ )
{
pEntries[n] = mp->find( *pNames );
- bUnknown = NULL == pEntries[n];
+ bUnknown = nullptr == pEntries[n];
}
if( !bUnknown )
@@ -215,10 +215,10 @@ PropertyState SAL_CALL PropertySetHelper::getPropertyState( const OUString& Prop
PropertyMapEntry const * aEntries[2];
aEntries[0] = mp->find( PropertyName );
- if( aEntries[0] == NULL )
+ if( aEntries[0] == nullptr )
throw UnknownPropertyException( PropertyName, static_cast< XPropertySet* >( this ) );
- aEntries[1] = NULL;
+ aEntries[1] = nullptr;
PropertyState aState(PropertyState_AMBIGUOUS_VALUE);
_getPropertyStates( aEntries, &aState );
@@ -244,10 +244,10 @@ Sequence< PropertyState > SAL_CALL PropertySetHelper::getPropertyStates( const S
for( n = 0; !bUnknown && (n < nCount); n++, pNames++ )
{
pEntries[n] = mp->find( *pNames );
- bUnknown = NULL == pEntries[n];
+ bUnknown = nullptr == pEntries[n];
}
- pEntries[nCount] = NULL;
+ pEntries[nCount] = nullptr;
if( !bUnknown )
_getPropertyStates( pEntries.get(), aStates.getArray() );
@@ -262,7 +262,7 @@ Sequence< PropertyState > SAL_CALL PropertySetHelper::getPropertyStates( const S
void SAL_CALL PropertySetHelper::setPropertyToDefault( const OUString& PropertyName ) throw(UnknownPropertyException, RuntimeException, std::exception)
{
PropertyMapEntry const *pEntry = mp->find( PropertyName );
- if( NULL == pEntry )
+ if( nullptr == pEntry )
throw UnknownPropertyException( PropertyName, static_cast< XPropertySet* >( this ) );
_setPropertyToDefault( pEntry );
@@ -271,7 +271,7 @@ void SAL_CALL PropertySetHelper::setPropertyToDefault( const OUString& PropertyN
Any SAL_CALL PropertySetHelper::getPropertyDefault( const OUString& aPropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception)
{
PropertyMapEntry const * pEntry = mp->find( aPropertyName );
- if( NULL == pEntry )
+ if( nullptr == pEntry )
throw UnknownPropertyException( aPropertyName, static_cast< XPropertySet* >( this ) );
return _getPropertyDefault( pEntry );
diff --git a/comphelper/source/property/propmultiplex.cxx b/comphelper/source/property/propmultiplex.cxx
index 51613c7b45f1..4c044abcb2c8 100644
--- a/comphelper/source/property/propmultiplex.cxx
+++ b/comphelper/source/property/propmultiplex.cxx
@@ -59,7 +59,7 @@ void OPropertyChangeListener::setAdapter(OPropertyChangeMultiplexer* pAdapter)
{
::osl::MutexGuard aGuard(m_rMutex);
m_pAdapter->release();
- m_pAdapter = NULL;
+ m_pAdapter = nullptr;
}
if (pAdapter)
@@ -108,13 +108,13 @@ void OPropertyChangeMultiplexer::dispose()
for (sal_Int32 i = 0; i < m_aProperties.getLength(); ++i, ++pProperties)
m_xSet->removePropertyChangeListener(*pProperties, static_cast< XPropertyChangeListener*>(this));
- m_pListener->setAdapter(NULL);
+ m_pListener->setAdapter(nullptr);
- m_pListener = NULL;
+ m_pListener = nullptr;
m_bListening = false;
if (m_bAutoSetRelease)
- m_xSet = NULL;
+ m_xSet = nullptr;
}
}
@@ -129,14 +129,14 @@ void SAL_CALL OPropertyChangeMultiplexer::disposing( const EventObject& _rSourc
m_pListener->_disposing(_rSource);
// disconnect the listener
if (m_pListener) // may have been reset whilest calling into _disposing
- m_pListener->setAdapter(NULL);
+ m_pListener->setAdapter(nullptr);
}
- m_pListener = NULL;
+ m_pListener = nullptr;
m_bListening = false;
if (m_bAutoSetRelease)
- m_xSet = NULL;
+ m_xSet = nullptr;
}
// XPropertyChangeListener
diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx
index 4b3dd8e81606..77e9ff6cfe31 100644
--- a/comphelper/source/streaming/oslfile2streamwrap.cxx
+++ b/comphelper/source/streaming/oslfile2streamwrap.cxx
@@ -130,7 +130,7 @@ void SAL_CALL OSLInputStreamWrapper::closeInput() throw( css::io::NotConnectedEx
m_pFile->close();
- m_pFile = NULL;
+ m_pFile = nullptr;
}
/*************************************************************************/