summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxobj.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:10:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:17 +0100
commit08e49fa3377d8c4e7e5df7a32233fcd9763ee936 (patch)
treef06399e5a005a70612093f415bd02ea2d1ba719f /basic/source/sbx/sbxobj.cxx
parenta17cde058213f962b8de880de6f5b1e4f2061b37 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I1ec9a671fe3ac838feb36297915e3cdf8749d944
Diffstat (limited to 'basic/source/sbx/sbxobj.cxx')
-rw-r--r--basic/source/sbx/sbxobj.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index f6babf55b951..c198c7a19b4a 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -94,7 +94,7 @@ static void CheckParentsOnDelete( SbxObject* pObj, SbxArray* p )
// does the element have more than one reference and still a Listener?
if( rRef->GetRefCount() > 1 )
{
- rRef->SetParent( NULL );
+ rRef->SetParent( nullptr );
DBG_ASSERT( !rRef->IsBroadcaster() || rRef->GetBroadcaster().GetListenerCount(), "Object element with dangling parent" );
}
}
@@ -131,7 +131,7 @@ void SbxObject::Clear()
p = Make( pParentProp, SbxCLASS_PROPERTY, SbxOBJECT );
p->ResetFlag( SbxFlagBits::Write );
p->SetFlag( SbxFlagBits::DontStore );
- pDfltProp = NULL;
+ pDfltProp = nullptr;
SetModified( false );
}
@@ -223,7 +223,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
++nLvl;
#endif
- SbxVariable* pRes = NULL;
+ SbxVariable* pRes = nullptr;
pObjs->SetFlag( SbxFlagBits::ExtSearch );
if( t == SbxCLASS_DONTCARE )
{
@@ -239,7 +239,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
}
else
{
- SbxArray* pArray = NULL;
+ SbxArray* pArray = nullptr;
switch( t )
{
case SbxCLASS_VARIABLE:
@@ -292,7 +292,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
bool SbxObject::Call( const OUString& rName, SbxArray* pParam )
{
SbxVariable* pMeth = FindQualified( rName, SbxCLASS_DONTCARE);
- if( pMeth && 0 != dynamic_cast<const SbxMethod*>( pMeth) )
+ if( pMeth && nullptr != dynamic_cast<const SbxMethod*>( pMeth) )
{
// FindQualified() might have struck already!
if( pParam )
@@ -300,7 +300,7 @@ bool SbxObject::Call( const OUString& rName, SbxArray* pParam )
pMeth->SetParameters( pParam );
}
pMeth->Broadcast( SBX_HINT_DATAWANTED );
- pMeth->SetParameters( NULL );
+ pMeth->SetParameters( nullptr );
return true;
}
SetError( ERRCODE_SBX_NO_METHOD );
@@ -323,7 +323,7 @@ void SbxObject::SetDfltProperty( const OUString& rName )
{
if ( rName != aDfltPropName )
{
- pDfltProp = NULL;
+ pDfltProp = nullptr;
}
aDfltPropName = rName;
SetModified( true );
@@ -335,7 +335,7 @@ void SbxObject::SetDfltProperty( const OUString& rName )
SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx )
{
- SbxArray* pArray = NULL;
+ SbxArray* pArray = nullptr;
if( pVar ) switch( pVar->GetClass() )
{
case SbxCLASS_VARIABLE:
@@ -371,7 +371,7 @@ SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx )
SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataType dt, bool bIsRuntimeFunction )
{
// Is the object already available?
- SbxArray* pArray = NULL;
+ SbxArray* pArray = nullptr;
switch( ct )
{
case SbxCLASS_VARIABLE:
@@ -382,10 +382,10 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
}
if( !pArray )
{
- return NULL;
+ return nullptr;
}
// Collections may contain objects of the same name
- if( !( ct == SbxCLASS_OBJECT && 0 != dynamic_cast<const SbxCollection*>( this ) ) )
+ if( !( ct == SbxCLASS_OBJECT && nullptr != dynamic_cast<const SbxCollection*>( this ) ) )
{
SbxVariable* pRes = pArray->Find( rName, ct );
if( pRes )
@@ -393,7 +393,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
return pRes;
}
}
- SbxVariable* pVar = NULL;
+ SbxVariable* pVar = nullptr;
switch( ct )
{
case SbxCLASS_VARIABLE:
@@ -429,7 +429,7 @@ void SbxObject::Insert( SbxVariable* pVar )
{
// Then this element exists already
// There are objects of the same name allowed at collections
- if( pArray == pObjs && 0 != dynamic_cast<const SbxCollection*>( this ) )
+ if( pArray == pObjs && nullptr != dynamic_cast<const SbxCollection*>( this ) )
{
nIdx = pArray->Count();
}
@@ -482,7 +482,7 @@ void SbxObject::Insert( SbxVariable* pVar )
// double entry and without broadcasts, will only be used in SO2/auto.cxx
void SbxObject::QuickInsert( SbxVariable* pVar )
{
- SbxArray* pArray = NULL;
+ SbxArray* pArray = nullptr;
if( pVar )
{
switch( pVar->GetClass() )
@@ -550,12 +550,12 @@ void SbxObject::Remove( SbxVariable* pVar )
}
if( static_cast<SbxVariable*>(pVar_) == pDfltProp )
{
- pDfltProp = NULL;
+ pDfltProp = nullptr;
}
pArray->Remove( nIdx );
if( pVar_->GetParent() == this )
{
- pVar_->SetParent( NULL );
+ pVar_->SetParent( nullptr );
}
SetModified( true );
Broadcast( SBX_HINT_OBJECTCHANGED );
@@ -593,7 +593,7 @@ bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
return true;
}
- pDfltProp = NULL;
+ pDfltProp = nullptr;
if( !SbxVariable::LoadData( rStrm, nVer ) )
{
return false;