summaryrefslogtreecommitdiff
path: root/desktop/source/pkgchk/unopkg
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:13:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:22 +0100
commit72c48b716640c76f0a8fa49341ce3b0099004991 (patch)
tree6aa8da1631e3d18272bd39ab55111885ab339b45 /desktop/source/pkgchk/unopkg
parent89c4edc13f203db1641c63e22774262bbe61f36f (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I8204a300c98b891a842ef2e40b65f0810dd7817a
Diffstat (limited to 'desktop/source/pkgchk/unopkg')
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx6
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx14
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_shared.h2
3 files changed, 11 insertions, 11 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 925ed573bfd0..d3afd077f73e 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -118,7 +118,7 @@ const OptionInfo s_option_infos [] = {
{ RTL_CONSTASCII_STRINGPARAM("bundled"), '\0', false},
{ RTL_CONSTASCII_STRINGPARAM("suppress-license"), 's', false},
- { 0, 0, '\0', false }
+ { nullptr, 0, '\0', false }
};
class DialogClosedListenerImpl :
@@ -341,7 +341,7 @@ extern "C" int unopkg_main()
::rtl::Bootstrap::expandMacros(extensionUnorc);
oslFileError e = osl_removeFile(extensionUnorc.pData);
if (e != osl_File_E_None && e != osl_File_E_NOENT)
- throw Exception("Could not delete " + extensionUnorc, 0);
+ throw Exception("Could not delete " + extensionUnorc, nullptr);
}
xComponentContext = getUNO(
@@ -487,7 +487,7 @@ extern "C" int unopkg_main()
else
throw lang::IllegalArgumentException(
"There is no such extension deployed: " +
- cmdPackages[pos],0,-1);
+ cmdPackages[pos],nullptr,-1);
}
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 5b51a534a72a..81e9e720a599 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -49,7 +49,7 @@ namespace unopkg {
OUString toString( OptionInfo const * info )
{
- assert(info != 0);
+ assert(info != nullptr);
OUStringBuffer buf;
buf.append("--");
buf.appendAscii(info->m_name);
@@ -69,7 +69,7 @@ OptionInfo const * getOptionInfo(
OptionInfo const * list,
OUString const & opt, sal_Unicode copt )
{
- for ( ; list->m_name != 0; ++list )
+ for ( ; list->m_name != nullptr; ++list )
{
OptionInfo const & option_info = *list;
if (!opt.isEmpty())
@@ -92,13 +92,13 @@ OptionInfo const * getOptionInfo(
}
OSL_FAIL( OUStringToOString(
opt, osl_getThreadTextEncoding() ).getStr() );
- return 0;
+ return nullptr;
}
bool isOption( OptionInfo const * option_info, sal_uInt32 * pIndex )
{
- assert(option_info != 0);
+ assert(option_info != nullptr);
if (osl_getCommandArgCount() <= *pIndex)
return false;
@@ -150,7 +150,7 @@ bool readArgument(
{
if (*pIndex < osl_getCommandArgCount())
{
- OSL_ASSERT( pValue != 0 );
+ OSL_ASSERT( pValue != nullptr );
osl_getCommandArg( *pIndex, &pValue->pData );
dp_misc::TRACE(__FILE__ ": argument value: "
+ *pValue + "\n");
@@ -169,7 +169,7 @@ struct ExecutableDir : public rtl::StaticWithInit<
const OUString operator () () {
OUString path;
if (osl_getExecutableFile( &path.pData ) != osl_Process_E_None) {
- throw RuntimeException("cannot locate executable directory!",0);
+ throw RuntimeException("cannot locate executable directory!",nullptr);
}
return path.copy( 0, path.lastIndexOf( '/' ) );
}
@@ -454,7 +454,7 @@ Reference<XComponentContext> getUNO(
}
else
{
- if (! s_lockfile.check( 0 ))
+ if (! s_lockfile.check( nullptr ))
{
OUString sMsg(ResId(RID_STR_CONCURRENTINSTANCE, *DeploymentResMgr::get()));
//Create this string before we call DeInitVCL, because this will kill
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index 5c25fbccade4..e263b6119028 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -74,7 +74,7 @@ inline bool readOption(
bool * flag, OptionInfo const * option_info, sal_uInt32 * pIndex )
{
if (isOption( option_info, pIndex )) {
- OSL_ASSERT( flag != 0 );
+ OSL_ASSERT( flag != NULL );
*flag = true;
return true;
}