diff options
Diffstat (limited to 'svl/source/misc')
-rw-r--r-- | svl/source/misc/adrparse.cxx | 30 | ||||
-rw-r--r-- | svl/source/misc/inettype.cxx | 10 | ||||
-rw-r--r-- | svl/source/misc/sharecontrolfile.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/sharedstring.cxx | 10 | ||||
-rw-r--r-- | svl/source/misc/sharedstringpool.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/strmadpt.cxx | 22 | ||||
-rw-r--r-- | svl/source/misc/urihelper.cxx | 2 |
7 files changed, 39 insertions, 39 deletions
diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx index 27ca0f658346..96849b1dedd4 100644 --- a/svl/source/misc/adrparse.cxx +++ b/svl/source/misc/adrparse.cxx @@ -46,8 +46,8 @@ struct ParsedAddrSpec inline void ParsedAddrSpec::reset() { - m_pBegin = 0; - m_pEnd = 0; + m_pBegin = nullptr; + m_pEnd = nullptr; m_eLastElem = ELEMENT_START; m_bAtFound = false; m_bReparse = false; @@ -115,14 +115,14 @@ public: inline void SvAddressParser_Impl::resetRealNameAndFirstComment() { - m_pRealNameBegin = 0; - m_pRealNameEnd = 0; - m_pRealNameContentBegin = 0; - m_pRealNameContentEnd = 0; + m_pRealNameBegin = nullptr; + m_pRealNameEnd = nullptr; + m_pRealNameContentBegin = nullptr; + m_pRealNameContentEnd = nullptr; m_bRealNameReparse = false; m_bRealNameFinished = false; - m_pFirstCommentBegin = 0; - m_pFirstCommentEnd = 0; + m_pFirstCommentBegin = nullptr; + m_pFirstCommentEnd = nullptr; m_bFirstCommentReparse = false; } @@ -221,8 +221,8 @@ bool SvAddressParser_Impl::readToken() case TOKEN_COMMENT: { m_pCurTokenBegin = m_pInputPos - 1; - m_pCurTokenContentBegin = 0; - m_pCurTokenContentEnd = 0; + m_pCurTokenContentBegin = nullptr; + m_pCurTokenContentEnd = nullptr; bool bEscaped = false; int nLevel = 0; for (;;) @@ -440,10 +440,10 @@ OUString SvAddressParser_Impl::reparseComment(sal_Unicode const * pBegin, SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser, const OUString& rInput) - : m_pCurTokenBegin(NULL) - , m_pCurTokenEnd(NULL) - , m_pCurTokenContentBegin(NULL) - , m_pCurTokenContentEnd(NULL) + : m_pCurTokenBegin(nullptr) + , m_pCurTokenEnd(nullptr) + , m_pCurTokenContentBegin(nullptr) + , m_pCurTokenContentEnd(nullptr) { m_pInputPos = rInput.getStr(); m_pInputEnd = m_pInputPos + rInput.getLength(); @@ -619,7 +619,7 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser, } else { - m_pAddrSpec = 0; + m_pAddrSpec = nullptr; } if (m_pAddrSpec) diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index 596536c450e8..1f51d09cc0eb 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -117,7 +117,7 @@ inline TypeIDMapEntry * Registration::getEntry(INetContentType eTypeID) if( it != rRegistration.m_aTypeIDMap.end() ) return it->second; else - return NULL; + return nullptr; } MediaTypeEntry const * seekEntry(OUString const & rTypeName, @@ -444,7 +444,7 @@ TypeNameMapEntry * Registration::getExtensionEntry(OUString const & rTypeName) TypeNameMap::iterator it = rRegistration.m_aTypeNameMap.find(aTheTypeName); if (it != rRegistration.m_aTypeNameMap.end()) return & it->second; - return 0; + return nullptr; } // static @@ -558,7 +558,7 @@ MediaTypeEntry const * seekEntry(OUString const & rTypeName, else nLow = nMiddle + 1; } - return 0; + return nullptr; } } @@ -789,10 +789,10 @@ bool INetContentTypes::parse( OUString t; OUString s; INetContentTypeParameterList p; - if (INetMIME::scanContentType(b, e, &t, &s, pParameters == 0 ? 0 : &p) == e) { + if (INetMIME::scanContentType(b, e, &t, &s, pParameters == nullptr ? nullptr : &p) == e) { rType = t; rSubType = s; - if (pParameters != 0) { + if (pParameters != nullptr) { *pParameters = p; } return true; diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx index 3c286e97ad81..8ca316d1b061 100644 --- a/svl/source/misc/sharecontrolfile.cxx +++ b/svl/source/misc/sharecontrolfile.cxx @@ -81,7 +81,7 @@ void ShareControlFile::OpenStream() uno::Reference< ucb::XCommandEnvironment > xDummyEnv; ::ucbhelper::Content aContent = ::ucbhelper::Content( m_aURL, xDummyEnv, comphelper::getProcessComponentContext() ); - uno::Reference< ucb::XContentIdentifier > xContId( aContent.get().is() ? aContent.get()->getIdentifier() : 0 ); + uno::Reference< ucb::XContentIdentifier > xContId( aContent.get().is() ? aContent.get()->getIdentifier() : nullptr ); if ( !xContId.is() || xContId->getContentProviderScheme() != "file" ) throw io::IOException(); // the implementation supports only local files for now diff --git a/svl/source/misc/sharedstring.cxx b/svl/source/misc/sharedstring.cxx index 81379520a3d9..b81f8fcf8072 100644 --- a/svl/source/misc/sharedstring.cxx +++ b/svl/source/misc/sharedstring.cxx @@ -15,12 +15,12 @@ SharedString SharedString::getEmptyString() { // unicode string array for empty string is globally shared in OUString. // Let's take advantage of that. - rtl_uString* pData = NULL; + rtl_uString* pData = nullptr; rtl_uString_new(&pData); return SharedString(pData, pData); } -SharedString::SharedString() : mpData(NULL), mpDataIgnoreCase(NULL) {} +SharedString::SharedString() : mpData(nullptr), mpDataIgnoreCase(nullptr) {} SharedString::SharedString( rtl_uString* pData, rtl_uString* pDataIgnoreCase ) : mpData(pData), mpDataIgnoreCase(pDataIgnoreCase) @@ -31,7 +31,7 @@ SharedString::SharedString( rtl_uString* pData, rtl_uString* pDataIgnoreCase ) : rtl_uString_acquire(mpDataIgnoreCase); } -SharedString::SharedString( const OUString& rStr ) : mpData(rStr.pData), mpDataIgnoreCase(NULL) +SharedString::SharedString( const OUString& rStr ) : mpData(rStr.pData), mpDataIgnoreCase(nullptr) { rtl_uString_acquire(mpData); } @@ -122,12 +122,12 @@ const rtl_uString* SharedString::getDataIgnoreCase() const bool SharedString::isValid() const { - return mpData != NULL; + return mpData != nullptr; } bool SharedString::isEmpty() const { - return mpData == NULL || mpData->length == 0; + return mpData == nullptr || mpData->length == 0; } sal_Int32 SharedString::getLength() const diff --git a/svl/source/misc/sharedstringpool.cxx b/svl/source/misc/sharedstringpool.cxx index bb9be8c7b7eb..435209a68874 100644 --- a/svl/source/misc/sharedstringpool.cxx +++ b/svl/source/misc/sharedstringpool.cxx @@ -81,7 +81,7 @@ SharedString SharedStringPool::intern( const OUString& rStr ) if (!mpImpl->mpCharClass) // We don't track case insensitive strings. - return SharedString(pOrig, NULL); + return SharedString(pOrig, nullptr); if (!aRes.second) { diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx index a661bfa32755..f350153a8b9f 100644 --- a/svl/source/misc/strmadpt.cxx +++ b/svl/source/misc/strmadpt.cxx @@ -82,7 +82,7 @@ public: sal_uInt32 read(); - void clearReadBuffer() { m_pReadBuffer = 0; } + void clearReadBuffer() { m_pReadBuffer = nullptr; } sal_uInt32 write(sal_Int8 const * pBuffer, sal_uInt32 nSize); @@ -96,10 +96,10 @@ public: SvDataPipe_Impl::SvDataPipe_Impl(sal_uInt32 nThePageSize, sal_uInt32 nTheMinPages, sal_uInt32 nTheMaxPages) - : m_pFirstPage( 0 ) - , m_pReadPage( 0 ) - , m_pWritePage( 0 ) - , m_pReadBuffer( 0 ) + : m_pFirstPage( nullptr ) + , m_pReadPage( nullptr ) + , m_pWritePage( nullptr ) + , m_pReadBuffer( nullptr ) , m_nReadBufferSize( 0 ) , m_nReadBufferFilled( 0 ) , m_nPageSize(std::min< sal_uInt32 >( @@ -413,7 +413,7 @@ void SvInputStream::SetSize(sal_uInt64) SvInputStream::SvInputStream( css::uno::Reference< css::io::XInputStream > const & rTheStream): m_xStream(rTheStream), - m_pPipe(0), + m_pPipe(nullptr), m_nSeekedFrom(STREAM_SEEK_TO_END) { SetBufferSize(0); @@ -563,7 +563,7 @@ bool SvDataPipe_Impl::remove(Page * pPage) SvDataPipe_Impl::~SvDataPipe_Impl() { - if (m_pFirstPage != 0) + if (m_pFirstPage != nullptr) for (Page * pPage = m_pFirstPage;;) { Page * pNext = pPage->m_pNext; @@ -576,7 +576,7 @@ SvDataPipe_Impl::~SvDataPipe_Impl() sal_uInt32 SvDataPipe_Impl::read() { - if (m_pReadBuffer == 0 || m_nReadBufferSize == 0 || m_pReadPage == 0) + if (m_pReadBuffer == nullptr || m_nReadBufferSize == 0 || m_pReadPage == nullptr) return 0; sal_uInt32 nSize = m_nReadBufferSize; @@ -617,7 +617,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize) if (nSize == 0) return 0; - if (m_pWritePage == 0) + if (m_pWritePage == nullptr) { m_pFirstPage = static_cast< Page * >(rtl_allocateMemory(sizeof (Page) @@ -636,7 +636,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize) sal_uInt32 nRemain = nSize; - if (m_pReadBuffer != 0 && m_pReadPage == m_pWritePage + if (m_pReadBuffer != nullptr && m_pReadPage == m_pWritePage && m_pReadPage->m_pRead == m_pWritePage->m_pEnd) { sal_uInt32 nBlock = std::min(nRemain, @@ -713,7 +713,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize) SvDataPipe_Impl::SeekResult SvDataPipe_Impl::setReadPosition(sal_uInt32 nPosition) { - if (m_pFirstPage == 0) + if (m_pFirstPage == nullptr) return nPosition == 0 ? SEEK_OK : SEEK_PAST_END; if (nPosition diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index bb5678a9291f..0746cb221ce3 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -135,7 +135,7 @@ enum Result { Success, GeneralFailure, SpecificFailure }; Result normalizePrefix( css::uno::Reference< css::ucb::XUniversalContentBroker > const & broker, OUString const & uri, OUString * normalized) { - OSL_ASSERT(broker.is() && normalized != 0); + OSL_ASSERT(broker.is() && normalized != nullptr); css::uno::Reference< css::ucb::XContent > content; try { content = broker->queryContent(broker->createContentIdentifier(uri)); |