summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:20:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:33 +0100
commit1fc2fe74f2db49b17abc3c4df7feec4f215052ca (patch)
tree0844e3989c0febb1774b5471458314c9c592b103 /package
parent72d944181179fa3287a49cf72edb135a77782198 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I1e5338558bc57afe51db57655550e9b7246f7214
Diffstat (limited to 'package')
-rw-r--r--package/inc/ZipPackageEntry.hxx2
-rw-r--r--package/source/manifest/ManifestExport.cxx2
-rw-r--r--package/source/manifest/UnoRegister.cxx2
-rw-r--r--package/source/xstor/disposelistener.cxx2
-rw-r--r--package/source/xstor/ocompinstream.cxx10
-rw-r--r--package/source/xstor/ohierarchyholder.cxx4
-rw-r--r--package/source/xstor/ohierarchyholder.hxx2
-rw-r--r--package/source/xstor/oseekinstream.cxx6
-rw-r--r--package/source/xstor/owriteablestream.cxx12
-rw-r--r--package/source/xstor/owriteablestream.hxx2
-rw-r--r--package/source/xstor/register.cxx2
-rw-r--r--package/source/xstor/switchpersistencestream.cxx6
-rw-r--r--package/source/xstor/xstorage.cxx62
-rw-r--r--package/source/xstor/xstorage.hxx2
-rw-r--r--package/source/zipapi/Deflater.cxx4
-rw-r--r--package/source/zipapi/Inflater.cxx6
-rw-r--r--package/source/zipapi/ZipEnumeration.cxx2
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx4
-rw-r--r--package/source/zipapi/blowfishcontext.cxx4
-rw-r--r--package/source/zipapi/blowfishcontext.hxx2
-rw-r--r--package/source/zipapi/sha1context.cxx8
-rw-r--r--package/source/zipapi/sha1context.hxx2
-rw-r--r--package/source/zippackage/ZipPackage.cxx24
-rw-r--r--package/source/zippackage/ZipPackageEntry.cxx2
-rw-r--r--package/source/zippackage/ZipPackageSink.cxx2
-rw-r--r--package/source/zippackage/zipfileaccess.cxx8
26 files changed, 92 insertions, 92 deletions
diff --git a/package/inc/ZipPackageEntry.hxx b/package/inc/ZipPackageEntry.hxx
index 0850f10af87d..bd613ae9bf3e 100644
--- a/package/inc/ZipPackageEntry.hxx
+++ b/package/inc/ZipPackageEntry.hxx
@@ -74,7 +74,7 @@ public:
void clearParent()
{
// xParent.clear();
- mpParent = NULL;
+ mpParent = nullptr;
}
// XNamed
virtual OUString SAL_CALL getName( )
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
index b7a6acb9864a..2c12b5f574d1 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -197,7 +197,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
::comphelper::AttributeList *pAttrList = new ::comphelper::AttributeList;
const beans::PropertyValue *pValue = pSequence[i].getConstArray();
OUString aString;
- const uno::Any *pVector = NULL, *pSalt = NULL, *pIterationCount = NULL, *pDigest = NULL, *pDigestAlg = NULL, *pEncryptAlg = NULL, *pStartKeyAlg = NULL, *pDerivedKeySize = NULL;
+ const uno::Any *pVector = nullptr, *pSalt = nullptr, *pIterationCount = nullptr, *pDigest = nullptr, *pDigestAlg = nullptr, *pEncryptAlg = nullptr, *pStartKeyAlg = nullptr, *pDerivedKeySize = nullptr;
for (sal_uInt32 j = 0, nNum = pSequence[i].getLength(); j < nNum; j++, pValue++)
{
if (pValue->Name.equals (sMediaTypeProperty) )
diff --git a/package/source/manifest/UnoRegister.cxx b/package/source/manifest/UnoRegister.cxx
index f453512d4c78..2a15147abe5f 100644
--- a/package/source/manifest/UnoRegister.cxx
+++ b/package/source/manifest/UnoRegister.cxx
@@ -43,7 +43,7 @@ using namespace ::com::sun::star::packages;
extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL package2_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
uno::Reference< XMultiServiceFactory > xSMgr(
static_cast< XMultiServiceFactory * >( pServiceManager ) );
uno::Reference< XSingleServiceFactory > xFactory;
diff --git a/package/source/xstor/disposelistener.cxx b/package/source/xstor/disposelistener.cxx
index 63978f0fa7cf..6ffafe946d7a 100644
--- a/package/source/xstor/disposelistener.cxx
+++ b/package/source/xstor/disposelistener.cxx
@@ -32,7 +32,7 @@ OChildDispListener_Impl::~OChildDispListener_Impl()
void OChildDispListener_Impl::OwnerIsDisposed()
{
::osl::MutexGuard aGuard( m_aMutex );
- m_pStorage = NULL;
+ m_pStorage = nullptr;
}
void SAL_CALL OChildDispListener_Impl::disposing( const lang::EventObject& Source )
diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx
index c772cbe472c1..6c98e3ba106a 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -35,7 +35,7 @@ OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl,
: m_pImpl( &aImpl )
, m_rMutexRef( m_pImpl->m_rMutexRef )
, m_xStream( xStream )
-, m_pInterfaceContainer( NULL )
+, m_pInterfaceContainer( nullptr )
, m_aProperties( aProps )
, m_bDisposed( false )
, m_nStorageType( nStorageType )
@@ -50,10 +50,10 @@ OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl,
OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > xStream,
const uno::Sequence< beans::PropertyValue >& aProps,
sal_Int32 nStorageType )
-: m_pImpl( NULL )
+: m_pImpl( nullptr )
, m_rMutexRef( new SotMutexHolder )
, m_xStream( xStream )
-, m_pInterfaceContainer( NULL )
+, m_pInterfaceContainer( nullptr )
, m_aProperties( aProps )
, m_bDisposed( false )
, m_nStorageType( nStorageType )
@@ -228,7 +228,7 @@ void OInputCompStream::InternalDispose()
catch( uno::Exception& )
{}
- m_pImpl = NULL;
+ m_pImpl = nullptr;
m_bDisposed = true;
}
@@ -253,7 +253,7 @@ void SAL_CALL OInputCompStream::dispose( )
if ( m_pImpl )
{
m_pImpl->InputStreamDisposed( this );
- m_pImpl = NULL;
+ m_pImpl = nullptr;
}
m_bDisposed = true;
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx
index 73c50b0ad781..4d84e2d6758b 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -138,7 +138,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
if ( !xChildStorage.is() )
throw uno::RuntimeException();
- aElement = new OHierarchyElement_Impl( NULL, xChildStorage );
+ aElement = new OHierarchyElement_Impl( nullptr, xChildStorage );
}
xResult = aElement->GetStreamHierarchically( nStorageMode, aListPath, nStreamMode, aEncryptionData );
@@ -195,7 +195,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( OStringList_Impl& aList
if ( !xChildStorage.is() )
throw uno::RuntimeException();
- aElement = new OHierarchyElement_Impl( NULL, xChildStorage );
+ aElement = new OHierarchyElement_Impl( nullptr, xChildStorage );
}
aElement->RemoveStreamHierarchically( aListPath );
diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx
index 6813fa1e13cb..006b2e22d4a4 100644
--- a/package/source/xstor/ohierarchyholder.hxx
+++ b/package/source/xstor/ohierarchyholder.hxx
@@ -71,7 +71,7 @@ public:
{}
explicit OHierarchyElement_Impl( const css::uno::WeakReference< css::embed::XStorage >& xWeakStorage )
- : m_rParent( NULL )
+ : m_rParent( nullptr )
, m_xWeakOwnStorage( xWeakStorage )
{}
diff --git a/package/source/xstor/oseekinstream.cxx b/package/source/xstor/oseekinstream.cxx
index 4d6521aecbfc..074f08f5d4e7 100644
--- a/package/source/xstor/oseekinstream.cxx
+++ b/package/source/xstor/oseekinstream.cxx
@@ -53,13 +53,13 @@ OInputSeekStream::~OInputSeekStream()
uno::Sequence< uno::Type > SAL_CALL OInputSeekStream::getTypes()
throw ( uno::RuntimeException, std::exception )
{
- static ::cppu::OTypeCollection* pTypeCollection = NULL ;
+ static ::cppu::OTypeCollection* pTypeCollection = nullptr ;
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
static ::cppu::OTypeCollection aTypeCollection(
cppu::UnoType<io::XSeekable>::get(),
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 4967e23a96f5..822ab1856f7a 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -263,7 +263,7 @@ OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
sal_Int32 nStorageType,
bool bDefaultCompress,
const uno::Reference< io::XInputStream >& xRelInfoStream )
-: m_pAntiImpl( NULL )
+: m_pAntiImpl( nullptr )
, m_bHasDataToFlush( false )
, m_bFlushed( false )
, m_xPackageStream( xPackageStream )
@@ -491,9 +491,9 @@ void OWriteStream_Impl::DisposeWrappers()
AddLog( "Quiet exception" );
}
- m_pAntiImpl = NULL;
+ m_pAntiImpl = nullptr;
}
- m_pParent = NULL;
+ m_pParent = nullptr;
if ( !m_aInputStreamsList.empty() )
{
@@ -503,7 +503,7 @@ void OWriteStream_Impl::DisposeWrappers()
if ( (*pStreamIter) )
{
(*pStreamIter)->InternalDispose();
- (*pStreamIter) = NULL;
+ (*pStreamIter) = nullptr;
}
}
@@ -2459,7 +2459,7 @@ void SAL_CALL OWriteStream::dispose()
m_xSeekable.clear();
- m_pImpl->m_pAntiImpl = NULL;
+ m_pImpl->m_pAntiImpl = nullptr;
if ( !m_bInitOnDemand )
{
@@ -2487,7 +2487,7 @@ void SAL_CALL OWriteStream::dispose()
}
}
- m_pImpl = NULL;
+ m_pImpl = nullptr;
}
// the listener might try to get rid of parent storage, and the storage would delete this object;
diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx
index 98e305742836..d34f1fb89cb9 100644
--- a/package/source/xstor/owriteablestream.hxx
+++ b/package/source/xstor/owriteablestream.hxx
@@ -161,7 +161,7 @@ public:
bool HasTempFile_Impl() const { return ( m_aTempURL.getLength() != 0 ); }
bool IsTransacted();
- bool HasWriteOwner_Impl() const { return ( m_pAntiImpl != NULL ); }
+ bool HasWriteOwner_Impl() const { return ( m_pAntiImpl != nullptr ); }
void InsertIntoPackageFolder(
const OUString& aName,
diff --git a/package/source/xstor/register.cxx b/package/source/xstor/register.cxx
index 65cd33fa0559..1d06531ab61b 100644
--- a/package/source/xstor/register.cxx
+++ b/package/source/xstor/register.cxx
@@ -30,7 +30,7 @@ extern "C" {
SAL_DLLPUBLIC_EXPORT void * SAL_CALL xstor_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
OUString aImplName( OUString::createFromAscii( pImplName ) );
uno::Reference< lang::XSingleServiceFactory > xFactory;
diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx
index 1eca85ff62ef..88a5ab0988f7 100644
--- a/package/source/xstor/switchpersistencestream.cxx
+++ b/package/source/xstor/switchpersistencestream.cxx
@@ -67,7 +67,7 @@ SwitchablePersistenceStream::SwitchablePersistenceStream(
const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< io::XStream >& xStream )
: m_xContext( xContext )
-, m_pStreamData( NULL )
+, m_pStreamData( nullptr )
{
SwitchPersistenceTo( xStream );
}
@@ -76,7 +76,7 @@ SwitchablePersistenceStream::SwitchablePersistenceStream(
const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< io::XInputStream >& xInputStream )
: m_xContext( xContext )
-, m_pStreamData( NULL )
+, m_pStreamData( nullptr )
{
SwitchPersistenceTo( xInputStream );
}
@@ -203,7 +203,7 @@ void SwitchablePersistenceStream::CloseAll_Impl()
if ( m_pStreamData )
{
delete m_pStreamData;
- m_pStreamData = NULL;
+ m_pStreamData = nullptr;
}
}
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 3c37bba00551..5a275fc177c5 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -168,8 +168,8 @@ SotElement_Impl::SotElement_Impl( const OUString& rName, bool bStor, bool bNew )
, m_bIsRemoved( false )
, m_bIsInserted( bNew )
, m_bIsStorage( bStor )
-, m_pStorage( NULL )
-, m_pStream( NULL )
+, m_pStorage( nullptr )
+, m_pStream( nullptr )
{
}
@@ -186,7 +186,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream,
uno::Reference< uno::XComponentContext > xContext,
sal_Int32 nStorageType )
: m_rMutexRef( new SotMutexHolder )
-, m_pAntiImpl( NULL )
+, m_pAntiImpl( nullptr )
, m_nStorageMode( nMode & ~embed::ElementModes::SEEKABLE )
, m_bIsModified( ( nMode & ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) ) == ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) )
, m_bBroadcastModified( false )
@@ -197,13 +197,13 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream,
, m_xContext( xContext )
, m_xProperties( xProperties )
, m_bHasCommonEncryptionData( false )
-, m_pParent( NULL )
+, m_pParent( nullptr )
, m_bControlMediaType( false )
, m_bMTFallbackUsed( false )
, m_bControlVersion( false )
-, m_pSwitchStream( NULL )
+, m_pSwitchStream( nullptr )
, m_nStorageType( nStorageType )
-, m_pRelStorElement( NULL )
+, m_pRelStorElement( nullptr )
, m_nRelInfoStatus( RELINFO_NO_INIT )
{
// all the checks done below by assertion statements must be done by factory
@@ -226,7 +226,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > xStream,
uno::Reference< uno::XComponentContext > xContext,
sal_Int32 nStorageType )
: m_rMutexRef( new SotMutexHolder )
-, m_pAntiImpl( NULL )
+, m_pAntiImpl( nullptr )
, m_nStorageMode( nMode & ~embed::ElementModes::SEEKABLE )
, m_bIsModified( ( nMode & ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) ) == ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) )
, m_bBroadcastModified( false )
@@ -237,13 +237,13 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > xStream,
, m_xContext( xContext )
, m_xProperties( xProperties )
, m_bHasCommonEncryptionData( false )
-, m_pParent( NULL )
+, m_pParent( nullptr )
, m_bControlMediaType( false )
, m_bMTFallbackUsed( false )
, m_bControlVersion( false )
-, m_pSwitchStream( NULL )
+, m_pSwitchStream( nullptr )
, m_nStorageType( nStorageType )
-, m_pRelStorElement( NULL )
+, m_pRelStorElement( nullptr )
, m_nRelInfoStatus( RELINFO_NO_INIT )
{
// all the checks done below by assertion statements must be done by factory
@@ -268,7 +268,7 @@ OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent,
uno::Reference< uno::XComponentContext > xContext,
sal_Int32 nStorageType )
: m_rMutexRef( new SotMutexHolder )
-, m_pAntiImpl( NULL )
+, m_pAntiImpl( nullptr )
, m_nStorageMode( nMode & ~embed::ElementModes::SEEKABLE )
, m_bIsModified( ( nMode & ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) ) == ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) )
, m_bBroadcastModified( false )
@@ -284,9 +284,9 @@ OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent,
, m_bControlMediaType( false )
, m_bMTFallbackUsed( false )
, m_bControlVersion( false )
-, m_pSwitchStream( NULL )
+, m_pSwitchStream( nullptr )
, m_nStorageType( nStorageType )
-, m_pRelStorElement( NULL )
+, m_pRelStorElement( nullptr )
, m_nRelInfoStatus( RELINFO_NO_INIT )
{
SAL_WARN_IF( !xPackageFolder.is(), "package.xstor", "No package folder!" );
@@ -308,7 +308,7 @@ OStorage_Impl::~OStorage_Impl()
AddLog( rException.Message );
AddLog( THROW_WHERE "Quiet exception" );
}
- m_pAntiImpl = NULL;
+ m_pAntiImpl = nullptr;
}
else if ( !m_aReadOnlyWrapList.empty() )
{
@@ -329,7 +329,7 @@ OStorage_Impl::~OStorage_Impl()
m_aReadOnlyWrapList.clear();
}
- m_pParent = NULL;
+ m_pParent = nullptr;
}
std::for_each(m_aChildrenList.begin(), m_aChildrenList.end(), boost::checked_deleter<SotElement_Impl>());
@@ -341,7 +341,7 @@ OStorage_Impl::~OStorage_Impl()
if ( m_nStorageType == embed::StorageFormats::OFOPXML && m_pRelStorElement )
{
delete m_pRelStorElement;
- m_pRelStorElement = NULL;
+ m_pRelStorElement = nullptr;
}
m_xPackageFolder.clear();
@@ -996,7 +996,7 @@ void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& x
if ( !m_xPackageFolder.is() )
throw uno::RuntimeException( THROW_WHERE );
- OStorage_Impl aTempRepresent( NULL,
+ OStorage_Impl aTempRepresent( nullptr,
embed::ElementModes::READ,
m_xPackageFolder,
m_xPackage,
@@ -1072,7 +1072,7 @@ void OStorage_Impl::Commit()
if ( m_bCommited || m_bIsRoot )
xNewPackageFolder->removeByName( (*pDeletedIter)->m_aOriginalName );
delete *pDeletedIter;
- *pDeletedIter = NULL;
+ *pDeletedIter = nullptr;
}
m_aDeletedList.clear();
@@ -1373,7 +1373,7 @@ SotElement_Impl* OStorage_Impl::FindElement( const OUString& rName )
return *pElementIter;
}
- return NULL;
+ return nullptr;
}
SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, bool bEncr )
@@ -1491,11 +1491,11 @@ SotElement_Impl* OStorage_Impl::InsertStorage( const OUString& aName, sal_Int32
SotElement_Impl* OStorage_Impl::InsertElement( const OUString& aName, bool bIsStorage )
{
- OSL_ENSURE( FindElement( aName ) == NULL, "Should not try to insert existing element" );
+ OSL_ENSURE( FindElement( aName ) == nullptr, "Should not try to insert existing element" );
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- SotElement_Impl* pDeletedElm = NULL;
+ SotElement_Impl* pDeletedElm = nullptr;
for ( SotElementList_Impl::iterator pElementIter = m_aChildrenList.begin();
pElementIter != m_aChildrenList.end(); ++pElementIter )
@@ -1630,13 +1630,13 @@ void OStorage_Impl::ClearElement( SotElement_Impl* pElement )
if ( pElement->m_pStorage )
{
delete pElement->m_pStorage;
- pElement->m_pStorage = NULL;
+ pElement->m_pStorage = nullptr;
}
if ( pElement->m_pStream )
{
delete pElement->m_pStream;
- pElement->m_pStream = NULL;
+ pElement->m_pStream = nullptr;
}
}
@@ -1712,7 +1712,7 @@ void OStorage_Impl::CreateRelStorage()
m_pRelStorElement = new SotElement_Impl( "_rels", true, true );
m_pRelStorElement->m_pStorage = CreateNewStorageImpl( embed::ElementModes::WRITE );
if ( m_pRelStorElement->m_pStorage )
- m_pRelStorElement->m_pStorage->m_pParent = NULL; // the relation storage is completely controlled by parent
+ m_pRelStorElement->m_pStorage->m_pParent = nullptr; // the relation storage is completely controlled by parent
}
if ( !m_pRelStorElement->m_pStorage )
@@ -1863,7 +1863,7 @@ void OStorage_Impl::CommitRelInfo( const uno::Reference< container::XNameContain
{
// the empty relations storage should not be created
delete m_pRelStorElement;
- m_pRelStorElement = NULL;
+ m_pRelStorElement = nullptr;
m_xRelStorage.clear();
}
else if ( m_pRelStorElement && m_pRelStorElement->m_pStorage && xNewPackageFolder.is() )
@@ -1984,7 +1984,7 @@ void SAL_CALL OStorage::InternalDispose( bool bNotifyImpl )
}
else
{
- m_pImpl->m_pAntiImpl = NULL;
+ m_pImpl->m_pAntiImpl = nullptr;
if ( bNotifyImpl )
{
@@ -1998,7 +1998,7 @@ void SAL_CALL OStorage::InternalDispose( bool bNotifyImpl )
}
}
- m_pImpl = NULL;
+ m_pImpl = nullptr;
}
void OStorage::ChildIsDisposed( const uno::Reference< uno::XInterface >& xChild )
@@ -2905,7 +2905,7 @@ sal_Bool SAL_CALL OStorage::isStreamElement( const OUString& aElementName )
if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); // unacceptable name
- SotElement_Impl* pElement = NULL;
+ SotElement_Impl* pElement = nullptr;
try
{
@@ -2972,7 +2972,7 @@ sal_Bool SAL_CALL OStorage::isStorageElement( const OUString& aElementName )
if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aElementName == "_rels" )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
- SotElement_Impl* pElement = NULL;
+ SotElement_Impl* pElement = nullptr;
try
{
@@ -4282,7 +4282,7 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" )
return sal_False;
- SotElement_Impl* pElement = NULL;
+ SotElement_Impl* pElement = nullptr;
try
{
pElement = m_pImpl->FindElement( aName );
@@ -4304,7 +4304,7 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
aCaught );
}
- return ( pElement != NULL );
+ return ( pElement != nullptr );
}
uno::Type SAL_CALL OStorage::getElementType()
diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx
index 24ea11832ac5..e5130e288eeb 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -136,7 +136,7 @@ struct OStorage_Impl
oslInterlockedCount m_nModifiedListenerCount;
bool HasModifiedListener()
{
- return m_nModifiedListenerCount > 0 && m_pAntiImpl != NULL;
+ return m_nModifiedListenerCount > 0 && m_pAntiImpl != nullptr;
}
SotElementList_Impl m_aChildrenList;
diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx
index 939814a345b8..ccff8c6a2edb 100644
--- a/package/source/zipapi/Deflater.cxx
+++ b/package/source/zipapi/Deflater.cxx
@@ -134,7 +134,7 @@ void SAL_CALL Deflater::reset( )
}
void SAL_CALL Deflater::end( )
{
- if (pStream != NULL)
+ if (pStream != nullptr)
{
#if !defined Z_PREFIX
deflateEnd(pStream);
@@ -143,7 +143,7 @@ void SAL_CALL Deflater::end( )
#endif
delete pStream;
}
- pStream = NULL;
+ pStream = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/zipapi/Inflater.cxx b/package/source/zipapi/Inflater.cxx
index 17a83fa59868..a913c7a15b3d 100644
--- a/package/source/zipapi/Inflater.cxx
+++ b/package/source/zipapi/Inflater.cxx
@@ -33,7 +33,7 @@ Inflater::Inflater(bool bNoWrap)
nOffset(0),
nLength(0),
nLastInflateError(0),
- pStream(NULL)
+ pStream(nullptr)
{
pStream = new z_stream;
/* memset to 0 to set zalloc/opaque etc */
@@ -80,7 +80,7 @@ sal_Int32 SAL_CALL Inflater::doInflateSegment( Sequence< sal_Int8 >& rBuffer, sa
void SAL_CALL Inflater::end( )
{
- if (pStream != NULL)
+ if (pStream != nullptr)
{
#if !defined Z_PREFIX
inflateEnd(pStream);
@@ -89,7 +89,7 @@ void SAL_CALL Inflater::end( )
#endif
delete pStream;
}
- pStream = NULL;
+ pStream = nullptr;
}
sal_Int32 Inflater::doInflateBytes (Sequence < sal_Int8 > &rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength)
diff --git a/package/source/zipapi/ZipEnumeration.cxx b/package/source/zipapi/ZipEnumeration.cxx
index aab7325afdb0..f5093f6f69d2 100644
--- a/package/source/zipapi/ZipEnumeration.cxx
+++ b/package/source/zipapi/ZipEnumeration.cxx
@@ -39,7 +39,7 @@ const ZipEntry* SAL_CALL ZipEnumeration::nextElement()
if (aIterator != rEntryHash.end())
return &((*aIterator++).second);
else
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index be261cd5bef9..7d8378261666 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -43,7 +43,7 @@ using namespace com::sun::star::packages::zip::ZipConstants;
ZipOutputStream::ZipOutputStream( const uno::Reference < io::XOutputStream > &xOStream )
: m_xStream(xOStream)
, m_aChucker(xOStream)
-, m_pCurrentEntry(NULL)
+, m_pCurrentEntry(nullptr)
, m_rSharedThreadPool(comphelper::ThreadPool::getSharedOptimalPool())
{
}
@@ -90,7 +90,7 @@ void ZipOutputStream::rawCloseEntry( bool bEncrypt )
if (bEncrypt)
m_pCurrentEntry->nMethod = STORED;
- m_pCurrentEntry = NULL;
+ m_pCurrentEntry = nullptr;
}
void ZipOutputStream::finish()
diff --git a/package/source/zipapi/blowfishcontext.cxx b/package/source/zipapi/blowfishcontext.cxx
index f60f299d7bca..fd45712fce7e 100644
--- a/package/source/zipapi/blowfishcontext.cxx
+++ b/package/source/zipapi/blowfishcontext.cxx
@@ -53,7 +53,7 @@ BlowfishCFB8CipherContext::~BlowfishCFB8CipherContext()
if ( m_pCipher )
{
rtl_cipher_destroy ( m_pCipher );
- m_pCipher = NULL;
+ m_pCipher = nullptr;
}
}
@@ -100,7 +100,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL BlowfishCFB8CipherContext::finalizeCipherCo
throw lang::DisposedException();
rtl_cipher_destroy ( m_pCipher );
- m_pCipher = NULL;
+ m_pCipher = nullptr;
return uno::Sequence< sal_Int8 >();
}
diff --git a/package/source/zipapi/blowfishcontext.hxx b/package/source/zipapi/blowfishcontext.hxx
index d369ec74466f..47c4adf6c263 100644
--- a/package/source/zipapi/blowfishcontext.hxx
+++ b/package/source/zipapi/blowfishcontext.hxx
@@ -31,7 +31,7 @@ class BlowfishCFB8CipherContext : public cppu::WeakImplHelper< css::xml::crypto:
bool m_bEncrypt;
BlowfishCFB8CipherContext()
- : m_pCipher( NULL )
+ : m_pCipher( nullptr )
, m_bEncrypt( false )
{}
diff --git a/package/source/zipapi/sha1context.cxx b/package/source/zipapi/sha1context.cxx
index b300aba71d8d..58bda903a5ee 100644
--- a/package/source/zipapi/sha1context.cxx
+++ b/package/source/zipapi/sha1context.cxx
@@ -40,7 +40,7 @@ SHA1DigestContext::~SHA1DigestContext()
if ( m_pDigest )
{
rtl_digest_destroySHA1( m_pDigest );
- m_pDigest = NULL;
+ m_pDigest = nullptr;
}
}
@@ -54,7 +54,7 @@ void SAL_CALL SHA1DigestContext::updateDigest( const uno::Sequence< ::sal_Int8 >
if ( rtl_Digest_E_None != rtl_digest_updateSHA1( m_pDigest, aData.getConstArray(), aData.getLength() ) )
{
rtl_digest_destroySHA1( m_pDigest );
- m_pDigest = NULL;
+ m_pDigest = nullptr;
throw uno::RuntimeException();
}
@@ -71,13 +71,13 @@ uno::Sequence< ::sal_Int8 > SAL_CALL SHA1DigestContext::finalizeDigestAndDispose
if ( rtl_Digest_E_None != rtl_digest_getSHA1( m_pDigest, reinterpret_cast< sal_uInt8* >( aResult.getArray() ), aResult.getLength() ) )
{
rtl_digest_destroySHA1( m_pDigest );
- m_pDigest = NULL;
+ m_pDigest = nullptr;
throw uno::RuntimeException();
}
rtl_digest_destroySHA1( m_pDigest );
- m_pDigest = NULL;
+ m_pDigest = nullptr;
return aResult;
}
diff --git a/package/source/zipapi/sha1context.hxx b/package/source/zipapi/sha1context.hxx
index d57a6390993e..5298d3bfea67 100644
--- a/package/source/zipapi/sha1context.hxx
+++ b/package/source/zipapi/sha1context.hxx
@@ -30,7 +30,7 @@ class SHA1DigestContext : public cppu::WeakImplHelper< css::xml::crypto::XDigest
void* m_pDigest;
SHA1DigestContext()
- : m_pDigest( NULL )
+ : m_pDigest( nullptr )
{}
public:
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 931e00a4834f..f0b61e64cdec 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -155,8 +155,8 @@ ZipPackage::ZipPackage ( const uno::Reference < XComponentContext > &xContext )
, m_bAllowRemoveOnInsert( true )
, m_eMode ( e_IMode_None )
, m_xContext( xContext )
-, m_pRootFolder( NULL )
-, m_pZipFile( NULL )
+, m_pRootFolder( nullptr )
+, m_pZipFile( nullptr )
{
m_xRootFolder = m_pRootFolder = new ZipPackageFolder( m_xContext, m_nFormat, m_bAllowRemoveOnInsert );
}
@@ -217,14 +217,14 @@ void ZipPackage::parseManifest()
uno::Sequence < uno::Sequence < PropertyValue > > aManifestSequence = xReader->readManifestSequence ( xSink->getInputStream() );
sal_Int32 nLength = aManifestSequence.getLength();
const uno::Sequence < PropertyValue > *pSequence = aManifestSequence.getConstArray();
- ZipPackageStream *pStream = NULL;
- ZipPackageFolder *pFolder = NULL;
+ ZipPackageStream *pStream = nullptr;
+ ZipPackageFolder *pFolder = nullptr;
for ( sal_Int32 i = 0; i < nLength ; i++, pSequence++ )
{
OUString sPath, sMediaType, sVersion;
const PropertyValue *pValue = pSequence->getConstArray();
- const Any *pSalt = NULL, *pVector = NULL, *pCount = NULL, *pSize = NULL, *pDigest = NULL, *pDigestAlg = NULL, *pEncryptionAlg = NULL, *pStartKeyAlg = NULL, *pDerivedKeySize = NULL;
+ const Any *pSalt = nullptr, *pVector = nullptr, *pCount = nullptr, *pSize = nullptr, *pDigest = nullptr, *pDigestAlg = nullptr, *pEncryptionAlg = nullptr, *pStartKeyAlg = nullptr, *pDerivedKeySize = nullptr;
for ( sal_Int32 j = 0, nNum = pSequence->getLength(); j < nNum; j++ )
{
if ( pValue[j].Name.equals( sPropFullPath ) )
@@ -755,14 +755,14 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
}
catch ( Exception & )
{
- if( m_pZipFile ) { delete m_pZipFile; m_pZipFile = NULL; }
+ if( m_pZipFile ) { delete m_pZipFile; m_pZipFile = nullptr; }
throw;
}
if ( bBadZipFile )
{
// clean up the memory, and tell the UCB about the error
- if( m_pZipFile ) { delete m_pZipFile; m_pZipFile = NULL; }
+ if( m_pZipFile ) { delete m_pZipFile; m_pZipFile = nullptr; }
throw css::packages::zip::ZipIOException (
THROW_WHERE "Bad Zip File, " + message,
@@ -817,7 +817,7 @@ Any SAL_CALL ZipPackage::getByHierarchicalName( const OUString& aName )
}
nOldIndex = 0;
ZipPackageFolder * pCurrent = m_pRootFolder;
- ZipPackageFolder * pPrevious = NULL;
+ ZipPackageFolder * pPrevious = nullptr;
while ( ( nIndex = aName.indexOf( '/', nOldIndex )) != -1 )
{
sTemp = aName.copy ( nOldIndex, nIndex - nOldIndex );
@@ -898,7 +898,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
return sal_True;
}
ZipPackageFolder * pCurrent = m_pRootFolder;
- ZipPackageFolder * pPrevious = NULL;
+ ZipPackageFolder * pPrevious = nullptr;
nOldIndex = 0;
while ( ( nIndex = aName.indexOf( '/', nOldIndex )) != -1 )
{
@@ -939,7 +939,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
uno::Any e(::cppu::getCaughtException());
throw lang::WrappedTargetRuntimeException(
OUString("ZipPackage::hasByHierarchicalName"),
- 0, e);
+ nullptr, e);
}
return sal_False;
}
@@ -1034,7 +1034,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< uno::Seq
// the manifest.xml is never encrypted - so pass an empty reference
ZipOutputStream::setEntry(pEntry);
aZipOut.writeLOC(pEntry);
- ZipOutputEntry aZipEntry(aZipOut.getStream(), m_xContext, *pEntry, NULL);
+ ZipOutputEntry aZipEntry(aZipOut.getStream(), m_xContext, *pEntry, nullptr);
aZipEntry.write(pBuffer->getSequence());
aZipEntry.closeEntry();
aZipOut.rawCloseEntry();
@@ -1087,7 +1087,7 @@ void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno:
// there is no encryption in this format currently
ZipOutputStream::setEntry(pEntry);
aZipOut.writeLOC(pEntry);
- ZipOutputEntry aZipEntry(aZipOut.getStream(), m_xContext, *pEntry, NULL);
+ ZipOutputEntry aZipEntry(aZipOut.getStream(), m_xContext, *pEntry, nullptr);
aZipEntry.write(pBuffer->getSequence());
aZipEntry.closeEntry();
aZipOut.rawCloseEntry();
diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx
index 78a2e5dcd2e1..33518946c00d 100644
--- a/package/source/zippackage/ZipPackageEntry.cxx
+++ b/package/source/zippackage/ZipPackageEntry.cxx
@@ -43,7 +43,7 @@ using namespace com::sun::star::packages::zip::ZipConstants;
ZipPackageEntry::ZipPackageEntry()
: mbIsFolder( false )
, mbAllowRemoveOnInsert(false)
-, mpParent ( NULL )
+, mpParent ( nullptr )
, m_nFormat(0)
{
}
diff --git a/package/source/zippackage/ZipPackageSink.cxx b/package/source/zippackage/ZipPackageSink.cxx
index d7dd47b37ae1..b3db349c59a7 100644
--- a/package/source/zippackage/ZipPackageSink.cxx
+++ b/package/source/zippackage/ZipPackageSink.cxx
@@ -20,7 +20,7 @@
#include <ZipPackageSink.hxx>
ZipPackageSink::ZipPackageSink()
-: xStream ( css::uno::Reference < css::io::XInputStream > (NULL))
+: xStream ( css::uno::Reference < css::io::XInputStream > (nullptr))
{
}
ZipPackageSink::~ZipPackageSink()
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index f05bdce6d321..63248e7d108b 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -44,8 +44,8 @@ using namespace ::com::sun::star;
OZipFileAccess::OZipFileAccess( const uno::Reference< uno::XComponentContext >& rxContext )
: m_aMutexHolder( new SotMutexHolder )
, m_xContext( rxContext )
-, m_pZipFile( NULL )
-, m_pListenersContainer( NULL )
+, m_pZipFile( nullptr )
+, m_pListenersContainer( nullptr )
, m_bDisposed( false )
, m_bOwnContent( false )
{
@@ -404,13 +404,13 @@ void SAL_CALL OZipFileAccess::dispose()
lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
m_pListenersContainer->disposeAndClear( aSource );
delete m_pListenersContainer;
- m_pListenersContainer = NULL;
+ m_pListenersContainer = nullptr;
}
if ( m_pZipFile )
{
delete m_pZipFile;
- m_pZipFile = NULL;
+ m_pZipFile = nullptr;
}
if ( m_xContentStream.is() && m_bOwnContent )