summaryrefslogtreecommitdiff
path: root/tools/source/ref
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:26:25 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:54 +0100
commit1c4f33b5d8ba6a8cebb0235bb2e7e37e33045a5b (patch)
tree80530f50cf36927a1e4f31ad0192077bfb0ecf39 /tools/source/ref
parent175e2adfd1677cb83373b0ba47853493f3b77859 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Ia5acfb564f913d52cd25b5d64d06b5280b94cb72
Diffstat (limited to 'tools/source/ref')
-rw-r--r--tools/source/ref/errinf.cxx14
-rw-r--r--tools/source/ref/pstm.cxx14
2 files changed, 14 insertions, 14 deletions
diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx
index dc0e8b0506a6..9d9345b16df7 100644
--- a/tools/source/ref/errinf.cxx
+++ b/tools/source/ref/errinf.cxx
@@ -59,14 +59,14 @@ friend class ErrorInfo;
};
EDcrData::EDcrData()
- : pFirstHdl(0)
- , pFirstCtx(0)
- , pDsp(0)
+ : pFirstHdl(nullptr)
+ , pFirstCtx(nullptr)
+ , pDsp(nullptr)
, bIsWindowDsp(false)
, nNextDcr(0)
{
for(sal_uInt16 n=0;n<ERRCODE_DYNAMIC_COUNT;n++)
- ppDcr[n]=0;
+ ppDcr[n]=nullptr;
}
void EDcr_Impl::RegisterEDcr(DynamicErrorInfo *pDcr)
@@ -94,7 +94,7 @@ void EDcr_Impl::UnRegisterEDcr(DynamicErrorInfo *pDcr)
((sal_uIntPtr)(*pDcr) & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
DBG_ASSERT(ppDcr[lIdx]==pDcr,"ErrHdl: Error nicht gefunden");
if(ppDcr[lIdx]==pDcr)
- ppDcr[lIdx]=0;
+ ppDcr[lIdx]=nullptr;
}
TYPEINIT0(ErrorInfo);
@@ -226,7 +226,7 @@ ErrorHandler::~ErrorHandler()
vcl::Window* ErrorContext::GetParent()
{
- return pImpl ? pImpl->pWin : NULL;
+ return pImpl ? pImpl->pWin : nullptr;
}
void ErrorHandler::RegisterDisplay(WindowDisplayErrorFunc *aDsp)
@@ -273,7 +273,7 @@ sal_uInt16 ErrorHandler::HandleError_Impl(
ErrorContext *pCtx=ErrorContext::GetContext();
if(pCtx)
pCtx->GetString(pInfo->GetErrorCode(), aAction);
- vcl::Window *pParent=0;
+ vcl::Window *pParent=nullptr;
// Remove parent from context
for(;pCtx;pCtx=pCtx->pImpl->pNext)
if(pCtx->GetParent())
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 89a405c13477..fb9dc605ed5f 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -37,7 +37,7 @@ void SvClassManager::Register( sal_Int32 nClassId, SvCreateInstancePersist pFunc
SvCreateInstancePersist SvClassManager::Get( sal_Int32 nClassId )
{
Map::const_iterator i(aAssocTable.find(nClassId));
- return i == aAssocTable.end() ? 0 : i->second;
+ return i == aAssocTable.end() ? nullptr : i->second;
}
// SvRttiBase
@@ -59,7 +59,7 @@ SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream, sal
, pStm( pStream )
, aPUIdx( nStartIdxP )
, nStartIdx( nStartIdxP )
- , pRefStm( NULL )
+ , pRefStm( nullptr )
{
DBG_ASSERT( nStartIdx != 0, "zero index not allowed" );
m_isWritable = true;
@@ -73,7 +73,7 @@ SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream, sal
SvPersistStream::~SvPersistStream()
{
- SetStream( NULL );
+ SetStream( nullptr );
}
/**
@@ -157,7 +157,7 @@ SvPersistBase * SvPersistStream::GetObject( sal_uIntPtr nIdx ) const
return aPUIdx.Get( nIdx );
else if( pRefStm )
return pRefStm->GetObject( nIdx );
- return NULL;
+ return nullptr;
}
#define LEN_1 0x80
@@ -474,7 +474,7 @@ sal_uInt32 SvPersistStream::ReadObj
sal_uInt32 nId = 0;
sal_uInt16 nClassId;
- rpObj = NULL; // specification: 0 in case of error
+ rpObj = nullptr; // specification: 0 in case of error
ReadId( *this, nHdr, nId, nClassId );
// get version number through masking
@@ -488,7 +488,7 @@ sal_uInt32 SvPersistStream::ReadObj
{
if( P_OBJ & nHdr )
{ // read object, nId only set for P_DBGUTIL
- DBG_ASSERT( !(nHdr & P_DBGUTIL) || NULL == aPUIdx.Get( nId ),
+ DBG_ASSERT( !(nHdr & P_DBGUTIL) || nullptr == aPUIdx.Get( nId ),
"object already exist" );
SvCreateInstancePersist pFunc = rClassMgr.Get( nClassId );
@@ -538,7 +538,7 @@ sal_uInt32 SvPersistStream::ReadObj
else
{
rpObj = GetObject( nId );
- DBG_ASSERT( rpObj != NULL, "object does not exist" );
+ DBG_ASSERT( rpObj != nullptr, "object does not exist" );
DBG_ASSERT( rpObj->GetClassId() == nClassId, "class mismatch" );
}
}