summaryrefslogtreecommitdiff
path: root/desktop
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
parent89c4edc13f203db1641c63e22774262bbe61f36f (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I8204a300c98b891a842ef2e40b65f0810dd7817a
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx12
-rw-r--r--desktop/source/app/app.cxx46
-rw-r--r--desktop/source/app/check_ext_deps.cxx2
-rw-r--r--desktop/source/app/cmdlineargs.cxx2
-rw-r--r--desktop/source/app/dispatchwatcher.cxx10
-rw-r--r--desktop/source/app/officeipcthread.cxx12
-rw-r--r--desktop/source/app/officeipcthread.hxx2
-rw-r--r--desktop/source/deployment/dp_persmap.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx14
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx18
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_service.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedata.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx14
-rw-r--r--desktop/source/deployment/inc/dp_misc.h2
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.cxx6
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx4
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx4
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx20
-rw-r--r--desktop/source/deployment/manager/dp_properties.cxx6
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx22
-rw-r--r--desktop/source/deployment/misc/dp_interact.cxx4
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx34
-rw-r--r--desktop/source/deployment/misc/dp_ucb.cxx8
-rw-r--r--desktop/source/deployment/misc/lockfile.cxx6
-rw-r--r--desktop/source/deployment/registry/component/dp_compbackenddb.cxx4
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx24
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx2
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx6
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx6
-rw-r--r--desktop/source/deployment/registry/dp_backenddb.cxx34
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx4
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx2
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx2
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.cxx4
-rw-r--r--desktop/source/deployment/registry/package/dp_extbackenddb.cxx4
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx32
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx10
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.cxx4
-rw-r--r--desktop/source/lib/init.cxx62
-rw-r--r--desktop/source/migration/migration.cxx2
-rw-r--r--desktop/source/migration/migration_impl.hxx2
-rw-r--r--desktop/source/migration/services/cexports.cxx6
-rw-r--r--desktop/source/migration/services/cexportsoo3.cxx4
-rw-r--r--desktop/source/migration/services/jvmfwk.cxx10
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.cxx4
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx4
-rw-r--r--desktop/source/offacc/acceptor.cxx4
-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
-rw-r--r--desktop/source/splash/services_spl.cxx6
-rw-r--r--desktop/source/splash/splash.cxx2
-rw-r--r--desktop/source/splash/unxsplash.cxx4
-rw-r--r--desktop/unx/source/file_image.h2
-rw-r--r--desktop/unx/source/file_image_unx.c12
-rw-r--r--desktop/unx/source/pagein.c6
-rw-r--r--desktop/unx/source/splashx.c4
-rw-r--r--desktop/unx/source/start.c12
63 files changed, 293 insertions, 293 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 17002b7b75eb..f32f4bdd1ce6 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -331,7 +331,7 @@ void DesktopLOKTest::testSaveAs()
LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
- CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "png", 0));
+ CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "png", nullptr));
}
void DesktopLOKTest::testSaveAsCalc()
@@ -339,7 +339,7 @@ void DesktopLOKTest::testSaveAsCalc()
LibLODocument_Impl* pDocument = loadDoc("search.ods");
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
- CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "png", 0));
+ CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "png", nullptr));
}
void DesktopLOKTest::testPasteWriter()
@@ -350,8 +350,8 @@ void DesktopLOKTest::testPasteWriter()
CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, "text/plain;charset=utf-8", aText.getStr(), aText.getLength()));
- pDocument->pClass->postUnoCommand(pDocument, ".uno:SelectAll", 0, false);
- char* pText = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", 0);
+ pDocument->pClass->postUnoCommand(pDocument, ".uno:SelectAll", nullptr, false);
+ char* pText = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", nullptr);
CPPUNIT_ASSERT_EQUAL(OString("hello"), OString(pText));
free(pText);
@@ -467,7 +467,7 @@ void DesktopLOKTest::testCommandResult()
// nothing is triggered when we have no callback yet, we just time out on
// the condition var.
m_aCommandResultCondition.reset();
- pDocument->pClass->postUnoCommand(pDocument, ".uno:Bold", 0, true);
+ pDocument->pClass->postUnoCommand(pDocument, ".uno:Bold", nullptr, true);
m_aCommandResultCondition.wait(aTimeValue);
CPPUNIT_ASSERT(m_aCommandResult.isEmpty());
@@ -476,7 +476,7 @@ void DesktopLOKTest::testCommandResult()
pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this);
m_aCommandResultCondition.reset();
- pDocument->pClass->postUnoCommand(pDocument, ".uno:Bold", 0, true);
+ pDocument->pClass->postUnoCommand(pDocument, ".uno:Bold", nullptr, true);
m_aCommandResultCondition.wait(aTimeValue);
boost::property_tree::ptree aTree;
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index aa1a77676608..3ae2e38ced5d 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -158,12 +158,12 @@ using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::container;
-ResMgr* desktop::Desktop::pResMgr = 0;
+ResMgr* desktop::Desktop::pResMgr = nullptr;
namespace desktop
{
-static oslSignalHandler pSignalHandler = 0;
+static oslSignalHandler pSignalHandler = nullptr;
namespace {
@@ -284,7 +284,7 @@ bool shouldLaunchQuickstart()
bool bQuickstart = Desktop::GetCommandLineArgs().IsQuickstart();
if (!bQuickstart)
{
- const SfxPoolItem* pItem=0;
+ const SfxPoolItem* pItem=nullptr;
SfxItemSet aQLSet(SfxGetpApp()->GetPool(), SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER);
SfxGetpApp()->GetOptions(aQLSet);
SfxItemState eState = aQLSet.GetItemState(SID_ATTR_QUICKLAUNCHER, false, &pItem);
@@ -610,7 +610,7 @@ void Desktop::Init()
// disable IPC thread in an instance that is just showing a help message
OfficeIPCThread::DisableOfficeIPCThread();
}
- pSignalHandler = osl_addSignalHandler(SalMainPipeExchangeSignal_impl, NULL);
+ pSignalHandler = osl_addSignalHandler(SalMainPipeExchangeSignal_impl, nullptr);
}
}
@@ -632,7 +632,7 @@ void Desktop::DeInit()
comphelper::getProcessComponentContext(), UNO_QUERY_THROW )->
dispose();
// nobody should get a destroyed service factory...
- ::comphelper::setProcessServiceFactory( NULL );
+ ::comphelper::setProcessServiceFactory( nullptr );
// clear lockfile
m_xLockfile.reset();
@@ -1191,7 +1191,7 @@ sal_uInt16 Desktop::Exception(sal_uInt16 nError)
SystemWindowFlags nOldMode = Application::GetSystemWindowMode();
Application::SetSystemWindowMode( nOldMode & ~SystemWindowFlags::NOAUTOMODE );
- Application::SetDefDialogParent( NULL );
+ Application::SetDefDialogParent( nullptr );
if ( bInException )
{
@@ -1272,7 +1272,7 @@ struct ExecuteGlobals
{}
};
-static ExecuteGlobals* pExecGlobals = NULL;
+static ExecuteGlobals* pExecGlobals = nullptr;
//This just calls Execute() for all normal uses of LibreOffice, but for
@@ -1663,7 +1663,7 @@ int Desktop::doShutdown()
pExecGlobals->xGlobalBroadcaster->documentEventOccured(aEvent);
}
- delete pResMgr, pResMgr = NULL;
+ delete pResMgr, pResMgr = nullptr;
// Restore old value
const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
if ( rCmdLineArgs.IsHeadless() || rCmdLineArgs.IsEventTesting() )
@@ -1701,11 +1701,11 @@ int Desktop::doShutdown()
}
// be sure that path/language options gets destroyed before
// UCB is deinitialized
- pExecGlobals->pLanguageOptions.reset( 0 );
- pExecGlobals->pPathOptions.reset( 0 );
+ pExecGlobals->pLanguageOptions.reset( nullptr );
+ pExecGlobals->pPathOptions.reset( nullptr );
bool bRR = pExecGlobals->bRestartRequested;
- delete pExecGlobals, pExecGlobals = NULL;
+ delete pExecGlobals, pExecGlobals = nullptr;
if ( bRR )
{
@@ -2169,7 +2169,7 @@ void Desktop::OpenClients()
aHelpURLBuffer.appendAscii("&System=WIN");
#endif
Application::GetHelp()->Start(
- aHelpURLBuffer.makeStringAndClear(), NULL);
+ aHelpURLBuffer.makeStringAndClear(), nullptr);
return;
}
}
@@ -2297,7 +2297,7 @@ void Desktop::OpenClients()
OfficeIPCThread::EnableRequests();
ProcessDocumentsRequest aRequest(rArgs.getCwdUrl());
- aRequest.pcProcessed = NULL;
+ aRequest.pcProcessed = nullptr;
aRequest.aOpenList = rArgs.GetOpenList();
aRequest.aViewList = rArgs.GetViewList();
@@ -2371,7 +2371,7 @@ void Desktop::OpenClients()
if ( bRecovery )
{
- ShowBackingComponent(0);
+ ShowBackingComponent(nullptr);
}
else
{
@@ -2425,7 +2425,7 @@ void Desktop::OpenDefault()
}
ProcessDocumentsRequest aRequest(rArgs.getCwdUrl());
- aRequest.pcProcessed = NULL;
+ aRequest.pcProcessed = nullptr;
aRequest.aOpenList.push_back(aName);
OfficeIPCThread::ExecuteCmdLineRequests( aRequest );
}
@@ -2551,7 +2551,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
std::vector<OUString> const & data(rAppEvent.GetStringsData());
pDocsRequest->aOpenList.insert(
pDocsRequest->aOpenList.end(), data.begin(), data.end());
- pDocsRequest->pcProcessed = NULL;
+ pDocsRequest->pcProcessed = nullptr;
OfficeIPCThread::ExecuteCmdLineRequests( *pDocsRequest );
delete pDocsRequest;
@@ -2560,7 +2560,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
break;
case ApplicationEvent::TYPE_OPENHELPURL:
// start help for a specific URL
- Application::GetHelp()->Start(rAppEvent.GetStringData(), NULL);
+ Application::GetHelp()->Start(rAppEvent.GetStringData(), nullptr);
break;
case ApplicationEvent::TYPE_PRINT:
{
@@ -2572,7 +2572,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
std::vector<OUString> const & data(rAppEvent.GetStringsData());
pDocsRequest->aPrintList.insert(
pDocsRequest->aPrintList.end(), data.begin(), data.end());
- pDocsRequest->pcProcessed = NULL;
+ pDocsRequest->pcProcessed = nullptr;
OfficeIPCThread::ExecuteCmdLineRequests( *pDocsRequest );
delete pDocsRequest;
@@ -2710,7 +2710,7 @@ void Desktop::CloseSplashScreen()
if(m_rSplashScreen.is())
{
m_rSplashScreen->end();
- m_rSplashScreen = NULL;
+ m_rSplashScreen = nullptr;
}
}
@@ -2736,7 +2736,7 @@ void Desktop::ShowBackingComponent(Desktop * progress)
}
Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
Reference< XDesktop2 > xDesktop = css::frame::Desktop::create(xContext);
- if (progress != 0)
+ if (progress != nullptr)
{
progress->SetSplashScreenProgress(60);
}
@@ -2753,7 +2753,7 @@ void Desktop::ShowBackingComponent(Desktop * progress)
vcl::Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
SAL_WARN_IF( !pContainerWindow, "desktop.app", "Desktop::Main: no implementation access to the frame's container window!" );
pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
- if (progress != 0)
+ if (progress != nullptr)
{
progress->SetSplashScreenProgress(75);
}
@@ -2763,12 +2763,12 @@ void Desktop::ShowBackingComponent(Desktop * progress)
// Because the backing component set the property "IsBackingMode" of the frame
// to true inside attachFrame(). But setComponent() reset this state everytimes ...
xBackingFrame->setComponent(Reference< XWindow >(xStartModule, UNO_QUERY), xStartModule);
- if (progress != 0)
+ if (progress != nullptr)
{
progress->SetSplashScreenProgress(100);
}
xStartModule->attachFrame(xBackingFrame);
- if (progress != 0)
+ if (progress != nullptr)
{
progress->CloseSplashScreen();
}
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 520a9c223b0a..ad5d077c6d33 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -146,7 +146,7 @@ void SilentCommandEnv::handle( Reference< task::XInteractionRequest> const & xRe
{
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
deployment::ui::LicenseDialog::create(
- mxContext, VCLUnoHelper::GetInterface( NULL ),
+ mxContext, VCLUnoHelper::GetInterface( nullptr ),
licExc.ExtensionName, licExc.Text ) );
sal_Int16 res = xDialog->execute();
if ( res == ui::dialogs::ExecutableDialogResults::CANCEL )
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 4bbf021af262..aa652341101d 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -84,7 +84,7 @@ public:
virtual boost::optional< OUString > getCwdUrl() override { return m_cwdUrl; }
virtual bool next(OUString * argument) override {
- OSL_ASSERT(argument != NULL);
+ OSL_ASSERT(argument != nullptr);
if (m_index < m_count) {
rtl_getAppCommandArg(m_index++, &argument->pData);
return true;
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index bac549950724..12da0b44eb0f 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -106,7 +106,7 @@ const SfxFilter* impl_lookupExportFilterForUrl( const rtl::OUString& rUrl, const
xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.FilterFactory", xContext ),
UNO_QUERY_THROW );
- const SfxFilter* pBestMatch = 0;
+ const SfxFilter* pBestMatch = nullptr;
const Reference< XEnumeration > xFilterEnum(
xFilterFactory->createSubSetEnumerationByQuery( sQuery.makeStringAndClear() ), UNO_QUERY_THROW );
@@ -156,7 +156,7 @@ try
}
catch ( const Exception& )
{
- return 0;
+ return nullptr;
}
}
@@ -187,7 +187,7 @@ Mutex& DispatchWatcher::GetMutex()
DispatchWatcher* DispatchWatcher::GetDispatchWatcher()
{
static Reference< XInterface > xDispatchWatcher;
- static DispatchWatcher* pDispatchWatcher = NULL;
+ static DispatchWatcher* pDispatchWatcher = nullptr;
if ( !xDispatchWatcher.is() )
{
@@ -271,7 +271,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ
else
{
Reference < XInteractionHandler2 > xInteraction(
- InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), 0) );
+ InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), nullptr) );
aArgs[1].Name = "InteractionHandler";
aArgs[1].Value <<= xInteraction;
@@ -522,7 +522,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ
OUString fileForCat;
if( aDispatchRequest.aRequestType == REQUEST_CAT )
{
- if( ::osl::FileBase::createTempFile(0, 0, &fileForCat) != ::osl::FileBase::E_None )
+ if( ::osl::FileBase::createTempFile(nullptr, nullptr, &fileForCat) != ::osl::FileBase::E_None )
std::cerr << "Error: Cannot create temporary file..." << std::endl ;
aOutFile = fileForCat;
}
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 103355af0de0..1ead4e26f50a 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -151,7 +151,7 @@ public:
private:
bool next(OUString * argument, bool prefix) {
- OSL_ASSERT(argument != NULL);
+ OSL_ASSERT(argument != nullptr);
if (m_index < m_input.getLength()) {
if (prefix) {
if (m_input[m_index] != ',') {
@@ -306,12 +306,12 @@ IMPL_STATIC_LINK_TYPED( ProcessEventsClass_Impl, ProcessDocumentsEvent, void*, p
void ImplPostForeignAppEvent( ApplicationEvent* pEvent )
{
- Application::PostUserEvent( LINK( NULL, ProcessEventsClass_Impl, CallEvent ), pEvent );
+ Application::PostUserEvent( LINK( nullptr, ProcessEventsClass_Impl, CallEvent ), pEvent );
}
void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent )
{
- Application::PostUserEvent( LINK( NULL, ProcessEventsClass_Impl, ProcessDocumentsEvent ), pEvent );
+ Application::PostUserEvent( LINK( nullptr, ProcessEventsClass_Impl, ProcessDocumentsEvent ), pEvent );
}
oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo)
@@ -658,7 +658,7 @@ OfficeIPCThread::OfficeIPCThread() :
mbDowning( false ),
mbRequestsEnabled( false ),
mnPendingRequests( 0 ),
- mpDispatchWatcher( 0 )
+ mpDispatchWatcher( nullptr )
{
}
@@ -941,7 +941,7 @@ void OfficeIPCThread::execute()
{
// delete not used request again
delete pRequest;
- pRequest = NULL;
+ pRequest = nullptr;
}
if (aArguments.equalsL(RTL_CONSTASCII_STRINGPARAM("-tofront")) ||
aCmdLineArgs->IsEmpty())
@@ -1097,7 +1097,7 @@ bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest
bShutdown = pGlobalOfficeIPCThread->mpDispatchWatcher->executeDispatchRequests( aTempList, s_bInEnableRequests );
// set processed flag
- if (aRequest.pcProcessed != NULL)
+ if (aRequest.pcProcessed != nullptr)
aRequest.pcProcessed->set();
}
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx
index 10d2c374db12..401480353c1d 100644
--- a/desktop/source/app/officeipcthread.hxx
+++ b/desktop/source/app/officeipcthread.hxx
@@ -46,7 +46,7 @@ oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSign
struct ProcessDocumentsRequest
{
explicit ProcessDocumentsRequest(boost::optional< OUString > const & cwdUrl):
- aCwdUrl(cwdUrl), pcProcessed( NULL ), bTextCat( false ) {}
+ aCwdUrl(cwdUrl), pcProcessed( nullptr ), bTextCat( false ) {}
boost::optional< OUString > aCwdUrl;
OUString aModule;
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index 3771b6d89601..94a48c3ca0d1 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -259,7 +259,7 @@ void PersistentMap::flush()
bool PersistentMap::has( OString const & key ) const
{
- return get( NULL, key );
+ return get( nullptr, key );
}
bool PersistentMap::get( OString * value, OString const & key ) const
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 646a072900cb..5c2e7f323c65 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -93,7 +93,7 @@ struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles >
const OUString operator () () {
const SolarMutexGuard guard;
::std::unique_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) );
- OSL_ASSERT( resmgr.get() != 0 );
+ OSL_ASSERT( resmgr.get() != nullptr );
return ResId(STR_FILTERNAME_ALL, *resmgr.get()).toString();
}
};
@@ -153,10 +153,10 @@ public:
ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl(vcl::Window* pParent)
: ExtensionBox_Impl(pParent)
, m_bInterfaceLocked(false)
- , m_pOptionsBtn(NULL)
- , m_pEnableBtn(NULL)
- , m_pRemoveBtn(NULL)
- , m_pParent(NULL)
+ , m_pOptionsBtn(nullptr)
+ , m_pEnableBtn(nullptr)
+ , m_pRemoveBtn(nullptr)
+ , m_pParent(nullptr)
{
}
@@ -316,7 +316,7 @@ bool ExtBoxWithBtns_Impl::HandleTabKey( bool bReverse )
if ( nIndex == svt::IExtensionListBox::ENTRY_NOTFOUND )
return false;
- PushButton *pNext = NULL;
+ PushButton *pNext = nullptr;
if ( m_pOptionsBtn->HasFocus() ) {
if ( !bReverse && !GetEntryData( nIndex )->m_bLocked )
@@ -538,7 +538,7 @@ IMPL_LINK_NOARG_TYPED(ExtBoxWithBtns_Impl, HandleRemoveBtn, Button*, void)
DialogHelper::DialogHelper( const uno::Reference< uno::XComponentContext > &xContext,
Dialog *pWindow ) :
m_pVCLWindow( pWindow ),
- m_nEventID( 0 ),
+ m_nEventID( nullptr ),
m_bIsBusy( false )
{
m_xContext = xContext;
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index f5bf065b3a1a..e095a34845c3 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -69,7 +69,7 @@ public:
void openWebBrowser( const OUString & sURL, const OUString & sTitle ) const;
Dialog* getWindow() const { return m_pVCLWindow; };
void PostUserEvent( const Link<void*,void>& rLink, void* pCaller, bool bReferenceLink = false );
- void clearEventID() { m_nEventID = 0; }
+ void clearEventID() { m_nEventID = nullptr; }
virtual void showProgress( bool bStart ) = 0;
virtual void updateProgress( const OUString &rText,
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 853ab217bea1..63bb21b7c018 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -152,12 +152,12 @@ public:
, m_nCurrentProgress(0)
{}
- Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : NULL; }
+ Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : nullptr; }
void startProgress();
void stopProgress();
void progressSection( const OUString &rText,
- const uno::Reference< task::XAbortChannel > &xAbortChannel = 0 );
+ const uno::Reference< task::XAbortChannel > &xAbortChannel = nullptr );
inline bool isAborted() const { return m_bAborted; }
inline void setWarnUser( bool bNewVal ) { m_bWarnUser = bNewVal; }
@@ -406,7 +406,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
}
{
SolarMutexGuard guard;
- short n = ScopedVclPtrInstance<DependencyDialog>::Create( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, deps )->Execute();
+ short n = ScopedVclPtrInstance<DependencyDialog>::Create( m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, deps )->Execute();
// Distinguish between closing the dialog and programatically
// canceling the dialog (headless VCL):
approve = n == RET_OK
@@ -417,7 +417,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
{
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
deployment::ui::LicenseDialog::create(
- m_xContext, VCLUnoHelper::GetInterface( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL ),
+ m_xContext, VCLUnoHelper::GetInterface( m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr ),
licExc.ExtensionName, licExc.Text ) );
sal_Int16 res = xDialog->execute();
if ( res == ui::dialogs::ExecutableDialogResults::CANCEL )
@@ -450,7 +450,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
verExc.Deployed->getDisplayName());
{
SolarMutexGuard guard;
- ScopedVclPtrInstance<MessageDialog> box(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL,
+ ScopedVclPtrInstance<MessageDialog> box(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr,
ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
OUString s;
if (bEqualNames)
@@ -515,7 +515,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
// forward to UUI handler:
if (! m_xHandler.is()) {
// late init:
- m_xHandler = task::InteractionHandler::createWithParentAndContext(m_xContext, NULL, m_sTitle);
+ m_xHandler = task::InteractionHandler::createWithParentAndContext(m_xContext, nullptr, m_sTitle);
}
m_xHandler->handle( xRequest );
}
@@ -948,7 +948,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates(
short nDialogResult = RET_OK;
if ( !dataDownload.empty() )
{
- nDialogResult = ScopedVclPtrInstance<UpdateInstallDialog>::Create( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, dataDownload, m_xContext )->Execute();
+ nDialogResult = ScopedVclPtrInstance<UpdateInstallDialog>::Create( m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, dataDownload, m_xContext )->Execute();
pUpdateDialog->notifyMenubar( false, true ); // Check, if there are still pending updates to be notified via menu bar icon
}
else
@@ -1098,7 +1098,7 @@ void ExtensionCmdQueue::acceptLicense( const uno::Reference< deployment::XPackag
void ExtensionCmdQueue::syncRepositories( const uno::Reference< uno::XComponentContext > &xContext )
{
- dp_misc::syncRepositories( false, new ProgressCmdEnv( xContext, NULL, "Extension Manager" ) );
+ dp_misc::syncRepositories( false, new ProgressCmdEnv( xContext, nullptr, "Extension Manager" ) );
}
void ExtensionCmdQueue::stop()
@@ -1114,7 +1114,7 @@ bool ExtensionCmdQueue::isBusy()
void handleInteractionRequest( const uno::Reference< uno::XComponentContext > & xContext,
const uno::Reference< task::XInteractionRequest > & xRequest )
{
- ::rtl::Reference< ProgressCmdEnv > xCmdEnv( new ProgressCmdEnv( xContext, NULL, "Extension Manager" ) );
+ ::rtl::Reference< ProgressCmdEnv > xCmdEnv( new ProgressCmdEnv( xContext, nullptr, "Extension Manager" ) );
xCmdEnv->handle( xRequest );
}
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 025b59ade6e1..a76eceb5e01d 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -76,7 +76,7 @@ Entry_Impl::Entry_Impl( const uno::Reference< deployment::XPackage > &xPackage,
m_bHasButtons( false ),
m_bMissingLic( false ),
m_eState( eState ),
- m_pPublisher( NULL ),
+ m_pPublisher( nullptr ),
m_xPackage( xPackage )
{
try
@@ -193,8 +193,8 @@ ExtensionBox_Impl::ExtensionBox_Impl(vcl::Window* pParent) :
m_aLockedImage( DialogHelper::getResId( RID_IMG_LOCKED ) ),
m_aWarningImage( DialogHelper::getResId( RID_IMG_WARNING ) ),
m_aDefaultImage( DialogHelper::getResId( RID_IMG_EXTENSION ) ),
- m_pScrollBar( NULL ),
- m_pManager( NULL )
+ m_pScrollBar( nullptr ),
+ m_pManager( nullptr )
{
Init();
}
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index 9dbfebe5dfae..e60e0017def1 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -83,7 +83,7 @@ void MyApp::DeInit()
dp_misc::disposeBridges(context);
css::uno::Reference< css::lang::XComponent >(
context, css::uno::UNO_QUERY_THROW)->dispose();
- comphelper::setProcessServiceFactory(0);
+ comphelper::setProcessServiceFactory(nullptr);
}
namespace
@@ -215,7 +215,7 @@ void ServiceImpl::startExecuteModal(
//ToDo: synchronize access to s_dialog !!!
if (! dp_gui::TheExtensionManager::s_ExtMgr.is())
{
- const bool bAppUp = (GetpApp() != 0);
+ const bool bAppUp = (GetpApp() != nullptr);
bool bOfficePipePresent;
try {
bOfficePipePresent = dp_misc::office_is_running();
@@ -279,7 +279,7 @@ void ServiceImpl::startExecuteModal(
}
}
- if (app.get() != 0) {
+ if (app.get() != nullptr) {
Application::Execute();
DeInitVCL();
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index c02725d277cd..99bbeaed6b04 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -53,9 +53,9 @@ TheExtensionManager::TheExtensionManager( const uno::Reference< awt::XWindow > &
const uno::Reference< uno::XComponentContext > &xContext ) :
m_xContext( xContext ),
m_xParent( xParent ),
- m_pExtMgrDialog( NULL ),
- m_pUpdReqDialog( NULL ),
- m_pExecuteCmdQueue( NULL )
+ m_pExtMgrDialog( nullptr ),
+ m_pUpdReqDialog( nullptr ),
+ m_pExecuteCmdQueue( nullptr )
{
m_xExtensionManager = deployment::ExtensionManager::get( xContext );
m_xExtensionManager->addModifyListener( this );
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
index e709b51a7609..c68987f74663 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -107,7 +107,7 @@ public:
static ::rtl::Reference<TheExtensionManager> get(
css::uno::Reference< css::uno::XComponentContext> const & xContext,
- css::uno::Reference< css::awt::XWindow> const & xParent = 0,
+ css::uno::Reference< css::awt::XWindow> const & xParent = nullptr,
OUString const & view = OUString() );
// XEventListener
diff --git a/desktop/source/deployment/gui/dp_gui_updatedata.hxx b/desktop/source/deployment/gui/dp_gui_updatedata.hxx
index 3b75b8058c5c..f49019234037 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedata.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedata.hxx
@@ -36,7 +36,7 @@ namespace dp_gui {
struct UpdateData
{
explicit UpdateData( css::uno::Reference< css::deployment::XPackage > const & aExt):
- bIsShared(false), aInstalledPackage(aExt), aUpdateSource(NULL), m_nID(0), m_bIgnored(false){};
+ bIsShared(false), aInstalledPackage(aExt), aUpdateSource(nullptr), m_nID(0), m_bIgnored(false){};
//When entries added to the listbox then there can be one for the user update and one
//for the shared update. However, both list entries will contain the same UpdateData.
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 3cc0935f1114..eded3b3920cb 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -256,7 +256,7 @@ UpdateDialog::Thread::Thread(
if( m_context.is() )
{
m_xInteractionHdl.set(
- task::InteractionHandler::createWithParent(m_context, 0),
+ task::InteractionHandler::createWithParent(m_context, nullptr),
uno::UNO_QUERY );
m_updateInformation->setInteractionHandler( m_xInteractionHdl );
}
@@ -535,7 +535,7 @@ UpdateDialog::UpdateDialog(
get(m_pOk, "INSTALL");
get(m_pClose, "gtk-close");
get(m_pHelp, "gtk-help");
- OSL_ASSERT(updateData != NULL);
+ OSL_ASSERT(updateData != nullptr);
m_xExtensionManager = deployment::ExtensionManager::get( context );
@@ -1155,7 +1155,7 @@ IMPL_LINK_NOARG_TYPED(UpdateDialog, selectionHandler, SvTreeListBox*, void)
m_pUpdates->GetSelectEntryData());
clearDescription();
- if ( p != NULL )
+ if ( p != nullptr )
{
sal_uInt16 pos = p->m_nIndex;
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index dfd848e4c2b0..5b97ad98f1f9 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -336,13 +336,13 @@ void UpdateInstallDialog::Thread::downloadExtensions()
//create the download directory in the temp folder
OUString sTempDir;
if (::osl::FileBase::getTempDirURL(sTempDir) != ::osl::FileBase::E_None)
- throw cssu::Exception("Could not get URL for the temp directory. No extensions will be installed.", 0);
+ throw cssu::Exception("Could not get URL for the temp directory. No extensions will be installed.", nullptr);
//create a unique name for the directory
OUString tempEntry, destFolder;
- if (::osl::File::createTempFile(&sTempDir, 0, &tempEntry ) != ::osl::File::E_None)
+ if (::osl::File::createTempFile(&sTempDir, nullptr, &tempEntry ) != ::osl::File::E_None)
throw cssu::Exception("Could not create a temporary file in " + sTempDir +
- ". No extensions will be installed", 0 );
+ ". No extensions will be installed", nullptr );
tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 );
@@ -351,10 +351,10 @@ void UpdateInstallDialog::Thread::downloadExtensions()
m_sDownloadFolder = destFolder;
try
{
- dp_misc::create_folder(0, destFolder, m_updateCmdEnv.get() );
+ dp_misc::create_folder(nullptr, destFolder, m_updateCmdEnv.get() );
} catch (const cssu::Exception & e)
{
- throw cssu::Exception(e.Message + " No extensions will be installed.", 0);
+ throw cssu::Exception(e.Message + " No extensions will be installed.", nullptr);
}
@@ -591,10 +591,10 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update
OUString destFolder, tempEntry;
if (::osl::File::createTempFile(
&m_sDownloadFolder,
- 0, &tempEntry ) != ::osl::File::E_None)
+ nullptr, &tempEntry ) != ::osl::File::E_None)
{
//ToDo feedback in window that download of this component failed
- throw cssu::Exception("Could not create temporary file in folder " + destFolder + ".", 0);
+ throw cssu::Exception("Could not create temporary file in folder " + destFolder + ".", nullptr);
}
tempEntry = tempEntry.copy( tempEntry.lastIndexOf( '/' ) + 1 );
diff --git a/desktop/source/deployment/inc/dp_misc.h b/desktop/source/deployment/inc/dp_misc.h
index e2d2412c95fb..59956e2bd98c 100644
--- a/desktop/source/deployment/inc/dp_misc.h
+++ b/desktop/source/deployment/inc/dp_misc.h
@@ -97,7 +97,7 @@ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
css::uno::Reference< css::uno::XInterface> resolveUnoURL(
OUString const & connectString,
css::uno::Reference< css::uno::XComponentContext> const & xLocalContext,
- AbortChannel * abortChannel = 0 );
+ AbortChannel * abortChannel = NULL );
DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool office_is_running();
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index 83db37919f6f..6e227cbc3d92 100644
--- a/desktop/source/deployment/manager/dp_activepackages.cxx
+++ b/desktop/source/deployment/manager/dp_activepackages.cxx
@@ -130,7 +130,7 @@ ActivePackages::~ActivePackages() {}
bool ActivePackages::has(
OUString const & id, OUString const & fileName) const
{
- return get(NULL, id, fileName);
+ return get(nullptr, id, fileName);
}
bool ActivePackages::get(
@@ -140,12 +140,12 @@ bool ActivePackages::get(
#if HAVE_FEATURE_EXTENSIONS
OString v;
if (m_map.get(&v, newKey(id))) {
- if (data != NULL) {
+ if (data != nullptr) {
*data = decodeNewData(v);
}
return true;
} else if (m_map.get(&v, oldKey(fileName))) {
- if (data != NULL) {
+ if (data != nullptr) {
*data = decodeOldData(fileName, v);
}
return true;
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 8913224efbfe..58aadbb0900d 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -118,7 +118,7 @@ void writeLastModified(OUString & url, Reference<ucb::XCommandEnvironment> const
catch(...)
{
uno::Any exc(::cppu::getCaughtException());
- throw css::deployment::DeploymentException("Failed to update" + url, 0, exc);
+ throw css::deployment::DeploymentException("Failed to update" + url, nullptr, exc);
}
}
@@ -1493,7 +1493,7 @@ void ExtensionManager::fireModified()
{
::cppu::OInterfaceContainerHelper * pContainer = rBHelper.getContainer(
cppu::UnoType<util::XModifyListener>::get() );
- if (pContainer != 0) {
+ if (pContainer != nullptr) {
pContainer->forEach<util::XModifyListener>(
boost::bind(&util::XModifyListener::modified, _1,
lang::EventObject(static_cast<OWeakObject *>(this))) );
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 0805eea3b665..7bbc04857215 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -153,7 +153,7 @@ PackageInformationProvider::getPackageLocation( const OUString& _sExtensionId )
{
try
{
- ::ucbhelper::Content aContent( aLocationURL, NULL, mxContext );
+ ::ucbhelper::Content aContent( aLocationURL, nullptr, mxContext );
aLocationURL = aContent.getURL();
}
catch (const css::ucb::ContentCreationException& e)
@@ -203,7 +203,7 @@ PackageInformationProvider::isUpdateAvailable( const OUString& _sExtensionId )
else
{
updateInfoMap = dp_misc::getOnlineUpdateInfos(
- mxContext, extMgr, mxUpdateInformation, NULL, errors);
+ mxContext, extMgr, mxUpdateInformation, nullptr, errors);
}
int nCount = 0;
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index cfb62ec0067b..0c87238bc669 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -160,7 +160,7 @@ void PackageManagerImpl::initActivationLayer(
m_activePackages_expanded = expandUnoRcUrl( m_activePackages );
m_registrationData_expanded = expandUnoRcUrl(m_registrationData);
if (!m_readOnly)
- create_folder( 0, m_activePackages_expanded, xCmdEnv);
+ create_folder( nullptr, m_activePackages_expanded, xCmdEnv);
OUString dbName;
if (m_context == "user")
@@ -168,7 +168,7 @@ void PackageManagerImpl::initActivationLayer(
else
{
// Create the extension data base in the user installation
- create_folder( 0, m_registrationData_expanded, xCmdEnv);
+ create_folder( nullptr, m_registrationData_expanded, xCmdEnv);
dbName = m_registrationData_expanded + "/extensions.pmap";
}
// The data base can always be written because it is always in the user installation
@@ -273,7 +273,7 @@ void PackageManagerImpl::initActivationLayer(
void PackageManagerImpl::initRegistryBackends()
{
if (!m_registryCache.isEmpty())
- create_folder( 0, m_registryCache,
+ create_folder( nullptr, m_registryCache,
Reference<XCommandEnvironment>(), false);
m_xRegistry.set( ::dp_registry::create(
m_context, m_registryCache, false,
@@ -429,7 +429,7 @@ void PackageManagerImpl::fireModified()
{
::cppu::OInterfaceContainerHelper * pContainer = rBHelper.getContainer(
cppu::UnoType<util::XModifyListener>::get() );
- if (pContainer != 0) {
+ if (pContainer != nullptr) {
pContainer->forEach<util::XModifyListener>(
boost::bind(&util::XModifyListener::modified, _1,
lang::EventObject(static_cast<OWeakObject *>(this))) );
@@ -446,7 +446,7 @@ void PackageManagerImpl::disposing()
m_xLogFile.clear();
try_dispose( m_xRegistry );
m_xRegistry.clear();
- m_activePackagesDB.reset(0);
+ m_activePackagesDB.reset(nullptr);
m_xComponentContext.clear();
t_pm_helper::disposing();
@@ -620,7 +620,7 @@ OUString PackageManagerImpl::insertToActivationLayer(
if (! destFolderContent.transferContent(
sourceContent, ::ucbhelper::InsertOperation_COPY,
title, NameClash::OVERWRITE ))
- throw RuntimeException( "UCB transferContent() failed!", 0 );
+ throw RuntimeException( "UCB transferContent() failed!", nullptr );
// write to DB:
@@ -738,7 +738,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
sourceContent, ::ucbhelper::InsertOperation_COPY,
OUString(),
NameClash::ASK /* xxx todo: ASK not needed? */))
- throw RuntimeException("UCB transferContent() failed!", 0 );
+ throw RuntimeException("UCB transferContent() failed!", nullptr );
// set media-type:
::ucbhelper::Content docContent(
makeURL( m_context, title_enc ), xCmdEnv, m_xComponentContext );
@@ -1294,7 +1294,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
try
{
bOk = create_ucb_content(
- NULL, m_activePackages_expanded, Reference<css::ucb::XCommandEnvironment>(), false);
+ nullptr, m_activePackages_expanded, Reference<css::ucb::XCommandEnvironment>(), false);
}
catch (const css::ucb::ContentCreationException&)
{
@@ -1514,7 +1514,7 @@ sal_Int32 PackageManagerImpl::checkPrerequisites(
if (!m_context.equals(extension->getRepositoryName()))
throw lang::IllegalArgumentException(
"PackageManagerImpl::checkPrerequisites: extension is not from this repository.",
- 0, 0);
+ nullptr, 0);
ActivePackages::Data dbData;
OUString id = dp_misc::getIdentifier(extension);
@@ -1535,7 +1535,7 @@ sal_Int32 PackageManagerImpl::checkPrerequisites(
{
throw lang::IllegalArgumentException(
"PackageManagerImpl::checkPrerequisites: unknown extension",
- 0, 0);
+ nullptr, 0);
}
return 0;
diff --git a/desktop/source/deployment/manager/dp_properties.cxx b/desktop/source/deployment/manager/dp_properties.cxx
index a126246cdae3..38f29182f352 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.cxx
@@ -50,7 +50,7 @@ ExtensionProperties::ExtensionProperties(
m_propFileUrl = urlExtension + "properties";
::std::list< ::std::pair< OUString, OUString> > props;
- if (! dp_misc::create_ucb_content(NULL, m_propFileUrl, 0, false))
+ if (! dp_misc::create_ucb_content(nullptr, m_propFileUrl, nullptr, false))
return;
::ucbhelper::Content contentProps(m_propFileUrl, m_xCmdEnv, m_xContext);
@@ -88,7 +88,7 @@ ExtensionProperties::ExtensionProperties(
else
{
throw lang::IllegalArgumentException(
- "Extension Manager: unknown property", 0, -1);
+ "Extension Manager: unknown property", nullptr, -1);
}
}
}
@@ -99,7 +99,7 @@ OUString ExtensionProperties::getPropertyValue(css::beans::NamedValue const & v)
if (! (v.Value >>= value) )
{
throw lang::IllegalArgumentException(
- "Extension Manager: wrong property value", 0, -1);
+ "Extension Manager: wrong property value", nullptr, -1);
}
return value;
}
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index ae0d56e8e50c..38cefc4ab793 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -194,7 +194,7 @@ ExtensionDescription::ExtensionDescription(
{
throw css::uno::Exception(
"Could not get XInputStream for description.xml of extension " +
- sDescriptionUri, 0);
+ sDescriptionUri, nullptr);
}
//get root node of description.xml
@@ -204,13 +204,13 @@ ExtensionDescription::ExtensionDescription(
if (!xDocBuilder->isNamespaceAware())
{
throw css::uno::Exception(
- "Service com.sun.star.xml.dom.DocumentBuilder is not namespace aware.", 0);
+ "Service com.sun.star.xml.dom.DocumentBuilder is not namespace aware.", nullptr);
}
Reference<css::xml::dom::XDocument> xDoc = xDocBuilder->parse(xIn);
if (!xDoc.is())
{
- throw css::uno::Exception(sDescriptionUri + " contains data which cannot be parsed. ", 0);
+ throw css::uno::Exception(sDescriptionUri + " contains data which cannot be parsed. ", nullptr);
}
//check for proper root element and namespace
@@ -218,13 +218,13 @@ ExtensionDescription::ExtensionDescription(
if (!xRoot.is())
{
throw css::uno::Exception(
- sDescriptionUri + " contains no root element.", 0);
+ sDescriptionUri + " contains no root element.", nullptr);
}
if ( ! (xRoot->getTagName() == "description"))
{
throw css::uno::Exception(
- sDescriptionUri + " does not contain the root element <description>.", 0);
+ sDescriptionUri + " does not contain the root element <description>.", nullptr);
}
m_xRoot.set(xRoot, css::uno::UNO_QUERY_THROW);
@@ -233,7 +233,7 @@ ExtensionDescription::ExtensionDescription(
//check if this namespace is supported
if ( ! (nsDescription == "http://openoffice.org/extensions/description/2006"))
{
- throw css::uno::Exception(sDescriptionUri + " contains a root element with an unsupported namespace. ", 0);
+ throw css::uno::Exception(sDescriptionUri + " contains a root element with an unsupported namespace. ", nullptr);
}
} catch (const css::uno::RuntimeException &) {
throw;
@@ -319,7 +319,7 @@ DescriptionInfoset getDescriptionInfoset(OUString const & sExtensionFolderURL)
} catch (const NoDescriptionException &) {
} catch (const css::deployment::DeploymentException & e) {
throw css::uno::RuntimeException(
- "com.sun.star.deployment.DeploymentException: " + e.Message, 0);
+ "com.sun.star.deployment.DeploymentException: " + e.Message, nullptr);
}
return DescriptionInfoset(context, root);
}
@@ -619,7 +619,7 @@ css::uno::Sequence< OUString > DescriptionInfoset::getUrls(
OUString DescriptionInfoset::getLocalizedReleaseNotesURL() const
{
- return getLocalizedHREFAttrFromChild("/desc:description/desc:release-notes", NULL);
+ return getLocalizedHREFAttrFromChild("/desc:description/desc:release-notes", nullptr);
}
OUString DescriptionInfoset::getLocalizedDisplayName() const
@@ -643,7 +643,7 @@ OUString DescriptionInfoset::getLocalizedDisplayName() const
OUString DescriptionInfoset::getLocalizedLicenseURL() const
{
- return getLocalizedHREFAttrFromChild("/desc:description/desc:registration/desc:simple-license", NULL);
+ return getLocalizedHREFAttrFromChild("/desc:description/desc:registration/desc:simple-license", nullptr);
}
@@ -684,7 +684,7 @@ DescriptionInfoset::getSimpleLicenseAttributes() const
OUString DescriptionInfoset::getLocalizedDescriptionURL() const
{
- return getLocalizedHREFAttrFromChild("/desc:description/desc:extension-description", NULL);
+ return getLocalizedHREFAttrFromChild("/desc:description/desc:extension-description", nullptr);
}
css::uno::Reference< css::xml::dom::XNode >
@@ -785,7 +785,7 @@ DescriptionInfoset::getChildWithDefaultLocale(css::uno::Reference< css::xml::dom
return m_xpath->selectSingleNode(xParent, exp2);
} catch (const css::xml::xpath::XPathException &) {
// ignore
- return 0;
+ return nullptr;
}
}
diff --git a/desktop/source/deployment/misc/dp_interact.cxx b/desktop/source/deployment/misc/dp_interact.cxx
index dfa91101479b..254adedae0b2 100644
--- a/desktop/source/deployment/misc/dp_interact.cxx
+++ b/desktop/source/deployment/misc/dp_interact.cxx
@@ -116,9 +116,9 @@ bool interactContinuation( Any const & request,
xInteractionHandler->handle(
new ::comphelper::OInteractionRequest( request, conts ) );
if (cont || abort) {
- if (pcont != 0)
+ if (pcont != nullptr)
*pcont = cont;
- if (pabort != 0)
+ if (pabort != nullptr)
*pabort = abort;
return true;
}
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 1b2132ccd37f..4749537cab15 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -80,7 +80,7 @@ struct UnoRc : public rtl::StaticWithInit<
::rtl::Bootstrap::expandMacros( unorc );
std::shared_ptr< ::rtl::Bootstrap > ret(
new ::rtl::Bootstrap( unorc ) );
- OSL_ASSERT( ret->getHandle() != 0 );
+ OSL_ASSERT( ret->getHandle() != nullptr );
return ret;
}
};
@@ -97,12 +97,12 @@ const OUString OfficePipeId::operator () ()
if (!(aLocateResult == ::utl::Bootstrap::PATH_EXISTS ||
aLocateResult == ::utl::Bootstrap::PATH_VALID))
{
- throw Exception("Extension Manager: Could not obtain path for UserInstallation.", 0);
+ throw Exception("Extension Manager: Could not obtain path for UserInstallation.", nullptr);
}
rtlDigest digest = rtl_digest_create( rtl_Digest_AlgorithmMD5 );
if (!digest) {
- throw RuntimeException("cannot get digest rtl_Digest_AlgorithmMD5!", 0 );
+ throw RuntimeException("cannot get digest rtl_Digest_AlgorithmMD5!", nullptr );
}
sal_uInt8 const * data =
@@ -391,7 +391,7 @@ oslProcess raiseProcess(
OUString const & appURL, Sequence<OUString> const & args )
{
::osl::Security sec;
- oslProcess hProcess = 0;
+ oslProcess hProcess = nullptr;
oslProcessError rc = osl_executeProcess(
appURL.pData,
reinterpret_cast<rtl_uString **>(
@@ -399,24 +399,24 @@ oslProcess raiseProcess(
args.getLength(),
osl_Process_DETACHED,
sec.getHandle(),
- 0, // => current working dir
- 0, 0, // => no env vars
+ nullptr, // => current working dir
+ nullptr, 0, // => no env vars
&hProcess );
switch (rc) {
case osl_Process_E_None:
break;
case osl_Process_E_NotFound:
- throw RuntimeException( "image not found!", 0 );
+ throw RuntimeException( "image not found!", nullptr );
case osl_Process_E_TimedOut:
- throw RuntimeException( "timeout occurred!", 0 );
+ throw RuntimeException( "timeout occurred!", nullptr );
case osl_Process_E_NoPermission:
- throw RuntimeException( "permission denied!", 0 );
+ throw RuntimeException( "permission denied!", nullptr );
case osl_Process_E_Unknown:
- throw RuntimeException( "unknown error!", 0 );
+ throw RuntimeException( "unknown error!", nullptr );
case osl_Process_E_InvalidError:
default:
- throw RuntimeException( "unmapped error!", 0 );
+ throw RuntimeException( "unmapped error!", nullptr );
}
return hProcess;
@@ -427,12 +427,12 @@ OUString generateRandomPipeId()
{
// compute some good pipe id:
static rtlRandomPool s_hPool = rtl_random_createPool();
- if (s_hPool == 0)
- throw RuntimeException( "cannot create random pool!?", 0 );
+ if (s_hPool == nullptr)
+ throw RuntimeException( "cannot create random pool!?", nullptr );
sal_uInt8 bytes[ 32 ];
if (rtl_random_getBytes(
s_hPool, bytes, ARLEN(bytes) ) != rtl_Random_E_None) {
- throw RuntimeException( "random pool error!?", 0 );
+ throw RuntimeException( "random pool error!?", nullptr );
}
OUStringBuffer buf;
for ( sal_uInt32 i = 0; i < ARLEN(bytes); ++i ) {
@@ -452,7 +452,7 @@ Reference<XInterface> resolveUnoURL(
for (int i = 0; i <= 20; ++i) // 10 seconds
{
- if (abortChannel != 0 && abortChannel->isAborted()) {
+ if (abortChannel != nullptr && abortChannel->isAborted()) {
throw ucb::CommandAbortedException( "abort!" );
}
try {
@@ -467,7 +467,7 @@ Reference<XInterface> resolveUnoURL(
else throw;
}
}
- return 0; // warning C4715
+ return nullptr; // warning C4715
}
#ifdef WNT
@@ -520,7 +520,7 @@ OUString readConsole()
char buf[1024];
memset(buf, 0, 1024);
// read one char less so that the last char in buf is always zero
- if (fgets(buf, 1024, stdin) != NULL)
+ if (fgets(buf, 1024, stdin) != nullptr)
{
OUString value = OStringToOUString(OString(buf), osl_getThreadTextEncoding());
return value.trim();
diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx
index f765835bdc06..ed78ab015988 100644
--- a/desktop/source/deployment/misc/dp_ucb.cxx
+++ b/desktop/source/deployment/misc/dp_ucb.cxx
@@ -58,7 +58,7 @@ bool create_ucb_content(
ucbContent.isFolder();
- if (ret_ucbContent != 0)
+ if (ret_ucbContent != nullptr)
{
ucbContent.setCommandEnvironment( xCmdEnv );
*ret_ucbContent = ucbContent;
@@ -85,7 +85,7 @@ bool create_folder(
&ucb_content, url_, xCmdEnv, false /* no throw */ ))
{
if (ucb_content.isFolder()) {
- if (ret_ucb_content != 0)
+ if (ret_ucb_content != nullptr)
*ret_ucb_content = ucb_content;
return true;
}
@@ -133,7 +133,7 @@ bool create_folder(
StrTitle::getTitleSequence(),
Sequence<Any>( &title, 1 ),
ucb_content )) {
- if (ret_ucb_content != 0)
+ if (ret_ucb_content != nullptr)
*ret_ucb_content = ucb_content;
return true;
}
@@ -192,7 +192,7 @@ bool erase_path( OUString const & url,
if (! ucb_content.openStream( xStream ))
throw RuntimeException(
"::ucbhelper::Content::openStream( XOutputStream ) failed!",
- 0 );
+ nullptr );
return bytes;
}
diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx
index 65ca50828f91..93895d41ff5a 100644
--- a/desktop/source/deployment/misc/lockfile.cxx
+++ b/desktop/source/deployment/misc/lockfile.cxx
@@ -84,7 +84,7 @@ namespace desktop {
// generate ID
const int nIdBytes = 16;
char tmpId[nIdBytes*2+1];
- time_t t = time(NULL);
+ time_t t = time(nullptr);
for (int i = 0; i<nIdBytes; i++) {
int tmpByte = comphelper::rng::uniform_int_distribution(0, 0xFF);
sprintf( tmpId+i*2, "%02X", tmpByte );
@@ -94,7 +94,7 @@ namespace desktop {
// generate date string
char *tmpTime = ctime( &t );
- if (tmpTime != NULL) {
+ if (tmpTime != nullptr) {
m_aDate = OUString::createFromAscii( tmpTime );
sal_Int32 i = m_aDate.indexOf('\n');
if (i > 0)
@@ -120,7 +120,7 @@ namespace desktop {
if (m_bIsLocked) {
// lock existed, ask user what to do
if (isStale() ||
- (execWarning != 0 && (*execWarning)( this ))) {
+ (execWarning != nullptr && (*execWarning)( this ))) {
// remove file and create new
File::remove( m_aLockname );
File aFile(m_aLockname);
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
index 05ba8b7a037f..d0b2d490129c 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
@@ -99,7 +99,7 @@ void ComponentBackendDb::addEntry(OUString const & url, Data const & data)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -127,7 +127,7 @@ ComponentBackendDb::Data ComponentBackendDb::getEntry(OUString const & url)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index cf996068fdd8..b309f1882912 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -377,7 +377,7 @@ BackendImpl::ComponentPackageImpl::getRDB() const
BackendImpl * BackendImpl::ComponentPackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//Throws a DisposedException
check();
@@ -452,7 +452,7 @@ void BackendImpl::initServiceRdbFiles()
m_commonRDB, NameClash::OVERWRITE ))
{
- throw RuntimeException( "UCB transferContent() failed!", 0 );
+ throw RuntimeException( "UCB transferContent() failed!", nullptr );
}
oldRDB = ::ucbhelper::Content();
}
@@ -471,7 +471,7 @@ void BackendImpl::initServiceRdbFiles()
if (! cacheDir.transferContent(
oldRDB, ::ucbhelper::InsertOperation_COPY,
m_nativeRDB, NameClash::OVERWRITE ))
- throw RuntimeException( "UCB transferContent() failed!", 0 );
+ throw RuntimeException( "UCB transferContent() failed!", nullptr );
}
// UNO is bootstrapped, flush for next process start:
@@ -773,7 +773,7 @@ void BackendImpl::unorc_verify_init(
if (!token.isEmpty())
{
if (create_ucb_content(
- 0, expandUnoRcTerm(token), xCmdEnv,
+ nullptr, expandUnoRcTerm(token), xCmdEnv,
false /* no throw */ ))
{
//The jar file may not exist anymore if a shared or bundled
@@ -796,7 +796,7 @@ void BackendImpl::unorc_verify_init(
if (token[ 0 ] == '?')
token = token.copy( 1 );
if (create_ucb_content(
- 0, expandUnoRcTerm(token), xCmdEnv,
+ nullptr, expandUnoRcTerm(token), xCmdEnv,
false /* no throw */ ))
{
//The RDB file may not exist anymore if a shared or bundled
@@ -1141,7 +1141,7 @@ void extractComponentData(
OUString const & componentUrl)
{
OSL_ASSERT(
- context.is() && registry.is() && data != 0 && componentLoader.is());
+ context.is() && registry.is() && data != nullptr && componentLoader.is());
OUString registryName(registry->getKeyName());
sal_Int32 prefix = registryName.getLength();
if (!registryName.endsWith("/")) {
@@ -1168,7 +1168,7 @@ void extractComponentData(
singletonKeys[j]->getKeyName().copy(prefix2), name));
}
}
- if (factories != 0) {
+ if (factories != nullptr) {
factories->push_back(
componentLoader->activate(
name, OUString(), componentUrl, keys[i]));
@@ -1421,7 +1421,7 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
data.javaTypeLibrary = true;
}
std::vector< css::uno::Reference< css::uno::XInterface > > factories;
- getComponentInfo(&data, startup ? 0 : &factories, context);
+ getComponentInfo(&data, startup ? nullptr : &factories, context);
if (!startup) {
try {
componentLiveInsertion(data, factories);
@@ -1483,7 +1483,7 @@ BackendImpl::TypelibraryPackageImpl::TypelibraryPackageImpl(
BackendImpl * BackendImpl::TypelibraryPackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//May throw a DisposedException
check();
@@ -1577,7 +1577,7 @@ BackendImpl *
BackendImpl::OtherPlatformPackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//Throws a DisposedException
check();
@@ -1608,7 +1608,7 @@ BackendImpl::OtherPlatformPackageImpl::impl_openRDB() const
catch (registry::InvalidRegistryException const&)
{
// If the registry does not exist, we do not need to bother at all
- xRegistry.set(0);
+ xRegistry.set(nullptr);
}
SAL_WARN_IF( !xRegistry.is(), "desktop.deployment", "could not create registry for the package's platform");
@@ -1666,7 +1666,7 @@ BackendImpl::OtherPlatformPackageImpl::processPackage_(
BackendImpl * BackendImpl::ComponentsPackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//Throws a DisposedException
check();
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 31cca388ff30..3df952adba7a 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -526,7 +526,7 @@ bool BackendImpl::removeFromConfigmgrIni(
BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//May throw a DisposedException
check();
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
index c51f127adeb1..81a807e1990e 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
@@ -90,7 +90,7 @@ void ConfigurationBackendDb::addEntry(OUString const & url, Data const & data)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write data entry in configuration backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -122,7 +122,7 @@ ConfigurationBackendDb::getEntry(OUString const & url)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read data entry in configuration backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -157,7 +157,7 @@ ConfigurationBackendDb::getEntry(OUString const & url)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read data entry in configuration backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 720e8abf005c..17abf4a40db2 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -588,14 +588,14 @@ void Package::exportTo(
}
if (!bOk)
- throw RuntimeException( "UCB transferContent() failed!", 0 );
+ throw RuntimeException( "UCB transferContent() failed!", nullptr );
}
void Package::fireModified()
{
::cppu::OInterfaceContainerHelper * container = rBHelper.getContainer(
cppu::UnoType<util::XModifyListener>::get() );
- if (container != 0) {
+ if (container != nullptr) {
Sequence< Reference<XInterface> > elements(
container->getElements() );
lang::EventObject evt( static_cast<OWeakObject *>(this) );
@@ -752,7 +752,7 @@ void Package::revokePackage(
PackageRegistryBackend * Package::getMyBackend() const
{
PackageRegistryBackend * pBackend = m_myBackend.get();
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//May throw a DisposedException
check();
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index a2c03235d855..3cd4185c3f8d 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -59,7 +59,7 @@ void BackendDb::save()
const Reference<css::io::XInputStream> xData(
::xmlscript::createInputStream(bytes));
- ::ucbhelper::Content ucbDb(m_urlDb, 0, m_xContext);
+ ::ucbhelper::Content ucbDb(m_urlDb, nullptr, m_xContext);
ucbDb.writeStream(xData, true /*replace existing*/);
}
@@ -95,12 +95,12 @@ css::uno::Reference<css::xml::dom::XDocument> BackendDb::getDocument()
else
throw css::uno::RuntimeException(
"Extension manager could not access database file:"
- + m_urlDb, 0);
+ + m_urlDb, nullptr);
if (!m_doc.is())
throw css::uno::RuntimeException(
"Extension manager could not get root node of data base file: "
- + m_urlDb, 0);
+ + m_urlDb, nullptr);
}
return m_doc;
@@ -147,7 +147,7 @@ void BackendDb::removeElement(OUString const & sXPathExpression)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -182,7 +182,7 @@ void BackendDb::revokeEntry(OUString const & url)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to revoke data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -206,7 +206,7 @@ bool BackendDb::activateEntry(OUString const & url)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to revoke data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -230,7 +230,7 @@ bool BackendDb::hasActiveEntry(OUString const & url)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to determine an active entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -259,7 +259,7 @@ Reference<css::xml::dom::XNode> BackendDb::getKeyElement(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read key element in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -331,7 +331,7 @@ void BackendDb::writeVectorOfPair(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -377,7 +377,7 @@ BackendDb::readVectorOfPair(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -422,7 +422,7 @@ void BackendDb::writeSimpleList(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -453,7 +453,7 @@ void BackendDb::writeSimpleElement(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write data entry(writeSimpleElement) in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -505,7 +505,7 @@ Reference<css::xml::dom::XNode> BackendDb::writeKeyElement(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write key element in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -528,7 +528,7 @@ OUString BackendDb::readSimpleElement(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read data (readSimpleElement) in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -562,7 +562,7 @@ OUString BackendDb::readSimpleElement(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -607,7 +607,7 @@ OUString BackendDb::readSimpleElement(
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -655,7 +655,7 @@ void RegisteredDb::addEntry(OUString const & url)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index 3eb0c06c0a5a..62e6737beaed 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -324,7 +324,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create(
registryArgs[ 1 ] <<= registryCachePath;
registryArgs[ 2 ] <<= readOnly;
if (! readOnly)
- create_folder( 0, registryCachePath,
+ create_folder( nullptr, registryCachePath,
Reference<XCommandEnvironment>() );
}
@@ -374,7 +374,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create(
rtl_UriCharClassPchar,
rtl_UriEncodeIgnoreEscapes,
RTL_TEXTENCODING_UTF8 ) ) );
- create_folder( 0, registryCachePath, Reference<XCommandEnvironment>());
+ create_folder( nullptr, registryCachePath, Reference<XCommandEnvironment>());
#if OSL_DEBUG_LEVEL > 1
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index 18d1e7786c5e..68a876547faa 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -196,7 +196,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
BackendImpl * BackendImpl::ExecutablePackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//May throw a DisposedException
check();
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index f6e5a4b3e06c..8bed8bb89de0 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -262,7 +262,7 @@ BackendImpl::PackageImpl::PackageImpl(
BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//May throw a DisposedException
check();
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
index 1b8833150b6f..219d9128c1eb 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
@@ -88,7 +88,7 @@ void HelpBackendDb::addEntry(OUString const & url, Data const & data)
{
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
- "Extension Manager: failed to write data entry in help backend db: " + m_urlDb, 0, exc);
+ "Extension Manager: failed to write data entry in help backend db: " + m_urlDb, nullptr, exc);
}
}
@@ -118,7 +118,7 @@ HelpBackendDb::getEntry(OUString const & url)
{
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
- "Extension Manager: failed to read data entry in help backend db: " + m_urlDb, 0, exc);
+ "Extension Manager: failed to read data entry in help backend db: " + m_urlDb, nullptr, exc);
}
}
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
index 4d1b6ffd8c5f..0e2f7e2220fc 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
@@ -83,7 +83,7 @@ void ExtensionBackendDb::addEntry(OUString const & url, Data const & data)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to write data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
@@ -107,7 +107,7 @@ ExtensionBackendDb::Data ExtensionBackendDb::getEntry(OUString const & url)
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
"Extension Manager: failed to read data entry in backend db: " +
- m_urlDb, 0, exc);
+ m_urlDb, nullptr, exc);
}
}
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 6a9dc3fa317c..899cee3e137c 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -483,7 +483,7 @@ BackendImpl::PackageImpl::PackageImpl(
xPackageType, bRemoved, identifier),
m_url_expanded( expandUnoRcUrl( url ) ),
m_legacyBundle( legacyBundle ),
- m_pBundle( 0 )
+ m_pBundle( nullptr )
{
if (bRemoved)
m_dbData = getMyBackend()->readDataFromDb(url);
@@ -492,7 +492,7 @@ BackendImpl::PackageImpl::PackageImpl(
BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//May throw a DisposedException
check();
@@ -588,7 +588,7 @@ OUString BackendImpl::PackageImpl::getTextFromURL(
{
Any exc( ::cppu::getCaughtException() );
throw css::deployment::DeploymentException(
- "Could not read file " + licenseUrl, 0, exc);
+ "Could not read file " + licenseUrl, nullptr, exc);
}
}
@@ -618,7 +618,7 @@ bool BackendImpl::PackageImpl::checkPlatform(
msg, static_cast<OWeakObject *>(this), this));
if (!interactContinuation(
e, cppu::UnoType< css::task::XInteractionApprove >::get(),
- environment, NULL, NULL))
+ environment, nullptr, nullptr))
{
throw css::deployment::DeploymentException(
msg, static_cast<OWeakObject *>(this), e);
@@ -645,7 +645,7 @@ bool BackendImpl::PackageImpl::checkDependencies(
msg, static_cast<OWeakObject *>(this), unsatisfied));
if (!interactContinuation(
e, cppu::UnoType< css::task::XInteractionApprove >::get(),
- environment, NULL, NULL))
+ environment, nullptr, nullptr))
{
throw css::deployment::DeploymentException(
msg, static_cast<OWeakObject *>(this), e);
@@ -674,14 +674,14 @@ bool BackendImpl::PackageImpl::checkLicense(
//license is available.
if (sLic.isEmpty())
throw css::deployment::DeploymentException(
- "Could not obtain path to license. Possible error in description.xml", 0, Any());
+ "Could not obtain path to license. Possible error in description.xml", nullptr, Any());
OUString sHref = m_url_expanded + "/" + sLic;
OUString sLicense = getTextFromURL(xCmdEnv, sHref);
////determine who has to agree to the license
//check correct value for attribute
if ( ! (simplLicAttr->acceptBy == "user" || simplLicAttr->acceptBy == "admin"))
throw css::deployment::DeploymentException(
- "Could not obtain attribute simple-lincense@accept-by or it has no valid value", 0, Any());
+ "Could not obtain attribute simple-lincense@accept-by or it has no valid value", nullptr, Any());
//Only use interaction if there is no version of this extension already installed
@@ -696,14 +696,14 @@ bool BackendImpl::PackageImpl::checkLicense(
if ( !(alreadyInstalled && simplLicAttr->suppressOnUpdate))
{
css::deployment::LicenseException licExc(
- OUString(), 0, getDisplayName(), sLicense,
+ OUString(), nullptr, getDisplayName(), sLicense,
simplLicAttr->acceptBy);
bool approve = false;
bool abort = false;
if (! interactContinuation(
Any(licExc), cppu::UnoType<task::XInteractionApprove>::get(), xCmdEnv, &approve, &abort ))
throw css::deployment::DeploymentException(
- "Could not interact with user.", 0, Any());
+ "Could not interact with user.", nullptr, Any());
if (approve)
return true;
@@ -721,7 +721,7 @@ bool BackendImpl::PackageImpl::checkLicense(
throw;
} catch (const css::uno::Exception&) {
Any anyExc = cppu::getCaughtException();
- throw css::deployment::DeploymentException("Unexpected exception", 0, anyExc);
+ throw css::deployment::DeploymentException("Unexpected exception", nullptr, anyExc);
}
}
@@ -1051,7 +1051,7 @@ void BackendImpl::PackageImpl::exportTo(
if (nameClashAction == ucb::NameClash::ASK)
{
if (create_ucb_content(
- 0, destURL, xCmdEnv, false /* no throw */ )) {
+ nullptr, destURL, xCmdEnv, false /* no throw */ )) {
bool replace = false, abort = false;
if (! interactContinuation(
Any( ucb::NameClashResolveRequest(
@@ -1242,7 +1242,7 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle(
lang::IllegalArgumentException, RuntimeException, std::exception)
{
Sequence< Reference<deployment::XPackage> > * pBundle = m_pBundle;
- if (pBundle == 0)
+ if (pBundle == nullptr)
{
t_packagevec bundle;
if (m_bRemoved)
@@ -1259,13 +1259,13 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle(
OUString mediaType;
// probe for script.xlb:
if (create_ucb_content(
- 0, makeURL( m_url_expanded, "script.xlb" ),
+ nullptr, makeURL( m_url_expanded, "script.xlb" ),
xCmdEnv, false /* no throw */ )) {
mediaType = "application/vnd.sun.star.basic-library";
}
// probe for dialog.xlb:
else if (create_ucb_content(
- 0, makeURL( m_url_expanded, "dialog.xlb" ),
+ nullptr, makeURL( m_url_expanded, "dialog.xlb" ),
xCmdEnv, false /* no throw */ ))
mediaType = "application/vnd.sun.star.dialog-library";
@@ -1341,7 +1341,7 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle(
const ::osl::MutexGuard guard( getMutex() );
pBundle = m_pBundle;
- if (pBundle == 0) {
+ if (pBundle == nullptr) {
m_bundle = ret;
pBundle = &m_bundle;
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
@@ -1399,7 +1399,7 @@ Reference<deployment::XPackage> BackendImpl::PackageImpl::bindBundleItem(
(void)interactContinuation(
Any( lang::WrappedTargetException("bundle item error!",
static_cast<OWeakObject *>(this), exc ) ),
- cppu::UnoType<task::XInteractionApprove>::get(), xCmdEnv, 0, 0 );
+ cppu::UnoType<task::XInteractionApprove>::get(), xCmdEnv, nullptr, nullptr );
}
}
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index a02ee3f6688c..c463b31e96f9 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -226,12 +226,12 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
// probe for script.xlb:
if (create_ucb_content(
- 0, makeURL( url, "script.xlb" ),
+ nullptr, makeURL( url, "script.xlb" ),
xCmdEnv, false /* no throw */ ))
mediaType = "application/vnd.sun.star.basic-library";
// probe for dialog.xlb:
else if (create_ucb_content(
- 0, makeURL( url, "dialog.xlb" ),
+ nullptr, makeURL( url, "dialog.xlb" ),
xCmdEnv, false /* no throw */ ))
mediaType = "application/vnd.sun.star.dialog-library";
}
@@ -249,7 +249,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
OUString dialogURL( makeURL( url, "dialog.xlb" ) );
if (! create_ucb_content(
- 0, dialogURL, xCmdEnv, false /* no throw */ )) {
+ nullptr, dialogURL, xCmdEnv, false /* no throw */ )) {
dialogURL.clear();
}
@@ -257,7 +257,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
OUString scriptURL( makeURL( url, "script.xlb"));
if (! create_ucb_content(
- 0, scriptURL, xCmdEnv, false /* no throw */ )) {
+ nullptr, scriptURL, xCmdEnv, false /* no throw */ )) {
scriptURL.clear();
}
@@ -286,7 +286,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//May throw a DisposedException
check();
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 98d044d6ecf8..df0fe2239ed0 100644
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -109,7 +109,7 @@ public:
BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
- if (NULL == pBackend)
+ if (nullptr == pBackend)
{
//May throw a DisposedException
check();
@@ -210,7 +210,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
// probe for parcel-descriptor.xml:
if (create_ucb_content(
- 0, makeURL( url, "parcel-descriptor.xml" ),
+ nullptr, makeURL( url, "parcel-descriptor.xml" ),
xCmdEnv, false /* no throw */ ))
{
mediaType = "application/vnd.sun.star.framework-script";
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2d545caa544d..4523675ca4bd 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -90,7 +90,7 @@ using namespace vcl;
using namespace desktop;
using namespace utl;
-static LibLibreOffice_Impl *gImpl = NULL;
+static LibLibreOffice_Impl *gImpl = nullptr;
static std::weak_ptr< LibreOfficeKitClass > gOfficeClass;
static std::weak_ptr< LibreOfficeKitDocumentClass > gDocumentClass;
@@ -123,7 +123,7 @@ static const ExtensionMap aWriterExtensionMap[] =
{ "txt", "Text" },
{ "xhtml", "XHTML Writer File" },
{ "png", "writer_png_Export" },
- { NULL, NULL }
+ { nullptr, nullptr }
};
static const ExtensionMap aCalcExtensionMap[] =
@@ -138,7 +138,7 @@ static const ExtensionMap aCalcExtensionMap[] =
{ "xls", "MS Excel 97" },
{ "xlsx", "Calc MS Excel 2007 XML" },
{ "png", "calc_png_Export" },
- { NULL, NULL }
+ { nullptr, nullptr }
};
static const ExtensionMap aImpressExtensionMap[] =
@@ -158,7 +158,7 @@ static const ExtensionMap aImpressExtensionMap[] =
{ "swf", "impress_flash_Export" },
{ "xhtml", "XHTML Impress File" },
{ "png", "impress_png_Export"},
- { NULL, NULL }
+ { nullptr, nullptr }
};
static const ExtensionMap aDrawExtensionMap[] =
@@ -171,12 +171,12 @@ static const ExtensionMap aDrawExtensionMap[] =
{ "swf", "draw_flash_Export" },
{ "xhtml", "XHTML Draw File" },
{ "png", "draw_png_Export"},
- { NULL, NULL }
+ { nullptr, nullptr }
};
static OUString getUString(const char* pString)
{
- if (pString == NULL)
+ if (pString == nullptr)
return OUString();
OString sString(pString, strlen(pString));
@@ -339,7 +339,7 @@ static void lo_registerCallback (LibreOfficeKit* pThis,
static char* lo_getFilterTypes(LibreOfficeKit* pThis);
LibLibreOffice_Impl::LibLibreOffice_Impl()
- : maThread(0)
+ : maThread(nullptr)
, mpCallback(nullptr)
, mpCallbackData(nullptr)
{
@@ -378,7 +378,7 @@ static uno::Reference<css::lang::XMultiComponentFactory> xFactory;
static LibreOfficeKitDocument* lo_documentLoad(LibreOfficeKit* pThis, const char* pURL)
{
- return lo_documentLoadWithOptions(pThis, pURL, NULL);
+ return lo_documentLoadWithOptions(pThis, pURL, nullptr);
}
static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, const char* pURL, const char* pOptions)
@@ -392,7 +392,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
{
pLib->maLastExceptionMsg = "Filename to load was not provided.";
SAL_INFO("lok", "URL for load is empty");
- return NULL;
+ return nullptr;
}
pLib->maLastExceptionMsg.clear();
@@ -401,7 +401,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
{
pLib->maLastExceptionMsg = "ComponentContext is not available";
SAL_INFO("lok", "ComponentContext is not available");
- return NULL;
+ return nullptr;
}
uno::Reference<frame::XDesktop2> xComponentLoader = frame::Desktop::create(xContext);
@@ -410,7 +410,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
{
pLib->maLastExceptionMsg = "ComponentLoader is not available";
SAL_INFO("lok", "ComponentLoader is not available");
- return NULL;
+ return nullptr;
}
try
@@ -444,7 +444,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
{
pLib->maLastExceptionMsg = "loadComponentFromURL returned an empty reference";
SAL_INFO("lok", "Document can't be loaded - " << pLib->maLastExceptionMsg);
- return NULL;
+ return nullptr;
}
return new LibLODocument_Impl(xComponent);
@@ -456,7 +456,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
SAL_INFO("lok", "Document can't be loaded - exception: " << exception.Message);
}
- return NULL;
+ return nullptr;
}
static void lo_registerCallback (LibreOfficeKit* pThis,
@@ -505,7 +505,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha
return false;
}
- if (pFormat == NULL)
+ if (pFormat == nullptr)
{
// sniff from the extension
sal_Int32 idx = aURL.lastIndexOf(".");
@@ -579,7 +579,7 @@ static void doc_iniUnoCommands ()
util::URL aCommandURL;
SfxViewShell* pViewShell = SfxViewShell::Current();
- SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): NULL;
+ SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
// check if Frame-Controller were created.
if (!pViewShell && !pViewFrame)
@@ -601,7 +601,7 @@ static void doc_iniUnoCommands ()
for (sal_uInt32 nIterator = 0; nIterator < SAL_N_ELEMENTS(sUnoCommands); nIterator++)
{
- const SfxSlot* pSlot = NULL;
+ const SfxSlot* pSlot = nullptr;
aCommandURL.Complete = sUnoCommands[nIterator];
xParser->parseStrict(aCommandURL);
@@ -696,7 +696,7 @@ static char* doc_getPartPageRectangles(LibreOfficeKitDocument* pThis)
if (!pDoc)
{
gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
- return 0;
+ return nullptr;
}
OUString sRectangles = pDoc->getPartPageRectangles();
@@ -713,7 +713,7 @@ static char* doc_getPartName(LibreOfficeKitDocument* pThis, int nPart)
if (!pDoc)
{
gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
- return 0;
+ return nullptr;
}
OUString sName = pDoc->getPartName( nPart );
@@ -838,7 +838,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
}
#endif
- static bool bDebug = getenv("LOK_DEBUG") != 0;
+ static bool bDebug = getenv("LOK_DEBUG") != nullptr;
if (bDebug)
{
// Draw a small red rectangle in the top left corner so that it's easy to see where a new tile begins.
@@ -1060,7 +1060,7 @@ static char* doc_getTextSelection(LibreOfficeKitDocument* pThis, const char* pMi
if (!pDoc)
{
gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
- return 0;
+ return nullptr;
}
OString aUsedMimeType;
@@ -1138,7 +1138,7 @@ static char* getFonts (const char* pCommand)
SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SvxFontListItem* pFonts = static_cast<const SvxFontListItem*>(
pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
- const FontList* pList = pFonts ? pFonts->GetFontList() : 0;
+ const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
boost::property_tree::ptree aTree;
aTree.put("commandName", pCommand);
@@ -1225,7 +1225,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
if (!pDoc)
{
gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
- return 0;
+ return nullptr;
}
Rectangle aRectangle;
@@ -1279,7 +1279,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
if (!pDoc)
{
gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
- return 0;
+ return nullptr;
}
// Command has parameters.
@@ -1327,7 +1327,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
else
{
gImpl->maLastExceptionMsg = "Unknown command, no values returned";
- return NULL;
+ return nullptr;
}
}
@@ -1385,7 +1385,7 @@ static char* lo_getFilterTypes(LibreOfficeKit* pThis)
if (!xSFactory.is())
{
pImpl->maLastExceptionMsg = "Service factory is not available";
- return 0;
+ return nullptr;
}
uno::Reference<container::XNameAccess> xTypeDetection(xSFactory->createInstance("com.sun.star.document.TypeDetection"), uno::UNO_QUERY);
@@ -1491,13 +1491,13 @@ static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit:
switch (type)
{
case comphelper::LibreOfficeKit::statusIndicatorCallbackType::Start:
- pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_START, 0, pLib->mpCallbackData);
+ pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_START, nullptr, pLib->mpCallbackData);
break;
case comphelper::LibreOfficeKit::statusIndicatorCallbackType::SetValue:
pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE, OUString::number(percent).toUtf8().getStr(), pLib->mpCallbackData);
break;
case comphelper::LibreOfficeKit::statusIndicatorCallbackType::Finish:
- pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_FINISH, 0, pLib->mpCallbackData);
+ pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_FINISH, nullptr, pLib->mpCallbackData);
break;
}
}
@@ -1578,7 +1578,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
SAL_INFO("lok", "Enabling OfficeIPCThread");
OfficeIPCThread::EnableOfficeIPCThread();
SAL_INFO("lok", "Starting soffice_main");
- pLib->maThread = osl_createThread(lo_startmain, NULL);
+ pLib->maThread = osl_createThread(lo_startmain, nullptr);
SAL_INFO("lok", "Waiting for OfficeIPCThread");
OfficeIPCThread::WaitForReady();
SAL_INFO("lok", "OfficeIPCThread ready -- continuing");
@@ -1640,17 +1640,17 @@ SAL_DLLPUBLIC_EXPORT
#endif
LibreOfficeKit *libreofficekit_hook(const char* install_path)
{
- return libreofficekit_hook_2(install_path, NULL);
+ return libreofficekit_hook_2(install_path, nullptr);
}
static void lo_destroy(LibreOfficeKit* pThis)
{
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
- gImpl = NULL;
+ gImpl = nullptr;
SAL_INFO("lok", "LO Destroy");
- comphelper::LibreOfficeKit::setStatusIndicatorCallback(0, 0);
+ comphelper::LibreOfficeKit::setStatusIndicatorCallback(nullptr, nullptr);
Application::Quit();
osl_joinWithThread(pLib->maThread);
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 1f8e9999ff69..437fb0a5d6f6 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -750,7 +750,7 @@ struct componentParts {
typedef std::map< OUString, componentParts > Components;
bool getComponent(OUString const & path, OUString * component) {
- OSL_ASSERT(component != 0);
+ OSL_ASSERT(component != nullptr);
if (path.isEmpty() || path[0] != '/') {
OSL_TRACE(
("configuration migration in/exclude path %s ignored (does not"
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index ee8d2cde4bb4..d6c757aa6f1a 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -97,7 +97,7 @@ struct MigrationItem
css::uno::Reference< css::container::XIndexContainer > m_xPopupMenu;
MigrationItem()
- :m_xPopupMenu(0)
+ :m_xPopupMenu(nullptr)
{
}
diff --git a/desktop/source/migration/services/cexports.cxx b/desktop/source/migration/services/cexports.cxx
index c69ed678f337..8d58e1278ffe 100644
--- a/desktop/source/migration/services/cexports.cxx
+++ b/desktop/source/migration/services/cexports.cxx
@@ -31,12 +31,12 @@ extern "C"
{
migration::BasicMigration_create, migration::BasicMigration_getImplementationName,
migration::BasicMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
{
migration::WordbookMigration_create, migration::WordbookMigration_getImplementationName,
migration::WordbookMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
// Extension migration was disabled by Oracle / OpenOffice.org
#if 0
@@ -46,7 +46,7 @@ extern "C"
0, 0
},
#endif
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
diff --git a/desktop/source/migration/services/cexportsoo3.cxx b/desktop/source/migration/services/cexportsoo3.cxx
index 6c993ccd8f3b..faaa5e09130c 100644
--- a/desktop/source/migration/services/cexportsoo3.cxx
+++ b/desktop/source/migration/services/cexportsoo3.cxx
@@ -29,9 +29,9 @@ extern "C"
{
migration::OO3ExtensionMigration_create, migration::OO3ExtensionMigration_getImplementationName,
migration::OO3ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
- 0, 0
+ nullptr, 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index 29ca9d186460..ac9b39bd1467 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -67,7 +67,7 @@ public:
operator JavaInfo* () const { return pData;}
};
-CJavaInfo::CJavaInfo(): pData(NULL)
+CJavaInfo::CJavaInfo(): pData(nullptr)
{
}
@@ -416,11 +416,11 @@ void SAL_CALL JavaMigration::setPropertyValue(
if (!(aValue >>= val))
throw MalformedDataException(
"[Service implementation " IMPL_NAME
- "] XLayerHandler::setPropertyValue received wrong type for Enable property", 0, Any());
+ "] XLayerHandler::setPropertyValue received wrong type for Enable property", nullptr, Any());
if (jfw_setEnabled(val) != JFW_E_NONE)
throw WrappedTargetException(
"[Service implementation " IMPL_NAME
- "] XLayerHandler::setPropertyValue: jfw_setEnabled failed.", 0, Any());
+ "] XLayerHandler::setPropertyValue: jfw_setEnabled failed.", nullptr, Any());
break;
}
@@ -430,12 +430,12 @@ void SAL_CALL JavaMigration::setPropertyValue(
if (!(aValue >>= cp))
throw MalformedDataException(
"[Service implementation " IMPL_NAME
- "] XLayerHandler::setPropertyValue received wrong type for UserClassPath property", 0, Any());
+ "] XLayerHandler::setPropertyValue received wrong type for UserClassPath property", nullptr, Any());
if (jfw_setUserClassPath(cp.pData) != JFW_E_NONE)
throw WrappedTargetException(
"[Service implementation " IMPL_NAME
- "] XLayerHandler::setPropertyValue: jfw_setUserClassPath failed.", 0, Any());
+ "] XLayerHandler::setPropertyValue: jfw_setUserClassPath failed.", nullptr, Any());
break;
}
default:
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 726a192c362c..a3fe11bad7d7 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -61,7 +61,7 @@ static const char sExtensionRootSubDirName[] = "/uno_packages";
OUString OO3ExtensionMigration_getImplementationName()
{
- static OUString* pImplName = 0;
+ static OUString* pImplName = nullptr;
if ( !pImplName )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -78,7 +78,7 @@ OUString OO3ExtensionMigration_getImplementationName()
Sequence< OUString > OO3ExtensionMigration_getSupportedServiceNames()
{
- static Sequence< OUString >* pNames = 0;
+ static Sequence< OUString >* pNames = nullptr;
if ( !pNames )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 768d517e6915..4605142530bb 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -43,7 +43,7 @@ namespace migration
OUString WordbookMigration_getImplementationName()
{
- static OUString* pImplName = 0;
+ static OUString* pImplName = nullptr;
if ( !pImplName )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -60,7 +60,7 @@ namespace migration
Sequence< OUString > WordbookMigration_getSupportedServiceNames()
{
- static Sequence< OUString >* pNames = 0;
+ static Sequence< OUString >* pNames = nullptr;
if ( !pNames )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 5d43c9b1ceab..2702dede009c 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -45,7 +45,7 @@ extern "C" void offacc_workerfunc (void * acc)
}
Acceptor::Acceptor( const Reference< XComponentContext >& rxContext )
- : m_thread(NULL)
+ : m_thread(nullptr)
, m_rContext(rxContext)
, m_bInit(false)
, m_bDying(false)
@@ -267,7 +267,7 @@ using namespace desktop;
SAL_DLLPUBLIC_EXPORT void * SAL_CALL offacc_component_getFactory(char const *pImplementationName, void *pServiceManager, void *)
{
- void* pReturn = NULL ;
+ void* pReturn = nullptr ;
if ( pImplementationName && pServiceManager )
{
// Define variables which are used in following macros.
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;
}
diff --git a/desktop/source/splash/services_spl.cxx b/desktop/source/splash/services_spl.cxx
index efa79d0cde01..7993b09f56eb 100644
--- a/desktop/source/splash/services_spl.cxx
+++ b/desktop/source/splash/services_spl.cxx
@@ -33,15 +33,15 @@ static cppu::ImplementationEntry const services[] = {
&desktop::splash::create,
&desktop::splash::getImplementationName,
&desktop::splash::getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0
+ &cppu::createSingleComponentFactory, nullptr, 0
},
{
UnxSplash_createInstance,
UnxSplash_getImplementationName,
UnxSplash_getSupportedServiceNames,
- ::cppu::createSingleComponentFactory, 0, 0
+ ::cppu::createSingleComponentFactory, nullptr, 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
}
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index bf69ff2686c1..416d5cf09f7e 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -141,7 +141,7 @@ SplashScreenWindow::SplashScreenWindow(SplashScreen *pSplash)
void SplashScreenWindow::dispose()
{
- pSpl = NULL;
+ pSpl = nullptr;
IntroWindow::dispose();
}
diff --git a/desktop/source/splash/unxsplash.cxx b/desktop/source/splash/unxsplash.cxx
index 13daaefb714c..dbf9e7523614 100644
--- a/desktop/source/splash/unxsplash.cxx
+++ b/desktop/source/splash/unxsplash.cxx
@@ -31,7 +31,7 @@ namespace desktop
{
UnxSplashScreen::UnxSplashScreen( const uno::Reference< uno::XComponentContext >& xCtx )
: m_xCtx( xCtx ),
- m_pOutFd( NULL )
+ m_pOutFd( nullptr )
{
}
@@ -44,7 +44,7 @@ UnxSplashScreen::~UnxSplashScreen()
if ( m_pOutFd )
{
fclose( m_pOutFd );
- m_pOutFd = NULL;
+ m_pOutFd = nullptr;
}
}
diff --git a/desktop/unx/source/file_image.h b/desktop/unx/source/file_image.h
index 736ef57c0810..60fdc8e96a16 100644
--- a/desktop/unx/source/file_image.h
+++ b/desktop/unx/source/file_image.h
@@ -39,7 +39,7 @@ struct file_image_st
typedef struct file_image_st file_image;
-#define FILE_IMAGE_INITIALIZER { 0, 0 }
+#define FILE_IMAGE_INITIALIZER { NULL, 0 }
/** file_image_open.
diff --git a/desktop/unx/source/file_image_unx.c b/desktop/unx/source/file_image_unx.c
index fb677781cf65..c73e30b5134d 100644
--- a/desktop/unx/source/file_image_unx.c
+++ b/desktop/unx/source/file_image_unx.c
@@ -39,7 +39,7 @@ int file_image_open (file_image * image, const char * filename)
struct stat st;
void * p;
- if (image == 0)
+ if (image == NULL)
return EINVAL;
image->m_base = MAP_FAILED, image->m_size = 0;
@@ -53,7 +53,7 @@ int file_image_open (file_image * image, const char * filename)
goto cleanup_and_leave;
}
- p = mmap (0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
+ p = mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (p == MAP_FAILED)
{
result = errno;
@@ -78,10 +78,10 @@ int file_image_pagein (file_image * image)
// force touching of each page despite the optimizer
volatile char c =0;
- if (image == 0)
+ if (image == NULL)
return EINVAL;
- if ((w.m_base = image->m_base) == 0)
+ if ((w.m_base = image->m_base) == NULL)
return EINVAL;
if ((w.m_size = image->m_size) == 0)
return 0;
@@ -112,13 +112,13 @@ int file_image_pagein (file_image * image)
*/
int file_image_close (file_image * image)
{
- if (image == 0)
+ if (image == NULL)
return EINVAL;
if (munmap (image->m_base, image->m_size) == -1)
return errno;
- image->m_base = 0, image->m_size = 0;
+ image->m_base = NULL, image->m_size = 0;
return 0;
}
diff --git a/desktop/unx/source/pagein.c b/desktop/unx/source/pagein.c
index 67ca3670d5f4..7db52d83c1d6 100644
--- a/desktop/unx/source/pagein.c
+++ b/desktop/unx/source/pagein.c
@@ -46,7 +46,7 @@ void pagein_execute(char const * path, char const * file)
{
char fullpath[4096];
char *p = NULL;
- FILE * fp = 0;
+ FILE * fp = NULL;
memset(fullpath, 0, sizeof(fullpath));
strncpy (fullpath, path, 3000);
if (!(p = strrchr (fullpath, '/')))
@@ -55,13 +55,13 @@ void pagein_execute(char const * path, char const * file)
p++;
strncpy(p, file, 1024);
p[strlen(p)] = '\0';
- if ((fp = fopen (fullpath, "r")) == 0)
+ if ((fp = fopen (fullpath, "r")) == NULL)
{
fprintf (stderr, "fopen %s: %s\n", fullpath, strerror(errno));
return;
}
- while (fgets (p, 1024, fp) != 0)
+ while (fgets (p, 1024, fp) != NULL)
{
p[strlen(p) - 1] = '\0';
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index ce57afe85391..e26c5302f823 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -90,7 +90,7 @@ static int splash_load_bmp( struct splash* splash, const char *filename )
if ( !(file = fopen( filename, "r" ) ) )
return 0;
- splash->png_ptr = png_create_read_struct( PNG_LIBPNG_VER_STRING, 0, 0, 0 );
+ splash->png_ptr = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );
splash->info_ptr = png_create_info_struct(splash->png_ptr);
png_init_io( splash->png_ptr, file );
@@ -491,7 +491,7 @@ static int splash_create_window( struct splash* splash, int argc, char** argv )
size_hints.max_height = splash->height;
XSetStandardProperties( splash->display, splash->win, name, icon, None,
- 0, 0, &size_hints );
+ NULL, 0, &size_hints );
// the actual work
suppress_decorations(splash);
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 8803909adebf..525fe22927e0 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -256,7 +256,7 @@ get_md5hash( rtl_uString *pText )
return NULL;
digest = rtl_digest_create( rtl_Digest_AlgorithmMD5 );
- if ( digest == 0 )
+ if ( digest == NULL )
return NULL;
md5_key_len = rtl_digest_queryLength( digest );
@@ -654,7 +654,7 @@ exec_javaldx (Args *args)
rtl_uString *pTmp, *pTmp2;
oslProcess javaldx = NULL;
- oslFileHandle fileOut= 0;
+ oslFileHandle fileOut= NULL;
oslProcessError err;
ppArgs = (rtl_uString **)calloc( args->nArgsEnv + 2, sizeof( rtl_uString* ) );
@@ -739,7 +739,7 @@ exec_javaldx (Args *args)
#endif
// has to be a global :(
-oslProcess * volatile g_pProcess = 0;
+oslProcess * volatile g_pProcess = NULL;
void sigterm_handler(int ignored)
{
@@ -768,11 +768,11 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
memset(&sigpipe_action, 0, sizeof(struct sigaction));
sigpipe_action.sa_handler = SIG_IGN;
sigemptyset(&sigpipe_action.sa_mask);
- sigaction(SIGPIPE, &sigpipe_action, 0);
+ sigaction(SIGPIPE, &sigpipe_action, NULL);
memset(&sigterm_action, 0, sizeof(struct sigaction));
sigterm_action.sa_handler = &sigterm_handler;
sigemptyset(&sigterm_action.sa_mask);
- sigaction(SIGTERM, &sigterm_action, 0);
+ sigaction(SIGTERM, &sigterm_action, NULL);
args = args_parse ();
args->pAppPath = get_app_path( argv[0] );
@@ -884,7 +884,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
#endif
status = child_get_exit_code(info);
- g_pProcess = 0; // reset
+ g_pProcess = NULL; // reset
switch (status) {
case EXITHELPER_CRASH_WITH_RESTART: // re-start with just -env: parameters
#if OSL_DEBUG_LEVEL > 1