summaryrefslogtreecommitdiff
path: root/xmlhelp/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:29:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:32:01 +0100
commit87bae0e188aa3ce3c31d1aa91707c0fad6b81b65 (patch)
tree0d57a266b067952edd63e7cd0b3caa07d8bbd87e /xmlhelp/source
parent42e2262cdd05718a3286f813da6f53805846da02 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Ibdc68ac3fa6e1424337096c720c8c9605b767480
Diffstat (limited to 'xmlhelp/source')
-rw-r--r--xmlhelp/source/cxxhelp/inc/tvread.hxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx44
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx12
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.cxx20
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.hxx8
-rw-r--r--xmlhelp/source/cxxhelp/provider/provider.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetbase.cxx8
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/services.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx18
-rw-r--r--xmlhelp/source/treeview/tvread.cxx4
13 files changed, 64 insertions, 64 deletions
diff --git a/xmlhelp/source/cxxhelp/inc/tvread.hxx b/xmlhelp/source/cxxhelp/inc/tvread.hxx
index 62046c65d42d..9373fd6fbeff 100644
--- a/xmlhelp/source/cxxhelp/inc/tvread.hxx
+++ b/xmlhelp/source/cxxhelp/inc/tvread.hxx
@@ -166,7 +166,7 @@ namespace treeview {
friend class TVChildTarget;
public:
- TVRead( const ConfigData& configData,TVDom* tvDom = 0 );
+ TVRead( const ConfigData& configData,TVDom* tvDom = nullptr );
virtual ~TVRead();
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index 5604ee191ae0..d036ab961b58 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -101,7 +101,7 @@ XTYPEPROVIDER_COMMON_IMPL( Content );
uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
throw( uno::RuntimeException, std::exception )
{
- static cppu::OTypeCollection* pCollection = NULL;
+ static cppu::OTypeCollection* pCollection = nullptr;
if ( !pCollection )
{
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 332dbe36f17e..54825b416f48 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -126,9 +126,9 @@ Databases::Databases( bool showBasic,
Reference< uno::XComponentContext > xContext )
: m_xContext( xContext ),
m_bShowBasic(showBasic),
- m_pErrorDoc( 0 ),
+ m_pErrorDoc( nullptr ),
m_nCustomCSSDocLength( 0 ),
- m_pCustomCSSDoc( 0 ),
+ m_pCustomCSSDoc( nullptr ),
m_aCSS(styleSheet.toAsciiLowerCase()),
newProdName( "$[officename]" ),
newProdVersion( "$[officeversion]" ),
@@ -368,7 +368,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const OUStrin
osl::File cfgFile( getInstallPathAsURL() + key + ".cfg" );
if( osl::FileBase::E_None != cfgFile.open( osl_File_OpenFlag_Read ) )
- it->second = 0;
+ it->second = nullptr;
else
{
sal_uInt32 pos = 0;
@@ -479,14 +479,14 @@ helpdatafileproxy::Hdf* Databases::getHelpDataFile( const OUString& Database,
const OUString* pExtensionPath )
{
if( Database.isEmpty() || Language.isEmpty() )
- return 0;
+ return nullptr;
osl::MutexGuard aGuard( m_aMutex );
OUString aFileExt( helpText ? OUString(".ht") : OUString(".db") );
OUString dbFileName = "/" + Database + aFileExt;
OUString key;
- if( pExtensionPath == NULL )
+ if( pExtensionPath == nullptr )
key = processLang( Language ) + dbFileName;
else
key = *pExtensionPath + Language + dbFileName; // make unique, don't change language
@@ -498,7 +498,7 @@ helpdatafileproxy::Hdf* Databases::getHelpDataFile( const OUString& Database,
if( aPair.second && ! it->second )
{
- helpdatafileproxy::Hdf* pHdf = 0;
+ helpdatafileproxy::Hdf* pHdf = nullptr;
OUString fileURL;
if( pExtensionPath )
@@ -508,7 +508,7 @@ helpdatafileproxy::Hdf* Databases::getHelpDataFile( const OUString& Database,
OUString fileNameHDFHelp( fileURL );
//Extensions always use the new format
- if( pExtensionPath != NULL )
+ if( pExtensionPath != nullptr )
fileNameHDFHelp += "_";
//SimpleFileAccess takes file URLs as arguments!!! Using filenames works accidentally but
//fails for example when using long path names on Windows (starting with \\?\)
@@ -660,7 +660,7 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,helpdatafileproxy:
listAnchor[i] = anchor[i];
helpdatafileproxy::HDFData aHDFData;
- const sal_Char* pData = NULL;
+ const sal_Char* pData = nullptr;
if( pHdf )
{
@@ -773,7 +773,7 @@ KeywordInfo* Databases::getKeyword( const OUString& Database,
if( aHdf.startIteration() )
{
helpdatafileproxy::Hdf* pHdf = getHelpDataFile( Database,Language );
- if( pHdf != NULL )
+ if( pHdf != nullptr )
{
bool bOptimizeForPerformance = true;
pHdf->releaseHashMap();
@@ -801,7 +801,7 @@ KeywordInfo* Databases::getKeyword( const OUString& Database,
}
aHdf.stopIteration();
- if( pHdf != NULL )
+ if( pHdf != nullptr )
pHdf->releaseHashMap();
}
}
@@ -824,14 +824,14 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar,
{
if( jar.isEmpty() || Language.isEmpty() )
{
- return Reference< XHierarchicalNameAccess >( 0 );
+ return Reference< XHierarchicalNameAccess >( nullptr );
}
OUString key = processLang(Language) + "/" + jar;
osl::MutexGuard aGuard( m_aMutex );
ZipFileTable::iterator it =
- m_aZipFileTable.insert( ZipFileTable::value_type( key,Reference< XHierarchicalNameAccess >(0) ) ).first;
+ m_aZipFileTable.insert( ZipFileTable::value_type( key,Reference< XHierarchicalNameAccess >(nullptr) ) ).first;
if( ! it->second.is() )
{
@@ -959,7 +959,7 @@ Reference< XHierarchicalNameAccess > Databases::findJarFileForPath
void Databases::changeCSS(const OUString& newStyleSheet)
{
m_aCSS = newStyleSheet.toAsciiLowerCase();
- delete[] m_pCustomCSSDoc, m_pCustomCSSDoc = 0,m_nCustomCSSDocLength = 0;
+ delete[] m_pCustomCSSDoc, m_pCustomCSSDoc = nullptr,m_nCustomCSSDocLength = 0;
}
void Databases::cascadingStylesheet( const OUString& Language,
@@ -1089,13 +1089,13 @@ void Databases::setActiveText( const OUString& Module,
helpdatafileproxy::HDFData aHDFData;
int nSize = 0;
- const sal_Char* pData = NULL;
+ const sal_Char* pData = nullptr;
bool bSuccess = false;
if( !bFoundAsEmpty )
{
- helpdatafileproxy::Hdf* pHdf = 0;
- while( !bSuccess && (pHdf = aDbIt.nextHdf()) != NULL )
+ helpdatafileproxy::Hdf* pHdf = nullptr;
+ while( !bSuccess && (pHdf = aDbIt.nextHdf()) != nullptr )
{
bSuccess = pHdf->getValueForKey( id, aHDFData );
nSize = aHDFData.getSize();
@@ -1407,7 +1407,7 @@ void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< OUS
helpdatafileproxy::Hdf* DataBaseIterator::nextHdf( OUString* o_pExtensionPath, OUString* o_pExtensionRegistryPath )
{
- helpdatafileproxy::Hdf* pRetHdf = NULL;
+ helpdatafileproxy::Hdf* pRetHdf = nullptr;
while( !pRetHdf && m_eState != END_REACHED )
{
@@ -1474,10 +1474,10 @@ helpdatafileproxy::Hdf* DataBaseIterator::implGetHdfFromPackage( Reference< depl
}
catch ( deployment::ExtensionRemovedException&)
{
- return NULL;
+ return nullptr;
}
- helpdatafileproxy::Hdf* pRetHdf = NULL;
+ helpdatafileproxy::Hdf* pRetHdf = nullptr;
if (optRegData.IsPresent && !optRegData.Value.isEmpty())
{
OUString aRegDataUrl = optRegData.Value + "/";
@@ -1691,14 +1691,14 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage
catch ( Exception & )
{}
- if( xNA.is() && o_pExtensionPath != NULL )
+ if( xNA.is() && o_pExtensionPath != nullptr )
{
// Extract path including language from file name
sal_Int32 nLastSlash = zipFile.lastIndexOf( '/' );
if( nLastSlash != -1 )
*o_pExtensionPath = zipFile.copy( 0, nLastSlash );
- if( o_pExtensionRegistryPath != NULL )
+ if( o_pExtensionRegistryPath != nullptr )
{
OUString& rPath = *o_pExtensionPath;
sal_Int32 nLastSlashInPath = rPath.lastIndexOf( '/', rPath.getLength() - 1 );
@@ -1826,7 +1826,7 @@ OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemporary
if( !bIsWriteAccess )
{
OUString aTempFileURL;
- ::osl::FileBase::RC eErr = ::osl::File::createTempFile( 0, 0, &aTempFileURL );
+ ::osl::FileBase::RC eErr = ::osl::File::createTempFile( nullptr, nullptr, &aTempFileURL );
if( eErr == ::osl::FileBase::E_None )
{
OUString aTempDirURL = aTempFileURL;
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 9b331cc96af2..527f08666560 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -162,7 +162,7 @@ namespace chelp {
helpdatafileproxy::Hdf* getHelpDataFile( const OUString& Module,
const OUString& Language, bool helpText = false,
- const OUString* pExtensionPath = NULL );
+ const OUString* pExtensionPath = nullptr );
/**
* The following method returns the Collator for the given language-country combination
@@ -208,8 +208,8 @@ namespace chelp {
com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess >
findJarFileForPath( const OUString& jar, const OUString& Language,
- const OUString& path, OUString* o_pExtensionPath = NULL,
- OUString* o_pExtensionRegistryPath = NULL );
+ const OUString& path, OUString* o_pExtensionPath = nullptr,
+ OUString* o_pExtensionRegistryPath = nullptr );
/**
* Maps a given language-locale combination to language.
@@ -395,7 +395,7 @@ namespace chelp {
, m_bHelpText( bHelpText )
{}
- helpdatafileproxy::Hdf* nextHdf( OUString* o_pExtensionPath = NULL, OUString* o_pExtensionRegistryPath = NULL );
+ helpdatafileproxy::Hdf* nextHdf( OUString* o_pExtensionPath = nullptr, OUString* o_pExtensionRegistryPath = nullptr );
private:
helpdatafileproxy::Hdf* implGetHdfFromPackage(
@@ -432,12 +432,12 @@ namespace chelp {
com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess >
nextJarFile( com::sun::star::uno::Reference< com::sun::star::deployment::XPackage >& o_xParentPackageBundle,
- OUString* o_pExtensionPath = NULL, OUString* o_pExtensionRegistryPath = NULL );
+ OUString* o_pExtensionPath = nullptr, OUString* o_pExtensionRegistryPath = nullptr );
private:
com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess >
implGetJarFromPackage(com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > xPackage,
- OUString* o_pExtensionPath = NULL, OUString* o_pExtensionRegistryPath = NULL );
+ OUString* o_pExtensionPath = nullptr, OUString* o_pExtensionRegistryPath = nullptr );
}; // end class JarFileIterator
diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx b/xmlhelp/source/cxxhelp/provider/db.cxx
index 93b0c65614a2..c978b6e432b8 100644
--- a/xmlhelp/source/cxxhelp/provider/db.cxx
+++ b/xmlhelp/source/cxxhelp/provider/db.cxx
@@ -67,13 +67,13 @@ void Hdf::createHashMap( bool bOptimizeForPerformance )
releaseHashMap();
if( bOptimizeForPerformance )
{
- if( m_pStringToDataMap != NULL )
+ if( m_pStringToDataMap != nullptr )
return;
m_pStringToDataMap = new StringToDataMap();
}
else
{
- if( m_pStringToValPosMap != NULL )
+ if( m_pStringToValPosMap != nullptr )
return;
m_pStringToValPosMap = new StringToValPosMap();
}
@@ -124,15 +124,15 @@ void Hdf::createHashMap( bool bOptimizeForPerformance )
void Hdf::releaseHashMap()
{
- if( m_pStringToDataMap != NULL )
+ if( m_pStringToDataMap != nullptr )
{
delete m_pStringToDataMap;
- m_pStringToDataMap = NULL;
+ m_pStringToDataMap = nullptr;
}
- if( m_pStringToValPosMap != NULL )
+ if( m_pStringToValPosMap != nullptr )
{
delete m_pStringToValPosMap;
- m_pStringToValPosMap = NULL;
+ m_pStringToValPosMap = nullptr;
}
}
@@ -146,13 +146,13 @@ bool Hdf::getValueForKey( const OString& rKey, HDFData& rValue )
try
{
- if( m_pStringToDataMap == NULL && m_pStringToValPosMap == NULL )
+ if( m_pStringToDataMap == nullptr && m_pStringToValPosMap == nullptr )
{
bool bOptimizeForPerformance = false;
createHashMap( bOptimizeForPerformance );
}
- if( m_pStringToValPosMap != NULL )
+ if( m_pStringToValPosMap != nullptr )
{
StringToValPosMap::const_iterator it = m_pStringToValPosMap->find( rKey );
if( it != m_pStringToValPosMap->end() )
@@ -183,7 +183,7 @@ bool Hdf::getValueForKey( const OString& rKey, HDFData& rValue )
}
}
- else if( m_pStringToDataMap != NULL )
+ else if( m_pStringToDataMap != nullptr )
{
StringToDataMap::const_iterator it = m_pStringToDataMap->find( rKey );
if( it != m_pStringToDataMap->end() )
@@ -249,7 +249,7 @@ bool Hdf::getNextKeyAndValue( HDFData& rKey, HDFData& rValue )
void Hdf::stopIteration()
{
m_aItData = Sequence<sal_Int8>();
- m_pItData = NULL;
+ m_pItData = nullptr;
m_nItRead = -1;
m_iItPos = -1;
}
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index 868f70ace854..2bcb79b1c0b6 100644
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -39,7 +39,7 @@ namespace helpdatafileproxy {
public:
HDFData()
: m_nSize( 0 )
- , m_pBuffer( NULL )
+ , m_pBuffer( nullptr )
{}
~HDFData()
{ delete [] m_pBuffer; }
@@ -76,10 +76,10 @@ namespace helpdatafileproxy {
Hdf( const OUString& rFileURL,
com::sun::star::uno::Reference< com::sun::star::ucb::XSimpleFileAccess3 > xSFA )
: m_aFileURL( rFileURL )
- , m_pStringToDataMap( NULL )
- , m_pStringToValPosMap( NULL )
+ , m_pStringToDataMap( nullptr )
+ , m_pStringToValPosMap( nullptr )
, m_xSFA( xSFA )
- , m_pItData( NULL )
+ , m_pItData( nullptr )
, m_nItRead( -1 )
, m_iItPos( -1 )
{
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx
index 5b16fe055032..2df4bb58b05c 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.cxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.cxx
@@ -49,7 +49,7 @@ ContentProvider::ContentProvider( const uno::Reference< uno::XComponentContext >
: ::ucbhelper::ContentProviderImplHelper( rxContext )
, isInitialized( false )
, m_aScheme(MYUCP_URL_SCHEME)
- , m_pDatabases( 0 )
+ , m_pDatabases( nullptr )
{
}
@@ -97,7 +97,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL ContentProvider::getImplementationId()
css::uno::Sequence< css::uno::Type > SAL_CALL ContentProvider::getTypes()
throw( css::uno::RuntimeException, std::exception )
{
- static cppu::OTypeCollection* pCollection = NULL;
+ static cppu::OTypeCollection* pCollection = nullptr;
if ( !pCollection )
{
osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
index d7fa6883b73b..773236bd0166 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
@@ -44,9 +44,9 @@ ResultSetBase::ResultSetBase( const uno::Reference< uno::XComponentContext >& r
m_bRowCountFinal( true ),
m_sProperty( seq ),
m_sSortingInfo( seqSort ),
- m_pDisposeEventListeners( 0 ),
- m_pRowCountListeners( 0 ),
- m_pIsFinalListeners( 0 )
+ m_pDisposeEventListeners( nullptr ),
+ m_pRowCountListeners( nullptr ),
+ m_pIsFinalListeners( nullptr )
{
}
@@ -366,7 +366,7 @@ ResultSetBase::getStatement(
throw( sdbc::SQLException,
uno::RuntimeException, std::exception )
{
- uno::Reference< uno::XInterface > test( 0 );
+ uno::Reference< uno::XInterface > test( nullptr );
return test;
}
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index 78c72eb0095a..92c94e09b8cd 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -342,7 +342,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
if( content.is() )
{
uno::Reference< XCommandProcessor > cmd( content,uno::UNO_QUERY );
- cmd->execute( aCommand,0,uno::Reference< XCommandEnvironment >( 0 ) ) >>= m_aItems[m_nRow]; //TODO: check return value of operator >>=
+ cmd->execute( aCommand,0,uno::Reference< XCommandEnvironment >( nullptr ) ) >>= m_aItems[m_nRow]; //TODO: check return value of operator >>=
}
}
m_nRow = 0xffffffff;
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
index 46645b64a146..614e4b5f1c7d 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
@@ -65,7 +65,7 @@ ResultSetForRoot::ResultSetForRoot( const uno::Reference< uno::XComponentContext
if( content.is() )
{
uno::Reference< XCommandProcessor > cmd( content,uno::UNO_QUERY );
- cmd->execute( aCommand,0,uno::Reference< XCommandEnvironment >( 0 ) ) >>= m_aItems[i]; //TODO: check return value of operator >>=
+ cmd->execute( aCommand,0,uno::Reference< XCommandEnvironment >( nullptr ) ) >>= m_aItems[i]; //TODO: check return value of operator >>=
}
m_nRow = 0xffffffff;
}
diff --git a/xmlhelp/source/cxxhelp/provider/services.cxx b/xmlhelp/source/cxxhelp/provider/services.cxx
index 204fbd7835cd..3f7e0e6b9224 100644
--- a/xmlhelp/source/cxxhelp/provider/services.cxx
+++ b/xmlhelp/source/cxxhelp/provider/services.cxx
@@ -31,7 +31,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpchelp_component_getFactory(
void * pServiceManager,
SAL_UNUSED_PARAMETER void * /*pRegistryKey*/ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
uno::Reference< lang::XMultiServiceFactory > xSMgr(
static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index a716d12f6500..ff4c9e21c006 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -277,7 +277,7 @@ void URLParameter::readHelpDataFile()
DataBaseIterator aDbIt( *m_pDatabases, aModule, aLanguage, false );
bool bSuccess = false;
- const sal_Char* pData = NULL;
+ const sal_Char* pData = nullptr;
helpdatafileproxy::HDFData aHDFData;
OUString aExtensionPath;
@@ -607,27 +607,27 @@ struct UserData {
URLParameter* m_pInitial;
};
-UserData *ugblData = 0;
+UserData *ugblData = nullptr;
extern "C" {
static int
fileMatch(const char * URI) {
- if ((URI != NULL) && !strncmp(URI, "file:/", 6))
+ if ((URI != nullptr) && !strncmp(URI, "file:/", 6))
return 1;
return 0;
}
static int
zipMatch(const char * URI) {
- if ((URI != NULL) && !strncmp(URI, "vnd.sun.star.zip:/", 18))
+ if ((URI != nullptr) && !strncmp(URI, "vnd.sun.star.zip:/", 18))
return 1;
return 0;
}
static int
helpMatch(const char * URI) {
- if ((URI != NULL) && !strncmp(URI, "vnd.sun.star.help:/", 19))
+ if ((URI != nullptr) && !strncmp(URI, "vnd.sun.star.help:/", 19))
return 1;
return 0;
}
@@ -675,7 +675,7 @@ zipOpen(SAL_UNUSED_PARAMETER const char *) {
{
return new Reference<XInputStream>(xInputStream);
}
- return 0;
+ return nullptr;
}
static void *
@@ -710,7 +710,7 @@ helpOpen(const char * URI) {
if( xInputStream.is() )
return new Reference<XInputStream>(xInputStream);
- return 0;
+ return nullptr;
}
static int
@@ -900,7 +900,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
for( int i = 0; i < last; ++i )
parameter[i] = parString[i].getStr();
- parameter[last] = 0;
+ parameter[last] = nullptr;
OUString xslURL = pDatabases->getInstallPathAsURL();
@@ -925,7 +925,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
xmlDocPtr res = xsltApplyStylesheet(cur, doc, parameter);
if (res)
{
- xmlChar *doc_txt_ptr=0;
+ xmlChar *doc_txt_ptr=nullptr;
int doc_txt_len;
xsltSaveResultToString(&doc_txt_ptr, &doc_txt_len, res, cur);
addToBuffer(reinterpret_cast<char*>(doc_txt_ptr), doc_txt_len);
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 27e2dafab6f6..f26c7f939aec 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -47,7 +47,7 @@ namespace treeview {
public:
- explicit TVDom( TVDom* arent = 0 )
+ explicit TVDom( TVDom* arent = nullptr )
: kind( other ),
parent( arent ),
children( 0 )
@@ -425,7 +425,7 @@ TVChildTarget::TVChildTarget( const Reference< XComponentContext >& xContext )
aFile.read( s,len,ret );
aFile.close();
- XML_Parser parser = XML_ParserCreate( 0 );
+ XML_Parser parser = XML_ParserCreate( nullptr );
XML_SetElementHandler( parser,
start_handler,
end_handler );