loplugin:nullptr (automatic rewrite)
Change-Id: Ibe4adf92bb8eaf8b093bae87136d3a6a59e856f4
This commit is contained in:
@@ -107,7 +107,7 @@ public:
|
||||
static void Back2Delemitter( SvStream & );
|
||||
static void WriteStars( SvStream & );
|
||||
|
||||
virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL );
|
||||
virtual bool SetName( const OString& rName, SvIdlDataBase * = nullptr );
|
||||
const SvHelpContext& GetHelpContext() const { return aHelpContext; }
|
||||
virtual const SvString & GetName() const { return aName; }
|
||||
virtual const SvString & GetHelpText() const { return aHelpText; }
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
for( SvMetaObjectMemberList::reverse_iterator it = aList.rbegin(); it != aList.rend(); ++it )
|
||||
if( isSvMetaObject(*it) )
|
||||
return *it;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -123,7 +123,7 @@ public:
|
||||
|
||||
SvMetaType * ReadKnownType( SvTokenStream & rInStm );
|
||||
SvMetaAttribute * ReadKnownAttr( SvTokenStream & rInStm,
|
||||
SvMetaType * pType = NULL );
|
||||
SvMetaType * pType = nullptr );
|
||||
SvMetaAttribute * SearchKnownAttr( const SvIdentifier& );
|
||||
SvMetaClass * ReadKnownClass( SvTokenStream & rInStm );
|
||||
void AddDepFile(OUString const& rFileName);
|
||||
|
@@ -54,7 +54,7 @@ protected:
|
||||
public:
|
||||
TYPEINFO_OVERRIDE();
|
||||
|
||||
virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL ) override;
|
||||
virtual bool SetName( const OString& rName, SvIdlDataBase * = nullptr ) override;
|
||||
|
||||
SvMetaModule( bool bImported );
|
||||
|
||||
|
@@ -198,7 +198,7 @@ public:
|
||||
void SetListPos(sal_uLong n)
|
||||
{ nListPos = n; }
|
||||
void ResetSlotPointer()
|
||||
{ pNextSlot = pLinkedSlot = 0; }
|
||||
{ pNextSlot = pLinkedSlot = nullptr; }
|
||||
|
||||
virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) override;
|
||||
virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
|
||||
|
@@ -159,7 +159,7 @@ public:
|
||||
const OString& GetCName() const;
|
||||
char GetParserChar() const { return cParserChar; }
|
||||
|
||||
virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL ) override;
|
||||
virtual bool SetName( const OString& rName, SvIdlDataBase * = nullptr ) override;
|
||||
|
||||
|
||||
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
|
||||
|
@@ -179,7 +179,7 @@ SvStringHashEntry * SvStringHashTable::Get( sal_uInt32 nIndex ) const
|
||||
{
|
||||
if( IsEntry( nIndex ) )
|
||||
return pEntries + nIndex;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool SvStringHashTable::equals( const OString& rElement,
|
||||
|
@@ -104,7 +104,7 @@ SvTokenStream::SvTokenStream( const OUString & rFileName )
|
||||
}
|
||||
|
||||
SvTokenStream::SvTokenStream( SvStream & rStream, const OUString & rFileName )
|
||||
: pInStream( NULL )
|
||||
: pInStream( nullptr )
|
||||
, rInStream( rStream )
|
||||
, aFileName( rFileName )
|
||||
{
|
||||
|
@@ -167,7 +167,7 @@ SvMetaReference::SvMetaReference()
|
||||
TYPEINIT1( SvMetaExtern, SvMetaReference );
|
||||
|
||||
SvMetaExtern::SvMetaExtern()
|
||||
: pModule( NULL )
|
||||
: pModule( nullptr )
|
||||
, bReadUUId( false )
|
||||
, bReadVersion( false )
|
||||
{
|
||||
@@ -175,7 +175,7 @@ SvMetaExtern::SvMetaExtern()
|
||||
|
||||
SvMetaModule * SvMetaExtern::GetModule() const
|
||||
{
|
||||
DBG_ASSERT( pModule != NULL, "module not set" );
|
||||
DBG_ASSERT( pModule != nullptr, "module not set" );
|
||||
return pModule;
|
||||
}
|
||||
|
||||
|
@@ -39,10 +39,10 @@ SvMetaSlot::SvMetaSlot()
|
||||
, aSynchron( true, false )
|
||||
, aRecordPerSet( true, false )
|
||||
, aRecordAbsolute( false, false )
|
||||
, pLinkedSlot(0)
|
||||
, pNextSlot(0)
|
||||
, pLinkedSlot(nullptr)
|
||||
, pNextSlot(nullptr)
|
||||
, nListPos(0)
|
||||
, pEnumValue(0)
|
||||
, pEnumValue(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ SvMetaSlot::SvMetaSlot( SvMetaType * pType )
|
||||
, aSynchron( true, false )
|
||||
, aRecordPerSet( true, false )
|
||||
, aRecordAbsolute( false, false )
|
||||
, pLinkedSlot(0)
|
||||
, pNextSlot(0)
|
||||
, pLinkedSlot(nullptr)
|
||||
, pNextSlot(nullptr)
|
||||
, nListPos(0)
|
||||
, pEnumValue(0)
|
||||
, pEnumValue(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ bool SvMetaSlot::IsVariable() const
|
||||
bool SvMetaSlot::IsMethod() const
|
||||
{
|
||||
bool b = SvMetaAttribute::IsMethod();
|
||||
b |= NULL != GetMethod();
|
||||
b |= nullptr != GetMethod();
|
||||
return b;
|
||||
}
|
||||
|
||||
@@ -553,14 +553,14 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix,
|
||||
}
|
||||
|
||||
// iron out EnumSlots
|
||||
SvMetaTypeEnum * pEnum = NULL;
|
||||
SvMetaTypeEnum * pEnum = nullptr;
|
||||
SvMetaType * pBType = GetType()->GetBaseType();
|
||||
pEnum = dynamic_cast<SvMetaTypeEnum*>( pBType );
|
||||
if( GetPseudoSlots() && pEnum && pEnum->Count() )
|
||||
{
|
||||
// clone the MasterSlot
|
||||
SvMetaSlotRef xEnumSlot;
|
||||
SvMetaSlot *pFirstEnumSlot = NULL;
|
||||
SvMetaSlot *pFirstEnumSlot = nullptr;
|
||||
for( sal_uLong n = 0; n < pEnum->Count(); n++ )
|
||||
{
|
||||
// create SlotId
|
||||
@@ -576,7 +576,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix,
|
||||
|
||||
OString aSId = aBuf.makeStringAndClear();
|
||||
|
||||
xEnumSlot = NULL;
|
||||
xEnumSlot = nullptr;
|
||||
for( m=0; m<rBase.GetAttrList().size(); m++ )
|
||||
{
|
||||
SvMetaAttribute * pAttr = rBase.GetAttrList()[m];
|
||||
@@ -625,7 +625,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix,
|
||||
SvSlotElement *pEle;
|
||||
do
|
||||
{
|
||||
pEle = ( ++i < rList.size() ) ? rList[ i ] : NULL;
|
||||
pEle = ( ++i < rList.size() ) ? rList[ i ] : nullptr;
|
||||
if ( pEle && pEle->xSlot->pLinkedSlot == this )
|
||||
{
|
||||
xEnumSlot->pNextSlot = pEle->xSlot;
|
||||
@@ -712,7 +712,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
|
||||
if ( !GetExport() && !GetHidden() )
|
||||
return;
|
||||
|
||||
bool bIsEnumSlot = 0 != pEnumValue;
|
||||
bool bIsEnumSlot = nullptr != pEnumValue;
|
||||
|
||||
rOutStm.WriteCharPtr( "// Slot Nr. " )
|
||||
.WriteCharPtr( OString::number(nListPos).getStr() )
|
||||
@@ -765,8 +765,8 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
|
||||
// look for the next slot with the same StateMethod like me
|
||||
// the slotlist is set to the current slot
|
||||
size_t i = nStart;
|
||||
SvSlotElement* pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : NULL;
|
||||
pNextSlot = pEle ? &pEle->xSlot : NULL;
|
||||
SvSlotElement* pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : nullptr;
|
||||
pNextSlot = pEle ? &pEle->xSlot : nullptr;
|
||||
while ( pNextSlot )
|
||||
{
|
||||
if ( !pNextSlot->pNextSlot &&
|
||||
@@ -774,8 +774,8 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
|
||||
) {
|
||||
break;
|
||||
}
|
||||
pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : NULL;
|
||||
pNextSlot = pEle ? &pEle->xSlot : NULL;
|
||||
pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : nullptr;
|
||||
pNextSlot = pEle ? &pEle->xSlot : nullptr;
|
||||
}
|
||||
|
||||
if ( !pNextSlot )
|
||||
@@ -783,15 +783,15 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
|
||||
// There is no slot behind me that has the same ExecMethod.
|
||||
// So I search for the first slot with it (could be myself).
|
||||
i = 0;
|
||||
pEle = rSlotList.empty() ? NULL : rSlotList[ i ];
|
||||
pNextSlot = pEle ? &pEle->xSlot : NULL;
|
||||
pEle = rSlotList.empty() ? nullptr : rSlotList[ i ];
|
||||
pNextSlot = pEle ? &pEle->xSlot : nullptr;
|
||||
while ( pNextSlot != this )
|
||||
{
|
||||
if ( !pNextSlot->pEnumValue &&
|
||||
pNextSlot->GetStateMethod() == GetStateMethod() )
|
||||
break;
|
||||
pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : NULL;
|
||||
pNextSlot = pEle ? &pEle->xSlot : NULL;
|
||||
pEle = ( ++i < rSlotList.size() ) ? rSlotList[ i ] : nullptr;
|
||||
pNextSlot = pEle ? &pEle->xSlot : nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -225,7 +225,7 @@ TYPEINIT1( SvMetaType, SvMetaExtern );
|
||||
: aCall0( CALL_VALUE, false ) \
|
||||
, aCall1( CALL_VALUE, false ) \
|
||||
, aSbxDataType( 0, false ) \
|
||||
, pAttrList( NULL ) \
|
||||
, pAttrList( nullptr ) \
|
||||
, nType( TYPE_BASE ) \
|
||||
, bIsItem( false ) \
|
||||
, bIsShell( false ) \
|
||||
|
@@ -106,7 +106,7 @@ char const * SyntaxStrings[] = {
|
||||
"\t\t{ slot }",
|
||||
"\t'}'\n",
|
||||
"---syntax example is sfx.idl---\n",
|
||||
NULL };
|
||||
nullptr };
|
||||
|
||||
char CommandLineSyntax[] =
|
||||
"-fs<slotmap file>\n"
|
||||
|
@@ -31,7 +31,7 @@ SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
|
||||
: bExport( false )
|
||||
, nUniqueId( 0 )
|
||||
, nVerbosity( rCmd.nVerbosity )
|
||||
, pIdTable( NULL )
|
||||
, pIdTable( nullptr )
|
||||
{
|
||||
sSlotMapFile = rCmd.aSlotMapFile;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ SvMetaModule * SvIdlDataBase::GetModule( const OString& rName )
|
||||
for( sal_uLong n = 0; n < aModuleList.size(); n++ )
|
||||
if( aModuleList[n]->GetName().getString().equals(rName) )
|
||||
return aModuleList[n];
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void SvIdlDataBase::SetError( const OString& rError, SvToken& rTok )
|
||||
@@ -270,7 +270,7 @@ SvMetaType * SvIdlDataBase::FindType( const SvMetaType * pPType,
|
||||
for( SvMetaTypeMemberList::const_iterator it = rList.begin(); it != rList.end(); ++it )
|
||||
if( *it == pPType )
|
||||
return *it;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SvMetaType * SvIdlDataBase::FindType( const OString& rName )
|
||||
@@ -278,7 +278,7 @@ SvMetaType * SvIdlDataBase::FindType( const OString& rName )
|
||||
for( SvMetaTypeMemberList::const_iterator it = aTypeList.begin(); it != aTypeList.end(); ++it )
|
||||
if( rName.equals((*it)->GetName().getString()) )
|
||||
return *it;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
|
||||
@@ -325,7 +325,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
|
||||
OString aName = pTok->GetString();
|
||||
SvMetaTypeMemberList & rList = GetTypeList();
|
||||
SvMetaTypeMemberList::const_iterator it = rList.begin();
|
||||
SvMetaType * pType = NULL;
|
||||
SvMetaType * pType = nullptr;
|
||||
while( it != rList.end() )
|
||||
{
|
||||
if( (*it)->GetName().getString().equals(aName) )
|
||||
@@ -373,7 +373,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
|
||||
}
|
||||
}
|
||||
rInStm.Seek( nTokPos );
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
|
||||
@@ -412,7 +412,7 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
|
||||
}
|
||||
|
||||
rInStm.Seek( nTokPos );
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SvMetaAttribute* SvIdlDataBase::SearchKnownAttr
|
||||
@@ -431,7 +431,7 @@ SvMetaAttribute* SvIdlDataBase::SearchKnownAttr
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm )
|
||||
@@ -448,7 +448,7 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm )
|
||||
}
|
||||
|
||||
rInStm.Seek( nTokPos );
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void SvIdlDataBase::Write(const OString& rText)
|
||||
@@ -495,7 +495,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
|
||||
aErrorText.append("may be <");
|
||||
aErrorText.append(aError.GetText());
|
||||
}
|
||||
SvToken * pPrevTok = NULL;
|
||||
SvToken * pPrevTok = nullptr;
|
||||
while( pTok != pPrevTok )
|
||||
{
|
||||
pPrevTok = pTok;
|
||||
@@ -551,7 +551,7 @@ bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, bool bImported, const
|
||||
{
|
||||
rInStm.GetToken_Next();
|
||||
bOk = rInStm.Read( '(' ); // optional
|
||||
pTok = bOk ? rInStm.GetToken_Next() : NULL;
|
||||
pTok = bOk ? rInStm.GetToken_Next() : nullptr;
|
||||
if( pTok && pTok->IsString() )
|
||||
{
|
||||
OUString aFullName;
|
||||
|
@@ -34,8 +34,8 @@ IdlDll & GetIdlApp()
|
||||
}
|
||||
|
||||
IdlDll::IdlDll()
|
||||
: pHashTable( NULL )
|
||||
, pGlobalNames( NULL )
|
||||
: pHashTable( nullptr )
|
||||
, pGlobalNames( nullptr )
|
||||
|
||||
{}
|
||||
|
||||
|
@@ -91,7 +91,7 @@ inline OUString tempFileHelper(OUString const & fname)
|
||||
{
|
||||
OUString aTmpDir( fname.copy( 0, delimIndex ) );
|
||||
osl::FileBase::getFileURLFromSystemPath( aTmpDir, aTmpDir );
|
||||
osl::FileBase::createTempFile( &aTmpDir, 0, &aTmpFile );
|
||||
osl::FileBase::createTempFile( &aTmpDir, nullptr, &aTmpFile );
|
||||
osl::FileBase::getSystemPathFromFileURL( aTmpFile, aTmpFile );
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user