diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:14:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:25 +0100 |
commit | f19dda5a55156afda2c6dde6c51c455cc5657fc2 (patch) | |
tree | a0ec501f676cf5ec67aaf0eb3b8572dc1bad0db0 /extensions | |
parent | e1e967a1bb0f4e4fac50f353c990389ccc73a053 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I5bbef6c88255f3e8c740a5239a5010cf1251b7fa
Diffstat (limited to 'extensions')
83 files changed, 408 insertions, 408 deletions
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 9ba67da5e3b1..7e978e435a74 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -295,7 +295,7 @@ namespace abp // already a valid table selected return; - const sal_Char* pGuess = NULL; + const sal_Char* pGuess = nullptr; switch ( getSettings().eType ) { case AST_MORK : @@ -411,7 +411,7 @@ namespace abp default: OSL_FAIL("OAddessBookSourcePilot::createPage: invalid state!"); - return NULL; + return nullptr; } } diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index da41d1036a63..616a72decdde 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -325,7 +325,7 @@ namespace abp } ODataSource::ODataSource( const ODataSource& _rSource ) - :m_pImpl( NULL ) + :m_pImpl( nullptr ) { *this = _rSource; } @@ -536,7 +536,7 @@ namespace abp try { xInteractions.set( - InteractionHandler::createWithParent(m_pImpl->xORB, 0), + InteractionHandler::createWithParent(m_pImpl->xORB, nullptr), UNO_QUERY); } catch(const Exception&) diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx index 666950c9d9a7..d54b24e87cb5 100644 --- a/extensions/source/bibliography/bibbeam.cxx +++ b/extensions/source/bibliography/bibbeam.cxx @@ -171,8 +171,8 @@ namespace bib if ( m_xControl.is() ) { Reference< awt::XControl > xDel( m_xControl ); - m_xControl = NULL; - m_xGridWin = NULL; + m_xControl = nullptr; + m_xGridWin = nullptr; m_xControlContainer->removeControl( xDel ); xDel->dispose(); @@ -188,8 +188,8 @@ namespace bib BibBeamer::BibBeamer( vcl::Window* _pParent, BibDataManager* _pDM, WinBits _nStyle ) :BibSplitWindow( _pParent, _nStyle | WB_NOSPLITDRAW ) ,pDatMan( _pDM ) - ,pToolBar( NULL ) - ,pGridWin( NULL ) + ,pToolBar( nullptr ) + ,pGridWin( nullptr ) { createToolBar(); createGridWin(); @@ -212,7 +212,7 @@ namespace bib m_xToolBarRef->dispose(); if ( pToolBar ) - pDatMan->SetToolbar(0); + pDatMan->SetToolbar(nullptr); pToolBar.disposeAndClear(); pGridWin.disposeAndClear(); diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index 0a8b0ac2b66f..406067121a6a 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -301,7 +301,7 @@ const Mapping* BibConfig::GetMapping(const BibDBDescriptor& rDesc) const if(rDesc.sTableOrQuery == rMapping.sTableName && bURLEqual) return &rMapping; } - return 0; + return nullptr; } void BibConfig::SetMapping(const BibDBDescriptor& rDesc, const Mapping* pSetMapping) diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 6666fef2d626..5b27a5773efe 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -75,7 +75,7 @@ BibWindowContainer::BibWindowContainer( vcl::Window* pParent, BibShortCutHandler BibWindow( pParent, nStyle ), pChild( pChildWin ) { - if(pChild!=NULL) + if(pChild!=nullptr) { vcl::Window* pChildWindow = GetChild(); pChildWindow->SetParent(this); @@ -94,7 +94,7 @@ void BibWindowContainer::dispose() if( pChild ) { VclPtr<vcl::Window> pDel = GetChild(); - pChild = NULL; // prevents GetFocus for child while deleting! + pChild = nullptr; // prevents GetFocus for child while deleting! pDel.disposeAndClear(); } vcl::Window::dispose(); @@ -120,8 +120,8 @@ bool BibWindowContainer::HandleShortCutKey( const KeyEvent& rKeyEvent ) BibBookContainer::BibBookContainer(vcl::Window* pParent, WinBits nStyle): BibSplitWindow(pParent,nStyle), - pTopWin(NULL), - pBottomWin(NULL) + pTopWin(nullptr), + pBottomWin(nullptr) { pBibMod = OpenBibModul(); aIdle.SetIdleHdl(LINK( this, BibBookContainer, SplitHdl)); @@ -143,14 +143,14 @@ void BibBookContainer::dispose() if( pTopWin ) { VclPtr<vcl::Window> pDel = pTopWin; - pTopWin = NULL; // prevents GetFocus for child while deleting! + pTopWin = nullptr; // prevents GetFocus for child while deleting! pDel.disposeAndClear(); } if( pBottomWin ) { VclPtr<vcl::Window> pDel = pBottomWin; - pBottomWin = NULL; // prevents GetFocus for child while deleting! + pBottomWin = nullptr; // prevents GetFocus for child while deleting! pDel.disposeAndClear(); } diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx index 38e815afba3e..01100a02828a 100644 --- a/extensions/source/bibliography/bibcont.hxx +++ b/extensions/source/bibliography/bibcont.hxx @@ -56,7 +56,7 @@ class BibWindowContainer : public BibWindow //Window inline vcl::Window* BibWindowContainer::GetChild() { - return pChild ? pChild->GetWindow() : NULL; + return pChild ? pChild->GetWindow() : nullptr; } diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 8717542f1f69..9828ae669be0 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -138,8 +138,8 @@ public: }; BibliographyLoader::BibliographyLoader() : - m_pBibMod(0), - m_pDatMan(0) + m_pBibMod(nullptr), + m_pDatMan(nullptr) { } @@ -194,7 +194,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL bib_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { - void * pRet = 0; + void * pRet = nullptr; if (BibliographyLoader::getImplementationName_Static().equalsAscii( pImplName ) ) { // create the factory @@ -380,7 +380,7 @@ Reference< XNameAccess > BibliographyLoader::GetDataColumns() const Reference< XComponent > xSetComp(xRowSet, UNO_QUERY); if (xSetComp.is()) xSetComp->dispose(); - xRowSet = NULL; + xRowSet = nullptr; } else const_cast<BibliographyLoader*>(this)->m_xCursor = xRowSet.get(); diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx index df76903bbf80..ad627cd32fb3 100644 --- a/extensions/source/bibliography/bibmod.cxx +++ b/extensions/source/bibliography/bibmod.cxx @@ -30,7 +30,7 @@ #include "bibconfig.hxx" #include <ucbhelper/content.hxx> -static BibModul* pBibModul=NULL; +static BibModul* pBibModul=nullptr; static sal_uInt32 nBibModulCount=0; using namespace ::com::sun::star; @@ -41,7 +41,7 @@ using namespace ::com::sun::star::ucb; HdlBibModul OpenBibModul() { - if(pBibModul==NULL) + if(pBibModul==nullptr) { pBibModul=new BibModul(); } @@ -52,10 +52,10 @@ HdlBibModul OpenBibModul() void CloseBibModul(HdlBibModul ppBibModul) { nBibModulCount--; - if(nBibModulCount==0 && ppBibModul!=NULL) + if(nBibModulCount==0 && ppBibModul!=nullptr) { delete pBibModul; - pBibModul=NULL; + pBibModul=nullptr; } } @@ -63,7 +63,7 @@ BibResId::BibResId( sal_uInt16 nId ) : ResId( nId, *pBibModul->GetResMgr() ) { } -BibConfig* BibModul::pBibConfig = 0; +BibConfig* BibModul::pBibConfig = nullptr; BibModul::BibModul() { pResMgr = ResMgr::CreateResMgr( "bib" ); @@ -75,7 +75,7 @@ BibModul::~BibModul() if (pBibConfig && pBibConfig->IsModified()) pBibConfig->Commit(); delete pBibConfig; - pBibConfig = 0; + pBibConfig = nullptr; } BibDataManager* BibModul::createDataManager() diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index e497ee80f69a..88ac20693f62 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -51,7 +51,7 @@ namespace bib :BibWindow( _pParent, _nStyle ) ,m_pDatMan( _pManager ) ,m_xDatMan( _pManager ) - ,m_pGeneralPage( NULL ) + ,m_pGeneralPage( nullptr ) ,m_aFormControlContainer(this) { if ( m_xDatMan.is() ) @@ -103,7 +103,7 @@ namespace bib pGeneralPage->RemoveListeners(); pGeneralPage.disposeAndClear(); - m_xGeneralPage = NULL; + m_xGeneralPage = nullptr; BibWindow::dispose(); } @@ -118,7 +118,7 @@ namespace bib m_pGeneralPage->Hide(); m_pGeneralPage->RemoveListeners(); m_pGeneralPage.disposeAndClear(); - m_xGeneralPage = 0; + m_xGeneralPage = nullptr; } m_pGeneralPage = VclPtr<BibGeneralPage>::Create( this, m_pDatMan ); @@ -155,7 +155,7 @@ namespace bib } if(bExecute) { - Application::PostUserEvent( LINK( this, BibView, CallMappingHdl ), NULL, true ); + Application::PostUserEvent( LINK( this, BibView, CallMappingHdl ), nullptr, true ); } } } diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 34c7360f607a..8c3cb723b34b 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -112,7 +112,7 @@ Reference< XConnection > getConnection(const OUString& _rURL) Reference< XCompletedConnection > xComplConn(xDataSource, UNO_QUERY); try { - Reference<task::XInteractionHandler> xIHdl( task::InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW); + Reference<task::XInteractionHandler> xIHdl( task::InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY_THROW); xConn = xComplConn->connectWithCompletion(xIHdl); } catch (const SQLException&) @@ -159,7 +159,7 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm) if (!xReturn.is() || (xReturn->getElementNames().getLength() == 0)) { // no .... - xReturn = NULL; + xReturn = nullptr; // -> get the table the form is bound to and ask it for their columns Reference< XTablesSupplier > xSupplyTables( getConnection( _rxForm ), UNO_QUERY ); Reference< XPropertySet > xFormProps( _rxForm, UNO_QUERY ); @@ -618,10 +618,10 @@ OUString gViewSize("theViewSize"); BibDataManager::BibDataManager() :BibDataManager_Base( GetMutex() ) - ,m_pInterceptorHelper( NULL ) + ,m_pInterceptorHelper( nullptr ) ,m_aLoadListeners(m_aMutex) - ,pBibView( NULL ) - ,pToolbar(0) + ,pBibView( nullptr ) + ,pToolbar(nullptr) { } @@ -642,13 +642,13 @@ BibDataManager::~BibDataManager() xComp->dispose(); if(xConnection.is()) xConnection->dispose(); - m_xForm = NULL; + m_xForm = nullptr; } if( m_pInterceptorHelper ) { m_pInterceptorHelper->ReleaseInterceptor(); m_pInterceptorHelper->release(); - m_pInterceptorHelper = NULL; + m_pInterceptorHelper = nullptr; } } diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx index b74ac8b9ff7b..523a42128d1a 100644 --- a/extensions/source/bibliography/formcontrolcontainer.cxx +++ b/extensions/source/bibliography/formcontrolcontainer.cxx @@ -35,7 +35,7 @@ namespace bib FormControlContainer::FormControlContainer( ) :OLoadListener( m_aMutex ) - ,m_pFormAdapter( NULL ) + ,m_pFormAdapter( nullptr ) { } @@ -54,7 +54,7 @@ namespace bib { m_pFormAdapter->dispose(); m_pFormAdapter->release(); - m_pFormAdapter = NULL; + m_pFormAdapter = nullptr; } } diff --git a/extensions/source/bibliography/formcontrolcontainer.hxx b/extensions/source/bibliography/formcontrolcontainer.hxx index 4a9d37567a66..e5ce19c0682f 100644 --- a/extensions/source/bibliography/formcontrolcontainer.hxx +++ b/extensions/source/bibliography/formcontrolcontainer.hxx @@ -42,7 +42,7 @@ namespace bib FormControlContainer( ); virtual ~FormControlContainer( ); - bool isFormConnected() const { return NULL != m_pFormAdapter; } + bool isFormConnected() const { return nullptr != m_pFormAdapter; } void connectForm( const css::uno::Reference< css::form::XLoadable >& _rxForm ); void disconnectForm(); diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index dad48596571f..b280405c9e21 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -96,7 +96,7 @@ static const DispatchInfo SupportedCommandsArray[] = { ".uno:Bib/removeFilter" , frame::CommandGroup::DATA , true }, { ".uno:Bib/sdbsource" , frame::CommandGroup::DATA , true }, { ".uno:Bib/Mapping" , frame::CommandGroup::DATA , true }, - { 0 , 0 , false } + { nullptr , 0 , false } }; typedef std::unordered_map< OUString, CacheDispatchInfo, OUStringHash, ::std::equal_to< OUString > > CmdToInfoCache; @@ -112,7 +112,7 @@ const CmdToInfoCache& GetCommandToInfoCache() if ( !bCacheInitialized ) { sal_Int32 i( 0 ); - while ( SupportedCommandsArray[i].pCommand != 0 ) + while ( SupportedCommandsArray[i].pCommand != nullptr ) { OUString aCommand( OUString::createFromAscii( SupportedCommandsArray[i].pCommand )); @@ -140,7 +140,7 @@ public: BibFrameCtrl_Impl() : aLC( aMutex ) - , pController(0) + , pController(nullptr) {} virtual ~BibFrameCtrl_Impl(); @@ -171,7 +171,7 @@ BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWi :xWindow( xComponent ) ,m_xDatMan( pDataManager ) ,pDatMan( pDataManager ) - ,pBibMod(NULL) + ,pBibMod(nullptr) { vcl::Window* pParent = VCLUnoHelper::GetWindow( xWindow ); pParent->SetUniqueId(UID_BIB_FRAME_WINDOW); @@ -184,7 +184,7 @@ BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWi BibFrameController_Impl::~BibFrameController_Impl() { - pImp->pController = NULL; + pImp->pController = nullptr; pImp->release(); delete pDatMan; if(pBibMod) @@ -255,8 +255,8 @@ void BibFrameController_Impl::dispose() throw (css::uno::RuntimeException, std:: lang::EventObject aObject; aObject.Source = static_cast<XController*>(this); pImp->aLC.disposeAndClear(aObject); - m_xDatMan = 0; - pDatMan = 0; + m_xDatMan = nullptr; + pDatMan = nullptr; aStatusListeners.clear(); } @@ -400,7 +400,7 @@ static vcl::Window* lcl_GetFocusChild( vcl::Window* pParent ) if(pSubChild) return pSubChild; } - return 0; + return nullptr; } //class XDispatch diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 11c30663c97a..d8af447efee7 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -210,7 +210,7 @@ BibGeneralPage::BibGeneralPage(vcl::Window* pParent, BibDataManager* pMan): sal_Int16* pMap = nFT2CtrlMap; for( sal_uInt16 i = 0 ; i < FIELD_COUNT ; ++i, ++pMap ) { - aControls[ i ] = 0; + aControls[ i ] = nullptr; *pMap = -1; } @@ -399,7 +399,7 @@ void BibGeneralPage::RemoveListeners() { uno::Reference< awt::XWindow > xCtrWin(aControls[i], uno::UNO_QUERY ); xCtrWin->removeFocusListener( mxBibGeneralPageFocusListener.get() ); - aControls[i] = 0; + aControls[i] = nullptr; } } } diff --git a/extensions/source/bibliography/loadlisteneradapter.cxx b/extensions/source/bibliography/loadlisteneradapter.cxx index f42bad9fe5fe..505155ccdfba 100644 --- a/extensions/source/bibliography/loadlisteneradapter.cxx +++ b/extensions/source/bibliography/loadlisteneradapter.cxx @@ -47,7 +47,7 @@ namespace bib if ( m_pAdapter ) { m_pAdapter->release(); - m_pAdapter = NULL; + m_pAdapter = nullptr; } } @@ -61,7 +61,7 @@ namespace bib OComponentAdapterBase::OComponentAdapterBase( const Reference< XComponent >& _rxComp, bool _bAutoRelease ) :m_xComponent( _rxComp ) - ,m_pListener( NULL ) + ,m_pListener( nullptr ) ,m_nLockCount( 0 ) ,m_bListening( false ) ,m_bAutoRelease( _bAutoRelease ) @@ -97,13 +97,13 @@ namespace bib disposing(); - m_pListener->setAdapter(NULL); + m_pListener->setAdapter(nullptr); - m_pListener = NULL; + m_pListener = nullptr; m_bListening = false; if (m_bAutoRelease) - m_xComponent = NULL; + m_xComponent = nullptr; } } @@ -116,14 +116,14 @@ namespace bib { // disconnect the listener if ( m_pListener ) // may have been reset whilest calling into _disposing - m_pListener->setAdapter( NULL ); + m_pListener->setAdapter( nullptr ); } - m_pListener = NULL; + m_pListener = nullptr; m_bListening = false; if ( m_bAutoRelease ) - m_xComponent = NULL; + m_xComponent = nullptr; } OLoadListenerAdapter::OLoadListenerAdapter( const Reference< XLoadable >& _rxLoadable, bool _bAutoRelease ) diff --git a/extensions/source/bibliography/loadlisteneradapter.hxx b/extensions/source/bibliography/loadlisteneradapter.hxx index 6738d3c27dd7..90880fc12e13 100644 --- a/extensions/source/bibliography/loadlisteneradapter.hxx +++ b/extensions/source/bibliography/loadlisteneradapter.hxx @@ -41,7 +41,7 @@ namespace bib ::osl::Mutex& m_rMutex; protected: explicit OComponentListener( ::osl::Mutex& _rMutex ) - :m_pAdapter( NULL ) + :m_pAdapter( nullptr ) ,m_rMutex( _rMutex ) { } diff --git a/extensions/source/config/ldap/componentdef.cxx b/extensions/source/config/ldap/componentdef.cxx index bef165037838..a93ea4014049 100644 --- a/extensions/source/config/ldap/componentdef.cxx +++ b/extensions/source/config/ldap/componentdef.cxx @@ -38,10 +38,10 @@ static const cppu::ImplementationEntry kImplementations_entries[] = LdapUserProfileBe::getLdapUserProfileBeName, LdapUserProfileBe::getLdapUserProfileBeServiceNames, cppu::createSingleComponentFactory, - NULL, + nullptr, 0 }, - { NULL, NULL, NULL, NULL, NULL, 0 } + { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } } ; diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index 77d6901ddccd..016f66e581aa 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -34,7 +34,7 @@ typedef int LdapErrCode; struct LdapMessageHolder: private boost::noncopyable { - LdapMessageHolder() : msg(0) {} + LdapMessageHolder() : msg(nullptr) {} ~LdapMessageHolder() { if (msg) @@ -52,10 +52,10 @@ LdapConnection::~LdapConnection() void LdapConnection::disconnect() { - if (mConnection != NULL) + if (mConnection != nullptr) { ldap_unbind_s(mConnection) ; - mConnection = NULL; + mConnection = nullptr; } } @@ -68,17 +68,17 @@ static void checkLdapReturnCode(const sal_Char *aOperation, OUStringBuffer message; - if (aOperation != NULL) + if (aOperation != nullptr) { message.appendAscii(aOperation).append(": ") ; } message.appendAscii(ldap_err2string(aRetCode)).append(" (") ; - sal_Char *stub = NULL ; + sal_Char *stub = nullptr ; #ifndef LDAP_OPT_SIZELIMIT // for use with OpenLDAP ldap_get_lderrno(aConnection, NULL, &stub) ; #endif - if (stub != NULL) + if (stub != nullptr) { message.appendAscii(stub) ; // It would seem the message returned is actually @@ -91,7 +91,7 @@ static void checkLdapReturnCode(const sal_Char *aOperation, else { message.append("No additional information") ; } message.append(")") ; throw ldap::LdapGenericException(message.makeStringAndClear(), - NULL, aRetCode) ; + nullptr, aRetCode) ; } void LdapConnection::connectSimple(const LdapDefinition& aDefinition) @@ -166,7 +166,7 @@ void LdapConnection::initConnection() mConnection = ldap_init(OUStringToOString( mLdapDefinition.mServer, RTL_TEXTENCODING_UTF8 ).getStr(), mLdapDefinition.mPort) ; #endif - if (mConnection == NULL) + if (mConnection == nullptr) { OUStringBuffer message ; @@ -183,7 +183,7 @@ void LdapConnection::initConnection() throw (lang::IllegalArgumentException, ldap::LdapConnectionException, ldap::LdapGenericException) { - OSL_ASSERT(data != 0); + OSL_ASSERT(data != nullptr); if (!isValid()) { connectSimple(); } OUString aUserDn =findUserDn( aUser ); @@ -202,7 +202,7 @@ void LdapConnection::initConnection() OUStringToOString( aUserDn, RTL_TEXTENCODING_UTF8 ).getStr(), LDAP_SCOPE_BASE, "(objectclass=*)", - 0, + nullptr, 0, // Attributes + values &result.msg) ; #endif @@ -247,7 +247,7 @@ void LdapConnection::initConnection() { throw lang::IllegalArgumentException( "LdapConnection::findUserDn -User id is empty", - NULL, 0) ; + nullptr, 0) ; } @@ -265,7 +265,7 @@ void LdapConnection::initConnection() LDAP_SCOPE_SUBTREE, (PWCHAR) filter.makeStringAndClear().getStr(), attributes, 0, &result.msg) ; #else - sal_Char * attributes [2] = { const_cast<sal_Char *>(LDAP_NO_ATTRS), NULL }; + sal_Char * attributes [2] = { const_cast<sal_Char *>(LDAP_NO_ATTRS), nullptr }; LdapErrCode retCode = ldap_search_s(mConnection, OUStringToOString( mLdapDefinition.mBaseDN, RTL_TEXTENCODING_UTF8 ).getStr(), LDAP_SCOPE_SUBTREE, @@ -275,7 +275,7 @@ void LdapConnection::initConnection() OUString userDn ; LDAPMessage *entry = ldap_first_entry(mConnection, result.msg) ; - if (entry != NULL) + if (entry != nullptr) { #ifdef WNT PWCHAR charsDn = ldap_get_dnW(mConnection, entry) ; diff --git a/extensions/source/config/ldap/ldapaccess.hxx b/extensions/source/config/ldap/ldapaccess.hxx index 3ca79a24a193..98ef263019e3 100644 --- a/extensions/source/config/ldap/ldapaccess.hxx +++ b/extensions/source/config/ldap/ldapaccess.hxx @@ -79,7 +79,7 @@ class LdapConnection public: /** Default constructor */ - LdapConnection() : mConnection(NULL),mLdapDefinition() {} + LdapConnection() : mConnection(nullptr),mLdapDefinition() {} /** Destructor, releases the connection */ ~LdapConnection() ; /** Make connection to LDAP server */ @@ -118,7 +118,7 @@ private: Indicates whether the connection is in a valid state. @return sal_True if connection is valid, sal_False otherwise */ - bool isValid() const { return mConnection != NULL ; } + bool isValid() const { return mConnection != nullptr ; } void connectSimple() throw (ldap::LdapConnectionException, diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx index dfb8a60f7c13..f86cb8b08439 100644 --- a/extensions/source/config/ldap/ldapuserprofilebe.cxx +++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx @@ -63,7 +63,7 @@ LdapUserProfileBe::LdapUserProfileBe( const uno::Reference<uno::XComponentContex { throw css::uno::RuntimeException( OUString("LdapUserProfileBe- LDAP not configured"), - NULL); + nullptr); } bReentrantCall = false ; @@ -90,7 +90,7 @@ bool LdapUserProfileBe::readLdapConfiguration( css::uno::Reference< css::uno::XComponentContext > const & context, LdapDefinition * definition, OUString * loggedOnUser) { - OSL_ASSERT(context.is() && definition != 0 && loggedOnUser != 0); + OSL_ASSERT(context.is() && definition != nullptr && loggedOnUser != nullptr); const OUString kReadOnlyViewService("com.sun.star.configuration.ConfigurationAccess") ; const OUString kComponent("org.openoffice.LDAP/UserDirectory"); const OUString kServerDefiniton("ServerDefinition"); diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index e0e01c3f2f0d..dbd3ed256af9 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -378,9 +378,9 @@ namespace dbp OMaybeListSelectionPage::OMaybeListSelectionPage( OControlWizard* _pParent, const OString& _rID, const OUString& _rUIXMLDescription ) :OControlWizardPage(_pParent, _rID, _rUIXMLDescription) - ,m_pYes(NULL) - ,m_pNo(NULL) - ,m_pList(NULL) + ,m_pYes(nullptr) + ,m_pNo(nullptr) + ,m_pList(nullptr) { } diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index f758757d2fe3..2e8f25329dbb 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -75,12 +75,12 @@ namespace dbp OControlWizardPage::OControlWizardPage( OControlWizard* _pParent, const OString& rID, const OUString& rUIXMLDescription ) :OControlWizardPage_Base( _pParent, rID, rUIXMLDescription ) - ,m_pFormDatasourceLabel(NULL) - ,m_pFormDatasource(NULL) - ,m_pFormContentTypeLabel(NULL) - ,m_pFormContentType(NULL) - ,m_pFormTableLabel(NULL) - ,m_pFormTable(NULL) + ,m_pFormDatasourceLabel(nullptr) + ,m_pFormDatasource(nullptr) + ,m_pFormContentTypeLabel(nullptr) + ,m_pFormContentType(nullptr) + ,m_pFormTableLabel(nullptr) + ,m_pFormTable(nullptr) { } @@ -472,7 +472,7 @@ namespace dbp Reference< XInteractionHandler > xHandler; try { - xHandler.set( InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY_THROW ); + xHandler.set( InteractionHandler::createWithParent(m_xContext, nullptr), UNO_QUERY_THROW ); } catch(const Exception&) { } if (!xHandler.is()) diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 35f190f712ac..391fc5a3189f 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -85,7 +85,7 @@ namespace dbp return VclPtr<OFinalizeGBWPage>::Create(this); } - return NULL; + return nullptr; } diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx index 44b5311a1f21..87414f1a4de0 100644 --- a/extensions/source/inc/componentmodule.cxx +++ b/extensions/source/inc/componentmodule.cxx @@ -58,7 +58,7 @@ namespace COMPMOD_NAMESPACE OModuleImpl::OModuleImpl() - :m_pResources(NULL) + :m_pResources(nullptr) ,m_bInitialized(false) { } @@ -91,7 +91,7 @@ namespace COMPMOD_NAMESPACE ::osl::Mutex OModule::s_aMutex; sal_Int32 OModule::s_nClients = 0; - OModuleImpl* OModule::s_pImpl = NULL; + OModuleImpl* OModule::s_pImpl = nullptr; OString OModule::s_sResPrefix; ResMgr* OModule::getResManager() @@ -123,7 +123,7 @@ namespace COMPMOD_NAMESPACE if (!--s_nClients && s_pImpl) { delete s_pImpl; - s_pImpl = NULL; + s_pImpl = nullptr; } } @@ -140,10 +140,10 @@ namespace COMPMOD_NAMESPACE //- registration helper - Sequence< OUString >* OModule::s_pImplementationNames = NULL; - Sequence< Sequence< OUString > >* OModule::s_pSupportedServices = NULL; - Sequence< sal_Int64 >* OModule::s_pCreationFunctionPointers = NULL; - Sequence< sal_Int64 >* OModule::s_pFactoryFunctionPointers = NULL; + Sequence< OUString >* OModule::s_pImplementationNames = nullptr; + Sequence< Sequence< OUString > >* OModule::s_pSupportedServices = nullptr; + Sequence< sal_Int64 >* OModule::s_pCreationFunctionPointers = nullptr; + Sequence< sal_Int64 >* OModule::s_pFactoryFunctionPointers = nullptr; void OModule::registerComponent( @@ -212,10 +212,10 @@ namespace COMPMOD_NAMESPACE if (s_pImplementationNames->getLength() == 0) { - delete s_pImplementationNames; s_pImplementationNames = NULL; - delete s_pSupportedServices; s_pSupportedServices = NULL; - delete s_pCreationFunctionPointers; s_pCreationFunctionPointers = NULL; - delete s_pFactoryFunctionPointers; s_pFactoryFunctionPointers = NULL; + delete s_pImplementationNames; s_pImplementationNames = nullptr; + delete s_pSupportedServices; s_pSupportedServices = nullptr; + delete s_pCreationFunctionPointers; s_pCreationFunctionPointers = nullptr; + delete s_pFactoryFunctionPointers; s_pFactoryFunctionPointers = nullptr; } } @@ -230,7 +230,7 @@ namespace COMPMOD_NAMESPACE if (!s_pImplementationNames) { OSL_FAIL("OModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); - return NULL; + return nullptr; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, "OModule::getComponentFactory : inconsistent state (the pointers) !"); @@ -256,7 +256,7 @@ namespace COMPMOD_NAMESPACE const FactoryInstantiation FactoryInstantiationFunction = reinterpret_cast<const FactoryInstantiation>(*pFactoryFunction); const ComponentInstantiation ComponentInstantiationFunction = reinterpret_cast<const ComponentInstantiation>(*pComponentFunction); - xReturn = FactoryInstantiationFunction( _rxServiceManager, *pImplName, ComponentInstantiationFunction, *pServices, NULL); + xReturn = FactoryInstantiationFunction( _rxServiceManager, *pImplName, ComponentInstantiationFunction, *pServices, nullptr); if (xReturn.is()) { xReturn->acquire(); @@ -265,7 +265,7 @@ namespace COMPMOD_NAMESPACE } } - return NULL; + return nullptr; } diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx index 1e2c6839e289..ed2584396ac3 100644 --- a/extensions/source/logging/consolehandler.cxx +++ b/extensions/source/logging/consolehandler.cxx @@ -133,7 +133,7 @@ namespace logging void SAL_CALL ConsoleHandler::disposing() { - m_aHandlerHelper.setFormatter( NULL ); + m_aHandlerHelper.setFormatter( nullptr ); } diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index 52f644a46fc9..0a0b71f8b433 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -240,7 +240,7 @@ namespace logging } m_pFile.reset(); - m_aHandlerHelper.setFormatter( NULL ); + m_aHandlerHelper.setFormatter( nullptr ); } diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx index 218b71267393..19ef3e4d4d17 100644 --- a/extensions/source/logging/loggerconfig.cxx +++ b/extensions/source/logging/loggerconfig.cxx @@ -128,7 +128,7 @@ namespace logging oslProcessIdentifier aProcessId = 0; oslProcessInfo info; info.Size = sizeof (oslProcessInfo); - if ( osl_getProcessInfo ( 0, osl_Process_IDENTIFIER, &info ) == osl_Process_E_None) + if ( osl_getProcessInfo ( nullptr, osl_Process_IDENTIFIER, &info ) == osl_Process_E_None) aProcessId = info.Ident; rtl::OUString aPID = OUString::number( aProcessId ); @@ -177,7 +177,7 @@ namespace logging const Reference< XNameAccess >& _rxLoggerSettings, const sal_Char* _pServiceNameAsciiNodeName, const sal_Char* _pServiceSettingsAsciiNodeName, - SettingTranslation _pSettingTranslation = NULL + SettingTranslation _pSettingTranslation = nullptr ) { Reference< XInterface > xInstance; diff --git a/extensions/source/logging/loghandler.cxx b/extensions/source/logging/loghandler.cxx index a2022b9d724f..b8fa802fe643 100644 --- a/extensions/source/logging/loghandler.cxx +++ b/extensions/source/logging/loghandler.cxx @@ -49,7 +49,7 @@ namespace logging LogHandlerHelper::LogHandlerHelper( const Reference< XComponentContext >& _rxContext, ::osl::Mutex& _rMutex, ::cppu::OBroadcastHelper& _rBHelper ) :m_eEncoding( RTL_TEXTENCODING_UTF8 ) ,m_nLevel( LogLevel::SEVERE ) - ,m_xFormatter( NULL ) + ,m_xFormatter( nullptr ) ,m_xContext( _rxContext ) ,m_rMutex( _rMutex ) ,m_rBHelper( _rBHelper ) diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx index 02e6871261c0..478562aa7035 100644 --- a/extensions/source/plugin/base/context.cxx +++ b/extensions/source/plugin/base/context.cxx @@ -273,7 +273,7 @@ FileSink::FileSink( const Reference< css::uno::XComponentContext > & rxContext, m_xPlugin( plugin ), m_aTarget( target ) { - osl::FileBase::createTempFile( 0, 0, &m_aFileName ); + osl::FileBase::createTempFile( nullptr, nullptr, &m_aFileName ); OString aFile = OUStringToOString( m_aFileName, osl_getThreadTextEncoding() ); fp = fopen( aFile.getStr() , "wb" ); diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx index 8b1d120733e7..0fa54e367c12 100644 --- a/extensions/source/plugin/base/manager.cxx +++ b/extensions/source/plugin/base/manager.cxx @@ -59,7 +59,7 @@ #include <cppuhelper/supportsservice.hxx> -PluginManager* PluginManager::pManager = NULL; +PluginManager* PluginManager::pManager = nullptr; PluginManager& PluginManager::get() { @@ -154,7 +154,7 @@ XPlugin_Impl* XPluginManager_Impl::getXPluginFromNPP( NPP instance ) return *iter; } - return NULL; + return nullptr; } XPlugin_Impl* XPluginManager_Impl::getPluginImplementation( const Reference< css::plugin::XPlugin >& plugin ) @@ -167,7 +167,7 @@ XPlugin_Impl* XPluginManager_Impl::getPluginImplementation( const Reference< css return *iter; } - return NULL; + return nullptr; } Sequence<css::plugin::PluginDescription> XPluginManager_Impl::getPluginDescriptions() @@ -226,7 +226,7 @@ Reference< css::plugin::XPlugin > XPluginManager_Impl::createPluginFromURL( con if( ! pImpl->getPluginComm() ) { pImpl->dispose(); - xRef = NULL; + xRef = nullptr; } return xRef; diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx index 865fed5b88b8..21dbb45324dd 100644 --- a/extensions/source/plugin/base/nfuncs.cxx +++ b/extensions/source/plugin/base/nfuncs.cxx @@ -100,13 +100,13 @@ extern "C" { TRACE( "NPN_GetJavaEnv" ); // no java in this program - return NULL; + return nullptr; } jref SAL_CALL NP_LOADDS NPN_GetJavaPeer( NPP /*instance*/ ) { TRACE( "NPN_GetJavaPeer" ); - return NULL; + return nullptr; } } @@ -284,7 +284,7 @@ extern "C" { // stream will be fed back to plugin, // notify immediately after destruction of stream pImpl->addPluginEventListener( pListener ); - pListener = NULL; + pListener = nullptr; } pAsync->aUrl = OStringToOUString( aLoadURL, pImpl->getTextEncoding() ); pAsync->aTarget = OStringToOUString( target, pImpl->getTextEncoding() ); @@ -347,7 +347,7 @@ extern "C" { // stream will be fed back to plugin, // notify immediately after destruction of stream pImpl->addPluginEventListener( pListener ); - pListener = NULL; + pListener = nullptr; } try @@ -408,8 +408,8 @@ extern "C" { ::std::list<XPlugin_Impl*>& rList = PluginManager::get().getPlugins(); ::std::list<XPlugin_Impl*>::iterator iter; - XPlugin_Impl* pPlugin = NULL; - PluginStream* pStream = NULL; + XPlugin_Impl* pPlugin = nullptr; + PluginStream* pStream = nullptr; for( iter = rList.begin(); iter!= rList.end(); ++iter ) { pStream = (*iter)->getStreamFromNPStream( stream ); diff --git a/extensions/source/plugin/base/plctrl.cxx b/extensions/source/plugin/base/plctrl.cxx index 0ff4c8c77564..918715599d4f 100644 --- a/extensions/source/plugin/base/plctrl.cxx +++ b/extensions/source/plugin/base/plctrl.cxx @@ -39,7 +39,7 @@ #include <toolkit/helper/vclunohelper.hxx> PluginControl_Impl::PluginControl_Impl() - : _pMultiplexer( NULL ) + : _pMultiplexer( nullptr ) , _nX( 0 ) , _nY( 0 ) , _nWidth( 100 ) @@ -48,7 +48,7 @@ PluginControl_Impl::PluginControl_Impl() , _bVisible(false) , _bInDesignMode(false) , _bEnable(true) - , _pSysChild(NULL) + , _pSysChild(nullptr) { } @@ -146,7 +146,7 @@ void PluginControl_Impl::releasePeer() { _xParentWindow->removeFocusListener( this ); _xPeerWindow->dispose(); - _pSysChild = NULL; + _pSysChild = nullptr; _xPeerWindow.clear(); _xPeer.clear(); getMultiplexer()->setPeer( Reference< css::awt::XWindow > () ); diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx index 40c4824b28f6..f40de1dc4aa5 100644 --- a/extensions/source/plugin/base/service.cxx +++ b/extensions/source/plugin/base/service.cxx @@ -60,7 +60,7 @@ extern "C" { void* /*pXUnoKey*/ ) { - void* pRet = 0; + void* pRet = nullptr; OUString aImplName( OUString::createFromAscii( pImplementationName ) ); diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index 133f072aa978..43d09edbf731 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -115,16 +115,16 @@ Any XPlugin_Impl::queryAggregation( const Type& type ) throw( RuntimeException, XPlugin_Impl::XPlugin_Impl( const uno::Reference< css::lang::XMultiServiceFactory > & rSMgr) : PluginControl_Impl(), m_xSMgr( rSMgr ), - m_pPluginComm( NULL ), + m_pPluginComm( nullptr ), m_pSysPlugData( CreateSysPlugData() ), m_aEncoding( osl_getThreadTextEncoding() ), - m_pArgv( NULL ), - m_pArgn( NULL ), + m_pArgv( nullptr ), + m_pArgn( nullptr ), m_nArgs( 0 ), m_aPluginMode( NP_FULL ), m_nProvidingState( PROVIDING_NONE ), m_nCalledFromPlugin( 0 ), - m_pDisposer( NULL ), + m_pDisposer( nullptr ), m_bIsDisposed( false ) { memset( &m_aInstance, 0, sizeof( m_aInstance ) ); @@ -142,14 +142,14 @@ void XPlugin_Impl::destroyInstance() { Guard< Mutex > aGuard( m_aMutex ); - NPSavedData* pSavedData = NULL; + NPSavedData* pSavedData = nullptr; destroyStreams(); if( getPluginComm() ) { getPluginComm()->NPP_Destroy( this, &pSavedData ); getPluginComm()->decRef(); - m_pPluginComm = NULL; + m_pPluginComm = nullptr; } freeArgs(); @@ -212,7 +212,7 @@ IMPL_LINK_NOARG_TYPED( XPlugin_Impl, secondLevelDispose, void*, void ) if (m_pDisposer) { m_pDisposer->release(); - m_pDisposer = NULL; + m_pDisposer = nullptr; } uno::Reference< XPlugin > xProtection( this ); @@ -222,7 +222,7 @@ IMPL_LINK_NOARG_TYPED( XPlugin_Impl, secondLevelDispose, void*, void ) Guard< Mutex > aPluginGuard( ::PluginManager::get().getPluginMutex() ); rList.remove( this ); } - m_aNPWindow.window = NULL; + m_aNPWindow.window = nullptr; #ifndef UNX // acrobat does an unconditional XtParent on the windows widget getPluginComm()->NPP_SetWindow( this ); @@ -533,7 +533,7 @@ void XPlugin_Impl::loadPlugin() pEnvData->mpNSView ); #elif defined UNX // need a new PluginComm - PluginComm* pComm = NULL; + PluginComm* pComm = nullptr; int sv[2]; if( !socketpair( AF_UNIX, SOCK_STREAM, 0, sv ) ) pComm = new UnxPluginComm( m_aDescription.Mimetype, @@ -565,9 +565,9 @@ void XPlugin_Impl::loadPlugin() &getNPPInstance(), m_aPluginMode == PluginMode::FULL ? NP_FULL : NP_EMBED, ::sal::static_int_cast< int16_t, int >( m_nArgs ), - const_cast<char**>(m_nArgs ? m_pArgn : NULL), - const_cast<char**>(m_nArgs ? m_pArgv : NULL), - NULL ); + const_cast<char**>(m_nArgs ? m_pArgn : nullptr), + const_cast<char**>(m_nArgs ? m_pArgv : nullptr), + nullptr ); #ifdef MACOSX // m_aNPWindow is set up in the MacPluginComm from the view SetSysPlugDataParentView(*pEnvData); @@ -579,9 +579,9 @@ void XPlugin_Impl::loadPlugin() } else { - m_aNPWindow.window = NULL; + m_aNPWindow.window = nullptr; } - m_aNPWindow.ws_info = NULL; + m_aNPWindow.ws_info = nullptr; #else m_aNPWindow.window = (void*)pEnvData->hWnd; #endif @@ -645,7 +645,7 @@ PluginStream* XPlugin_Impl::getStreamFromNPStream( NPStream* stream ) if( &(*iter2)->getStream() == stream ) return *iter2; - return NULL; + return nullptr; } sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, @@ -966,7 +966,7 @@ PluginInputStream::PluginInputStream( XPlugin_Impl* pPlugin, sal_uInt32 len, sal_uInt32 lastmod ) : PluginStream( pPlugin, url, len, lastmod ), - m_pContent( NULL ), + m_pContent( nullptr ), m_nMode( NP_NORMAL ), m_nWritePos( 0 ) { @@ -975,7 +975,7 @@ PluginInputStream::PluginInputStream( XPlugin_Impl* pPlugin, m_pPlugin->getInputStreams().push_back( this ); OUString aTmpFile; - osl::FileBase::createTempFile( 0, 0, &aTmpFile ); + osl::FileBase::createTempFile( nullptr, nullptr, &aTmpFile ); // set correct extension, some plugins need that OUString aName( m_aNPStream.url, strlen( m_aNPStream.url ), m_pPlugin->getTextEncoding() ); @@ -993,7 +993,7 @@ PluginInputStream::PluginInputStream( XPlugin_Impl* pPlugin, if( ! m_aFileStream.IsOpen() ) { // might be that the extension scrambled the whole filename - osl::FileBase::createTempFile( 0, 0, &aTmpFile ); + osl::FileBase::createTempFile( nullptr, nullptr, &aTmpFile ); m_aFileStream.Open( aTmpFile, StreamMode::READ | StreamMode::WRITE ); } } @@ -1083,7 +1083,7 @@ void PluginInputStream::setMode( sal_Int32 nMode ) if (m_nMode == -1) { m_pPlugin->getInputStreams().remove( this ); - m_pPlugin = NULL; + m_pPlugin = nullptr; m_wPlugin.clear(); } } diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx index 6f919204a374..85d74184a05b 100644 --- a/extensions/source/plugin/inc/plugin/impl.hxx +++ b/extensions/source/plugin/inc/plugin/impl.hxx @@ -361,7 +361,7 @@ public: PluginInputStream( XPlugin_Impl* pPlugin, const char* url, sal_uInt32 len, sal_uInt32 lastmod ); - PluginInputStream() : PluginStream( NULL, NULL, 0, 0 ) {} + PluginInputStream() : PluginStream( nullptr, nullptr, 0, 0 ) {} virtual ~PluginInputStream(); diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx index b44a918bc1ba..8c8dbcf94602 100644 --- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx +++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx @@ -46,9 +46,9 @@ struct MediatorMessage char* m_pRun; MediatorMessage() : m_nID( 0 ), m_nBytes( 0 ), - m_pBytes( NULL ), m_pRun( NULL ) {} + m_pBytes( nullptr ), m_pRun( nullptr ) {} MediatorMessage( sal_uLong nID, sal_uLong nBytes, char* pBytes ) : - m_nID( nID ),m_nBytes( nBytes ), m_pRun( NULL ) + m_nID( nID ),m_nBytes( nBytes ), m_pRun( nullptr ) { m_pBytes = new char[ m_nBytes ]; memcpy( m_pBytes, pBytes, (size_t)m_nBytes ); diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx index 4aecda071328..390c960a1d03 100644 --- a/extensions/source/plugin/unx/mediator.cxx +++ b/extensions/source/plugin/unx/mediator.cxx @@ -38,7 +38,7 @@ Mediator::Mediator( int nSocket ) : m_nSocket( nSocket ), - m_pListener( NULL ), + m_pListener( nullptr ), m_nCurrentID( 1 ), m_bValid( true ) { @@ -52,9 +52,9 @@ Mediator::~Mediator() { { ::osl::MutexGuard aGuard( m_pListener->m_aMutex ); - m_pListener->m_pMediator = NULL; + m_pListener->m_pMediator = nullptr; } - m_pListener = NULL; + m_pListener = nullptr; if( m_bValid ) { sal_uLong aHeader[3]; @@ -151,7 +151,7 @@ MediatorMessage* Mediator::WaitForAnswer( sal_uLong nMessageID ) } WaitForMessage( 10 ); } - return NULL; + return nullptr; } MediatorMessage* Mediator::GetNextMessage( bool bWait ) @@ -172,11 +172,11 @@ MediatorMessage* Mediator::GetNextMessage( bool bWait ) } } if( ! bWait ) - return NULL; + return nullptr; } WaitForMessage(); } - return NULL; + return nullptr; } MediatorMessage* Mediator::TransactMessage( sal_uLong nBytes, char* pBytes ) @@ -248,7 +248,7 @@ void MediatorListener::onTerminated() if( m_pMediator ) { m_pMediator->m_aConnectionLostHdl.Call( m_pMediator ); - m_pMediator->m_pListener = NULL; + m_pMediator->m_pListener = nullptr; } delete this; } @@ -278,7 +278,7 @@ void* MediatorMessage::GetBytes( sal_uLong& rBytes ) sal_uLong nBytes = ExtractULONG(); if( nBytes == 0 ) - return NULL; + return nullptr; SAL_WARN_IF( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "extensions.plugin", @@ -301,7 +301,7 @@ char* MediatorMessage::GetString() sal_uLong nBytes = ExtractULONG(); if( nBytes == 0 ) - return NULL; + return nullptr; SAL_WARN_IF( (sal_uLong)(m_pRun - m_pBytes) >= m_nBytes, "extensions.plugin", diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx index 5330c823bb04..3a7eca7b04a5 100644 --- a/extensions/source/plugin/unx/npnapi.cxx +++ b/extensions/source/plugin/unx/npnapi.cxx @@ -200,7 +200,7 @@ static NPError l_NPN_NewStream( NPP instance, NPMIMEType type, const char* targe pStream->url = pMes->GetString(); pStream->end = pMes->GetUINT32(); pStream->lastmodified = pMes->GetUINT32(); - pStream->ndata = pStream->pdata = pStream->notifyData = NULL; + pStream->ndata = pStream->pdata = pStream->notifyData = nullptr; pConnector->getStreamList().push_back( pStream ); *stream = pStream; @@ -314,7 +314,7 @@ static void l_NPN_Status( NPP instance, const char* message ) static const char* l_NPN_UserAgent( NPP instance ) { - static char* pAgent = NULL; + static char* pAgent = nullptr; sal_uInt32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) @@ -470,8 +470,8 @@ static NPNetscapeFuncs aNetscapeFuncs = l_NPN_GetJavaEnv, l_NPN_GetJavaPeer, # else - NULL, - NULL, + nullptr, + nullptr, # endif l_NPN_GetURLNotify, l_NPN_PostURLNotify, @@ -486,27 +486,27 @@ static NPPluginFuncs aPluginFuncs = { sizeof(aPluginFuncs), (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr }; -oslModule pPluginLib = NULL; -char*(*pNPP_GetMIMEDescription)() = NULL; -NPError (*pNP_Initialize)(NPNetscapeFuncs*,NPPluginFuncs*) = NULL; -NPError (*pNP_Shutdown)() = NULL; +oslModule pPluginLib = nullptr; +char*(*pNPP_GetMIMEDescription)() = nullptr; +NPError (*pNP_Initialize)(NPNetscapeFuncs*,NPPluginFuncs*) = nullptr; +NPError (*pNP_Shutdown)() = nullptr; std::vector< PluginConnector* > PluginConnector::allConnectors; @@ -560,7 +560,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void ) if( pInst->pShell ) XtDestroyWidget( static_cast<Widget>(pInst->pShell) ); - pInst->pWidget = pInst->pShell = NULL; + pInst->pWidget = pInst->pShell = nullptr; // the other side will call eNPP_DestroyPhase2 after this NPError aReason = NPERR_NO_ERROR; @@ -573,7 +573,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void ) sal_uInt32 nInstance = pMessage->GetUINT32(); ConnectorInstance* pInst= m_aInstances[ nInstance ]; NPP instance = pInst->instance; - NPSavedData* pSave = NULL; + NPSavedData* pSave = nullptr; NPError aRet = aPluginFuncs.destroy( instance, &pSave ); if( pSave ) @@ -614,7 +614,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void ) pStream->url = pMessage->GetString(); pStream->end = pMessage->GetUINT32(); pStream->lastmodified = pMessage->GetUINT32(); - pStream->pdata = pStream->ndata = pStream->notifyData = NULL; + pStream->pdata = pStream->ndata = pStream->notifyData = nullptr; NPBool* pSeekable = static_cast<NPBool*>(pMessage->GetBytes()); m_aNPWrapStreams.push_back( pStream ); uint16_t nStype = NP_ASFILE; @@ -645,7 +645,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void ) uint16_t* pMode = static_cast<uint16_t*>(pMessage->GetBytes()); int16_t* pArgc = static_cast<int16_t*>(pMessage->GetBytes()); NPP instance = new NPP_t; - instance->pdata = instance->ndata = NULL; + instance->pdata = instance->ndata = nullptr; sal_uLong nArgnBytes, nArgvBytes; char* pArgn = static_cast<char*>(pMessage->GetBytes( nArgnBytes )); char* pArgv = static_cast<char*>(pMessage->GetBytes( nArgvBytes )); @@ -660,10 +660,10 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void ) m_aInstances.push_back( pInst ); NPError aRet; aRet = aPluginFuncs.newp( pInst->pMimeType, instance, *pMode, *pArgc, - pInst->nArg ? pInst->argn : NULL, - pInst->nArg ? pInst->argv : NULL, + pInst->nArg ? pInst->argn : nullptr, + pInst->nArg ? pInst->argv : nullptr, ( nSaveBytes == 4 && *reinterpret_cast<sal_uInt32*>(pSavedData) == 0 ) ? - &(pInst->aData) : NULL ); + &(pInst->aData) : nullptr ); SAL_INFO( "extensions.plugin", "pluginapp: NPP_New( " << pInst->pMimeType << ", " diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx index 3d166043a752..eb073e383f51 100644 --- a/extensions/source/plugin/unx/nppapi.cxx +++ b/extensions/source/plugin/unx/nppapi.cxx @@ -171,7 +171,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void ) NPMIMEType pType = pMessage->GetString(); char* pTarget = pMessage->GetString(); - NPStream* pStream = NULL; + NPStream* pStream = nullptr; NPError aRet = NPN_NewStream( instance, pType, pTarget, &pStream ); @@ -253,7 +253,7 @@ IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void ) { pRun->offset = pArray[ 2*n ]; pRun->length = pArray[ 2*n+1 ]; - pRun->next = n < nRanges-1 ? new NPByteRange : NULL; + pRun->next = n < nRanges-1 ? new NPByteRange : nullptr; pRun = pRun->next; } NPError aRet = NPN_RequestRead( pStream, pFirst ); @@ -358,7 +358,7 @@ NPError UnxPluginComm::NPP_Destroy( NPP instance, NPSavedData** save ) sal_uLong nSaveBytes; void* pSaveData = pMes->GetBytes( nSaveBytes ); if( nSaveBytes == 4 && *static_cast<sal_uInt32*>(pSaveData) == 0 ) - *save = NULL; + *save = nullptr; else { *save = new NPSavedData; @@ -411,8 +411,8 @@ NPError UnxPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mo { m_aInstances.push_back( new ConnectorInstance( instance, pluginType, 0, - NULL, 0, NULL, 0, - saved ? static_cast<char*>(saved->buf) : NULL, + nullptr, 0, nullptr, 0, + saved ? static_cast<char*>(saved->buf) : nullptr, saved ? saved->len : 0 ) ); char *pArgnBuf, *pArgvBuf; diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx index 12da5ad6c313..c0a0649f5665 100644 --- a/extensions/source/plugin/unx/npwrap.cxx +++ b/extensions/source/plugin/unx/npwrap.cxx @@ -48,18 +48,18 @@ #include <npwrap.hxx> -PluginConnector* pConnector = NULL; +PluginConnector* pConnector = nullptr; int nAppArguments = 0; -char** pAppArguments = NULL; -Display* pAppDisplay = NULL; -Display* pXtAppDisplay = NULL; +char** pAppArguments = nullptr; +Display* pAppDisplay = nullptr; +Display* pXtAppDisplay = nullptr; extern oslModule pPluginLib; extern NPError (*pNP_Shutdown)(); XtAppContext app_context; -Widget topLevel = NULL, topBox = NULL; +Widget topLevel = nullptr, topBox = nullptr; int wakeup_fd[2] = { 0, 0 }; static bool bPluginAppQuit = false; @@ -187,7 +187,7 @@ static oslModule LoadModule( const char* pPath ) static void CheckPlugin( const char* pPath ) { oslModule pLib = LoadModule( pPath ); - if (pLib != 0) { + if (pLib != nullptr) { char*(*pNP_GetMIMEDescription)() = reinterpret_cast<char*(*)()>( osl_getAsciiFunctionSymbol( pLib, "NP_GetMIMEDescription" )); if( pNP_GetMIMEDescription ) @@ -219,7 +219,7 @@ extern "C" { if( pConnector ) { // ensure that a read on the other side will wakeup delete pConnector; - pConnector = NULL; + pConnector = nullptr; } _exit(nSig); @@ -255,9 +255,9 @@ extern "C" { prepareXtEvent, checkXtEvent, dispatchXtEvent, - NULL, + nullptr, noClosure, - NULL + nullptr }; static gboolean pollXtTimerCallback(gpointer) @@ -298,7 +298,7 @@ extern "C" { bPluginAppQuit = true; delete pConnector; - pConnector = NULL; + pConnector = nullptr; } return sal_True; @@ -308,9 +308,9 @@ extern "C" { prepareWakeupEvent, checkWakeupEvent, dispatchWakeupEvent, - NULL, + nullptr, noClosure, - NULL + nullptr }; #endif // GTK @@ -325,11 +325,11 @@ int main( int argc, char **argv) aSigAction.sa_handler = signal_handler; sigemptyset( &aSigAction.sa_mask ); aSigAction.sa_flags = SA_NOCLDSTOP; - sigaction( SIGSEGV, &aSigAction, NULL ); - sigaction( SIGBUS, &aSigAction, NULL ); - sigaction( SIGABRT, &aSigAction, NULL ); - sigaction( SIGTERM, &aSigAction, NULL ); - sigaction( SIGILL, &aSigAction, NULL ); + sigaction( SIGSEGV, &aSigAction, nullptr ); + sigaction( SIGBUS, &aSigAction, nullptr ); + sigaction( SIGABRT, &aSigAction, nullptr ); + sigaction( SIGTERM, &aSigAction, nullptr ); + sigaction( SIGILL, &aSigAction, nullptr ); int nArg = (argc < 3) ? 1 : 2; char* pBaseName = argv[nArg] + strlen(argv[nArg]); @@ -380,18 +380,18 @@ int main( int argc, char **argv) int nSocket = atol( argv[1] ); #if ENABLE_GTK - g_thread_init(NULL); + g_thread_init(nullptr); gtk_init(&argc, &argv); #endif pConnector = new PluginConnector( nSocket ); - pConnector->SetConnectionLostHdl( Link<Mediator*,void>( NULL, GlobalConnectionLostHdl ) ); + pConnector->SetConnectionLostHdl( Link<Mediator*,void>( nullptr, GlobalConnectionLostHdl ) ); - XtSetLanguageProc( NULL, NULL, NULL ); + XtSetLanguageProc( nullptr, nullptr, nullptr ); XtToolkitInitialize(); app_context = XtCreateApplicationContext(); - pXtAppDisplay = XtOpenDisplay( app_context, NULL, "SOPlugin", "SOPlugin", NULL, 0, &argc, argv ); + pXtAppDisplay = XtOpenDisplay( app_context, nullptr, "SOPlugin", "SOPlugin", nullptr, 0, &argc, argv ); #if ENABLE_GTK @@ -406,21 +406,21 @@ int main( int argc, char **argv) g_source_set_priority( pXTSource, GDK_PRIORITY_EVENTS ); g_source_set_can_recurse( pXTSource, sal_True ); - g_source_attach( pXTSource, NULL ); + g_source_attach( pXTSource, nullptr ); aXtPollDesc.fd = ConnectionNumber( pXtAppDisplay ); aXtPollDesc.events = G_IO_IN; aXtPollDesc.revents = 0; g_source_add_poll( pXTSource, &aXtPollDesc ); - gint xt_polling_timer_id = g_timeout_add( 25, pollXtTimerCallback, NULL); + gint xt_polling_timer_id = g_timeout_add( 25, pollXtTimerCallback, nullptr); // Initialize wakeup events listener GSource *pWakeupSource = g_source_new( &aWakeupEventFuncs, sizeof(GSource) ); - if ( pWakeupSource == NULL ) { + if ( pWakeupSource == nullptr ) { SAL_WARN("extensions.plugin", "could not get wakeup source"); return 1; } g_source_set_priority( pWakeupSource, GDK_PRIORITY_EVENTS); - g_source_attach( pWakeupSource, NULL ); + g_source_attach( pWakeupSource, nullptr ); aWakeupPollDesc.fd = wakeup_fd[0]; aWakeupPollDesc.events = G_IO_IN; aWakeupPollDesc.revents = 0; @@ -463,7 +463,7 @@ int main( int argc, char **argv) // of XtAppMainLoop do { #if ENABLE_GTK - g_main_context_iteration( NULL, sal_True ); + g_main_context_iteration( nullptr, sal_True ); #else XtAppProcessEvent( app_context, XtIMAll ); #endif diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx index fe0bd5d12511..65c9e610d1bf 100644 --- a/extensions/source/plugin/unx/plugcon.cxx +++ b/extensions/source/plugin/unx/plugcon.cxx @@ -164,7 +164,7 @@ void PluginConnector::Respond( sal_uLong nID, MediatorMessage* PluginConnector::WaitForAnswer( sal_uLong nMessageID ) { if( ! m_bValid ) - return NULL; + return nullptr; nMessageID &= 0x00ffffff; while( m_pListener ) @@ -187,7 +187,7 @@ MediatorMessage* PluginConnector::WaitForAnswer( sal_uLong nMessageID ) CallWorkHandler(); WaitForMessage( 2000 ); } - return NULL; + return nullptr; } ConnectorInstance::ConnectorInstance( NPP inst, char* type, @@ -195,11 +195,11 @@ ConnectorInstance::ConnectorInstance( NPP inst, char* type, char* pargvbuf, sal_uLong nargvbytes, char* savedata, sal_uLong savebytes ) : instance( inst ), - pShell( NULL ), - pWidget( NULL ), - pForm( NULL ), - pGtkWindow( NULL ), - pGtkWidget( NULL ), + pShell( nullptr ), + pWidget( nullptr ), + pForm( nullptr ), + pGtkWindow( nullptr ), + pGtkWidget( nullptr ), bShouldUseXEmbed( false ), nArg( args ), pArgnBuf( pargnbuf ), @@ -276,7 +276,7 @@ const char* GetCommandName( CommandAtoms eCommand ) case eMaxCommand: return "eMaxCommand"; default: return "unknown command"; } - return NULL; + return nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/plugin/unx/sysplug.cxx b/extensions/source/plugin/unx/sysplug.cxx index acb08a37138e..b7a1d8162f6a 100644 --- a/extensions/source/plugin/unx/sysplug.cxx +++ b/extensions/source/plugin/unx/sysplug.cxx @@ -79,7 +79,7 @@ UnxPluginComm::UnxPluginComm( pArgs[1] = pDesc; pArgs[2] = aLib.getStr(); pArgs[3] = pWindow; - pArgs[4] = NULL; + pArgs[4] = nullptr; SAL_INFO( "extensions.plugin", @@ -137,7 +137,7 @@ UnxPluginComm::~UnxPluginComm() } bool UnxPluginComm::getPluginappPath(OString * path) { - OSL_ASSERT(path != NULL); + OSL_ASSERT(path != nullptr); OUString p("$BRAND_BASE_DIR/" LIBO_LIBEXEC_FOLDER "/pluginapp.bin"); rtl::Bootstrap::expandMacros(p); return diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx index 0433aea921fe..811376841e1f 100644 --- a/extensions/source/plugin/unx/unxmgr.cxx +++ b/extensions/source/plugin/unx/unxmgr.cxx @@ -210,7 +210,7 @@ static void CheckPluginRegistryFiles( const OString& rPath, list< PluginDescript // check subdirectories DIR* pDIR = opendir( rPath.getStr() ); - struct dirent* pDirEnt = NULL; + struct dirent* pDirEnt = nullptr; struct stat aStat; maxDirent u; while( pDIR && ! readdir_r( pDIR, &u.asDirent, &pDirEnt ) && pDirEnt ) @@ -274,7 +274,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th if (!aPath.isEmpty()) { DIR* pDIR = opendir(aPath.getStr()); - struct dirent* pDirEnt = NULL; + struct dirent* pDirEnt = nullptr; while( pDIR && ! readdir_r( pDIR, &u.asDirent, &pDirEnt ) && pDirEnt ) { char* pBaseName = u.asDirent.d_name; diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index e6469ee282fb..016e0769078e 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -54,10 +54,10 @@ namespace pcr OBrowserLine::OBrowserLine( const OUString& _rEntryName, vcl::Window* pParent ) :m_sEntryName( _rEntryName ) ,m_aFtTitle(VclPtr<FixedText>::Create(pParent)) - ,m_pControlWindow( NULL ) - ,m_pBrowseButton(NULL) - ,m_pAdditionalBrowseButton( NULL ) - ,m_pClickListener( NULL ) + ,m_pControlWindow( nullptr ) + ,m_pBrowseButton(nullptr) + ,m_pAdditionalBrowseButton( nullptr ) + ,m_pClickListener( nullptr ) ,m_pTheParent(pParent) ,m_nNameWidth(0) ,m_nEnableFlags( 0xFFFF ) diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 8ef421c5a994..875c7b490962 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -228,7 +228,7 @@ namespace pcr return; SharedNotifier::getNotifier()->removeEventsForProcessor( this ); - m_pContext = NULL; + m_pContext = nullptr; } @@ -336,8 +336,8 @@ namespace pcr ,m_aLinesPlayground(VclPtr<vcl::Window>::Create(this,WB_DIALOGCONTROL | WB_CLIPCHILDREN)) ,m_aVScroll(VclPtr<ScrollBar>::Create(this,WB_VSCROLL|WB_REPEAT|WB_DRAG)) ,m_pHelpWindow( VclPtr<InspectorHelpWindow>::Create( this ) ) - ,m_pLineListener(NULL) - ,m_pControlObserver( NULL ) + ,m_pLineListener(nullptr) + ,m_pControlObserver( nullptr ) ,m_nYOffset(0) ,m_nCurrentPreferredHelpHeight(0) ,m_nTheNameSize(0) @@ -692,7 +692,7 @@ namespace pcr _out_rpLine = line->pLine; else _out_rpLine.reset(); - return ( NULL != _out_rpLine.get() ); + return ( nullptr != _out_rpLine.get() ); } @@ -717,7 +717,7 @@ namespace pcr BrowserLinePointer pLine; if ( impl_getBrowserLineForName( _rEntryName, pLine ) ) return pLine->getControl(); - return NULL; + return nullptr; } @@ -1030,7 +1030,7 @@ namespace pcr return; try { - _rxControl->setControlContext( NULL ); + _rxControl->setControlContext( nullptr ); Reference< XComponent > xControlComponent( _rxControl, UNO_QUERY ); if ( xControlComponent.is() ) xControlComponent->dispose(); @@ -1090,7 +1090,7 @@ namespace pcr if ( nPos < m_aLines.size() ) { - vcl::Window* pRefWindow = NULL; + vcl::Window* pRefWindow = nullptr; if ( nPos > 0 ) pRefWindow = m_aLines[nPos-1].pLine->GetRefWindow(); @@ -1267,7 +1267,7 @@ namespace pcr // interested in scroll events if we have a scrollbar if ( m_aVScroll->IsVisible() ) { - HandleScrollCommand( *pCommand, NULL, m_aVScroll.get() ); + HandleScrollCommand( *pCommand, nullptr, m_aVScroll.get() ); } } } diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx index 1c83d4b8af7e..aff7994f70af 100644 --- a/extensions/source/propctrlr/browserview.cxx +++ b/extensions/source/propctrlr/browserview.cxx @@ -43,7 +43,7 @@ namespace pcr IMPL_LINK_NOARG_TYPED(OPropertyBrowserView, OnPageActivation, LinkParamNone*, void) { m_nActivePage = m_pPropBox->GetCurPage(); - m_aPageActivationHandler.Call(NULL); + m_aPageActivationHandler.Call(nullptr); } diff --git a/extensions/source/propctrlr/composeduiupdate.cxx b/extensions/source/propctrlr/composeduiupdate.cxx index 45fdf384ad8c..be669773863f 100644 --- a/extensions/source/propctrlr/composeduiupdate.cxx +++ b/extensions/source/propctrlr/composeduiupdate.cxx @@ -787,7 +787,7 @@ namespace pcr singleUI->second->dispose(); } m_pCollectedUIs.reset(); - m_xDelegatorUI.set( NULL ); + m_xDelegatorUI.set( nullptr ); } diff --git a/extensions/source/propctrlr/composeduiupdate.hxx b/extensions/source/propctrlr/composeduiupdate.hxx index 429268f53a97..30011afe0bcd 100644 --- a/extensions/source/propctrlr/composeduiupdate.hxx +++ b/extensions/source/propctrlr/composeduiupdate.hxx @@ -139,7 +139,7 @@ namespace pcr private: /// determines whether the instance is already disposed - inline bool impl_isDisposed() const { return m_pCollectedUIs.get() == NULL; } + inline bool impl_isDisposed() const { return m_pCollectedUIs.get() == nullptr; } /// throws an exception if the component is already disposed void impl_checkDisposed() const; diff --git a/extensions/source/propctrlr/controlfontdialog.cxx b/extensions/source/propctrlr/controlfontdialog.cxx index 96ccc573b564..75032a92ecdb 100644 --- a/extensions/source/propctrlr/controlfontdialog.cxx +++ b/extensions/source/propctrlr/controlfontdialog.cxx @@ -41,9 +41,9 @@ namespace pcr OControlFontDialog::OControlFontDialog(const Reference< XComponentContext >& _rxContext ) :OGenericUnoDialog( _rxContext ) - ,m_pFontItems(NULL) - ,m_pItemPool(NULL) - ,m_pItemPoolDefaults(NULL) + ,m_pFontItems(nullptr) + ,m_pItemPool(nullptr) + ,m_pItemPoolDefaults(nullptr) { registerProperty(PROPERTY_INTROSPECTEDOBJECT, OWN_PROPERTY_ID_INTROSPECTEDOBJECT, PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT, diff --git a/extensions/source/propctrlr/defaulthelpprovider.cxx b/extensions/source/propctrlr/defaulthelpprovider.cxx index 276b9a92eaf0..79f73213f8fe 100644 --- a/extensions/source/propctrlr/defaulthelpprovider.cxx +++ b/extensions/source/propctrlr/defaulthelpprovider.cxx @@ -149,7 +149,7 @@ namespace pcr vcl::Window* DefaultHelpProvider::impl_getVclControlWindow_nothrow( const Reference< XPropertyControl >& _rxControl ) { - vcl::Window* pControlWindow = NULL; + vcl::Window* pControlWindow = nullptr; OSL_PRECOND( _rxControl.is(), "DefaultHelpProvider::impl_getVclControlWindow_nothrow: illegal control!" ); if ( !_rxControl.is() ) return pControlWindow; diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index 9ca7908c6838..53ce924cf45f 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -130,7 +130,7 @@ namespace pcr sal_Int16 nRadiobuttonCompatibleTypes[] = { DataTypeClass::STRING, DataTypeClass::anyURI, 0 }; sal_Int16 nFormattedCompatibleTypes[] = { DataTypeClass::DECIMAL, DataTypeClass::FLOAT, DataTypeClass::DOUBLE, DataTypeClass::DATETIME, DataTypeClass::DATE, DataTypeClass::TIME, 0 }; - sal_Int16* pCompatibleTypes = NULL; + sal_Int16* pCompatibleTypes = nullptr; switch ( nControlType ) { case FormComponentType::SPINBUTTON: @@ -478,9 +478,9 @@ namespace pcr Reference< XValueBinding > xBinding( _rxBinding, UNO_QUERY ); OSL_ENSURE( xBinding.is() || !_rxBinding.is(), "EFormsHelper::setBinding: invalid binding!" ); - impl_toggleBindingPropertyListening_throw( false, NULL ); + impl_toggleBindingPropertyListening_throw( false, nullptr ); m_xBindableControl->setValueBinding( xBinding ); - impl_toggleBindingPropertyListening_throw( true, NULL ); + impl_toggleBindingPropertyListening_throw( true, nullptr ); ::std::set< OUString > aSet; firePropertyChanges( xOldBinding, _rxBinding, aSet ); @@ -750,11 +750,11 @@ namespace pcr if ( _rFilter.find( aProp->Name ) != _rFilter.end() ) continue; - Any aOldValue( NULL, aProp->Type ); + Any aOldValue( nullptr, aProp->Type ); if ( xOldInfo.is() && xOldInfo->hasPropertyByName( aProp->Name ) ) aOldValue = _rxOldProps->getPropertyValue( aProp->Name ); - Any aNewValue( NULL, aProp->Type ); + Any aNewValue( nullptr, aProp->Type ); if ( xNewInfo.is() && xNewInfo->hasPropertyByName( aProp->Name ) ) aNewValue = _rxNewProps->getPropertyValue( aProp->Name ); diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 32ca408c8a4f..aa625d7b82ec 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -186,7 +186,7 @@ namespace pcr if ( m_pHelper->getCurrentFormModelName() != m_sBindingLessModelName ) { OUString sOldBindingName = m_pHelper->getCurrentBindingName(); - m_pHelper->setBinding( NULL ); + m_pHelper->setBinding( nullptr ); firePropertyChange( PROPERTY_BINDING_NAME, PROPERTY_ID_BINDING_NAME, makeAny( sOldBindingName ), makeAny( OUString() ) ); } diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 5ee879ccf4f1..bef80878706a 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -178,8 +178,8 @@ namespace pcr { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); assert(pFact); //CreateFactory fail! - m_nCharsId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), 0 ); - AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), 0 ); + m_nCharsId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), nullptr ); + AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), nullptr ); } @@ -483,9 +483,9 @@ namespace pcr SfxItemSet* ControlCharacterDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults) { // just to be sure .... - _rpSet = NULL; - _rpPool = NULL; - _rppDefaults = NULL; + _rpSet = nullptr; + _rpPool = nullptr; + _rppDefaults = nullptr; // create and initialize the defaults _rppDefaults = new SfxPoolItem*[CFID_LAST_ITEM_ID - CFID_FIRST_ITEM_ID + 1]; @@ -563,17 +563,17 @@ namespace pcr if (_rpSet) { delete _rpSet; - _rpSet = NULL; + _rpSet = nullptr; } // delete the pool _rpPool->ReleaseDefaults(true); // the "true" means delete the items, too SfxItemPool::Free(_rpPool); - _rpPool = NULL; + _rpPool = nullptr; // reset the defaults ptr - _rppDefaults = NULL; + _rppDefaults = nullptr; // no need to explicitly delete the defaults, this has been done by the ReleaseDefaults delete pFontList; diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 8363eae44878..db3c3bebf1d9 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -190,7 +190,7 @@ namespace pcr { "HelpText", 8 }, { "CurrencySymbol", 14 }, { "StringItemList", 14 }, - { 0, 0 } + { nullptr, 0 } }; namespace @@ -200,7 +200,7 @@ namespace pcr bool bRet = false; const LanguageDependentProp* pLangDepProp = aLanguageDependentProp; - while( pLangDepProp->pPropName != 0 ) + while( pLangDepProp->pPropName != nullptr ) { if( aName.equalsAsciiL( pLangDepProp->pPropName, pLangDepProp->nPropNameLength )) { @@ -502,7 +502,7 @@ namespace pcr { if ( ( aProperty.Attributes & PropertyAttribute::MAYBEVOID ) == 0 ) // default construct an instance of the proper type - aPropertyValue = Any( NULL, aProperty.Type ); + aPropertyValue = Any( nullptr, aProperty.Type ); // nothing to do return aPropertyValue; } @@ -1121,7 +1121,7 @@ namespace pcr DBG_ASSERT(xTunnel.is(), "FormComponentPropertyHandler::describePropertyLine : xTunnel is invalid!"); SvNumberFormatsSupplierObj* pSupplier = reinterpret_cast<SvNumberFormatsSupplierObj*>(xTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId())); - if (pSupplier != NULL) + if (pSupplier != nullptr) { bool bIsFormatKey = (PROPERTY_ID_FORMATKEY == nPropId); @@ -2709,7 +2709,7 @@ namespace pcr Reference< XUnoTunnel > xTunnel( xSupplier, UNO_QUERY_THROW ); SvNumberFormatsSupplierObj* pSupplier = reinterpret_cast< SvNumberFormatsSupplierObj* >( xTunnel->getSomething( SvNumberFormatsSupplierObj::getUnoTunnelId() ) ); - DBG_ASSERT( pSupplier != NULL, "FormComponentPropertyHandler::impl_dialogFormatting_nothrow: invalid call !" ); + DBG_ASSERT( pSupplier != nullptr, "FormComponentPropertyHandler::impl_dialogFormatting_nothrow: invalid call !" ); sal_Int32 nFormatKey = 0; impl_getPropertyValue_throw( PROPERTY_FORMATKEY ) >>= nFormatKey; @@ -2747,7 +2747,7 @@ namespace pcr pFormatter->DeleteEntry(*pDeletedKeys); } - pItem = NULL; + pItem = nullptr; if ( SfxItemState::SET == pResult->GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, false, &pItem ) ) { _out_rNewValue <<= (sal_Int32)( static_cast< const SfxUInt32Item* >( pItem )->GetValue() ); @@ -2861,9 +2861,9 @@ namespace pcr bool bSuccess = false; // create an item set for use with the dialog - SfxItemSet* pSet = NULL; - SfxItemPool* pPool = NULL; - SfxPoolItem** pDefaults = NULL; + SfxItemSet* pSet = nullptr; + SfxItemPool* pPool = nullptr; + SfxPoolItem** pDefaults = nullptr; ControlCharacterDialog::createItemSet(pSet, pPool, pDefaults); ControlCharacterDialog::translatePropertiesToItems(m_xComponent, pSet); @@ -3180,7 +3180,7 @@ namespace pcr return true; } m_xCommandDesigner->dispose(); - m_xCommandDesigner.set( NULL ); + m_xCommandDesigner.set( nullptr ); } if ( !impl_ensureRowsetConnection_nothrow() ) diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index ae44fc5e4810..c499dcb6b72e 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -192,7 +192,7 @@ namespace pcr m_aRow3->SetLinkChangeHandler( LINK( this, FormLinkDialog, OnFieldChanged ) ); m_aRow4->SetLinkChangeHandler( LINK( this, FormLinkDialog, OnFieldChanged ) ); - PostUserEvent( LINK( this, FormLinkDialog, OnInitialize ), NULL, true ); + PostUserEvent( LINK( this, FormLinkDialog, OnInitialize ), nullptr, true ); updateOkButton(); } diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index b3b959cf886c..8bb948ff06b5 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -94,7 +94,7 @@ namespace pcr DEF_INFO( ident, uinameres, pos, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 | PROP_FLAG_##flag3 | PROP_FLAG_##flag4 ) sal_uInt16 OPropertyInfoService::s_nCount = 0; - OPropertyInfoImpl* OPropertyInfoService::s_pPropertyInfos = NULL; + OPropertyInfoImpl* OPropertyInfoService::s_pPropertyInfos = nullptr; const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo() { @@ -540,10 +540,10 @@ namespace pcr s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() ); if ( pInfo == s_pPropertyInfos + s_nCount ) - return NULL; + return nullptr; if ( pInfo->sName != _rName ) - return NULL; + return nullptr; return pInfo; } @@ -561,7 +561,7 @@ namespace pcr if (s_pPropertyInfos[i].nId == _nId) return &s_pPropertyInfos[i]; - return NULL; + return nullptr; } diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx index 54fa2ef2e0d8..cb1d20590c22 100644 --- a/extensions/source/propctrlr/handlerhelper.cxx +++ b/extensions/source/propctrlr/handlerhelper.cxx @@ -277,7 +277,7 @@ namespace pcr vcl::Window* PropertyHandlerHelper::getDialogParentWindow( const Reference<XComponentContext>& _rContext ) { - vcl::Window* pInspectorWindow = NULL; + vcl::Window* pInspectorWindow = nullptr; try { Reference< XWindow > xInspectorWindow( _rContext->getValueByName( "DialogParentWindow" ), UNO_QUERY_THROW ); diff --git a/extensions/source/propctrlr/inspectormodelbase.cxx b/extensions/source/propctrlr/inspectormodelbase.cxx index 1b26b2054da0..cd81bd6b7879 100644 --- a/extensions/source/propctrlr/inspectormodelbase.cxx +++ b/extensions/source/propctrlr/inspectormodelbase.cxx @@ -138,7 +138,7 @@ namespace pcr ::cppu::IPropertyArrayHelper& InspectorModelProperties::getInfoHelper() { ::osl::MutexGuard aGuard( m_rMutex ); - if ( m_pPropertyInfo.get() == NULL ) + if ( m_pPropertyInfo.get() == nullptr ) { Sequence< Property > aProperties; describeProperties( aProperties ); diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 84d6ad45dc42..bcf766ebd61e 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -89,7 +89,7 @@ namespace pcr :m_xContext(_rxContext) ,m_aDisposeListeners( m_aMutex ) ,m_aControlObservers( m_aMutex ) - ,m_pView(NULL) + ,m_pView(nullptr) ,m_bContainerFocusListening( false ) ,m_bSuspendingPropertyHandlers( false ) ,m_bConstructed( false ) @@ -534,7 +534,7 @@ namespace pcr m_aControlObservers.disposeAndClear(aEvt); // don't delete explicitly (this is done by the frame we reside in) - m_pView = NULL; + m_pView = nullptr; Reference< XComponent > xViewAsComp( m_xView, UNO_QUERY ); if ( xViewAsComp.is() ) @@ -542,7 +542,7 @@ namespace pcr m_xView.clear( ); m_aInspectedObjects.clear(); - impl_bindToNewModel_nothrow( NULL ); + impl_bindToNewModel_nothrow( nullptr ); } @@ -620,8 +620,8 @@ namespace pcr { if ( m_xView.is() && ( m_xView == _rSource.Source ) ) { - m_xView = NULL; - m_pView = NULL; + m_xView = nullptr; + m_pView = nullptr; } for ( InterfaceArray::iterator loop = m_aInspectedObjects.begin(); @@ -1350,7 +1350,7 @@ namespace pcr { DBG_UNHANDLED_EXCEPTION(); } - m_xInteractiveHandler = NULL; + m_xInteractiveHandler = nullptr; } diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx index a81c030a32fd..4bf94a7ad0e6 100644 --- a/extensions/source/propctrlr/propcontroller.hxx +++ b/extensions/source/propctrlr/propcontroller.hxx @@ -305,7 +305,7 @@ namespace pcr <TRUE/> if and only if the property could be found. In this case, <arg>_pProperty</arg> (if not <NULL/> contains the iterator pointing to this property. */ - bool impl_findObjectProperty_nothrow( const OUString& _rName, OrderedPropertyMap::const_iterator* _pProperty = NULL ); + bool impl_findObjectProperty_nothrow( const OUString& _rName, OrderedPropertyMap::const_iterator* _pProperty = nullptr ); bool Construct(vcl::Window* _pParentWin); diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 5586aa3affda..057a4d550f55 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -44,8 +44,8 @@ namespace pcr OPropertyEditor::OPropertyEditor( vcl::Window* pParent, WinBits nWinStyle) :Control(pParent, nWinStyle) ,m_aTabControl( VclPtr<TabControl>::Create(this) ) - ,m_pListener(NULL) - ,m_pObserver(NULL) + ,m_pListener(nullptr) + ,m_pObserver(nullptr) ,m_nNextId(1) ,m_bHasHelpSection( false ) ,m_nMinHelpLines( 0 ) @@ -173,7 +173,7 @@ namespace pcr OBrowserPage* OPropertyEditor::getPage( const OUString& _rPropertyName ) { - OBrowserPage* pPage = NULL; + OBrowserPage* pPage = nullptr; MapStringToPageId::const_iterator aPropertyPageIdPos = m_aPropertyPageIds.find( _rPropertyName ); if ( aPropertyPageIdPos != m_aPropertyPageIds.end() ) pPage = static_cast< OBrowserPage* >( m_aTabControl->GetTabPage( aPropertyPageIdPos->second ) ); @@ -511,7 +511,7 @@ namespace pcr IMPL_LINK_NOARG_TYPED(OPropertyEditor, OnPageActivate, TabControl*, void) { - m_aPageActivationHandler.Call(NULL); + m_aPageActivationHandler.Call(nullptr); } diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx index 4e0515040f7a..a57c526ad8a7 100644 --- a/extensions/source/propctrlr/propertyeditor.hxx +++ b/extensions/source/propctrlr/propertyeditor.hxx @@ -48,7 +48,7 @@ namespace pcr { sal_uInt16 nPos; VclPtr<TabPage> pPage; - HiddenPage() : nPos( 0 ), pPage( NULL ) { } + HiddenPage() : nPos( 0 ), pPage( nullptr ) { } HiddenPage( sal_uInt16 _nPos, TabPage* _pPage ) : nPos( _nPos ), pPage( _pPage ) { } }; @@ -127,7 +127,7 @@ namespace pcr void Update(const ::std::mem_fun_t<void,OBrowserListBox>& _aUpdateFunction); typedef void (OPropertyEditor::*PageOperation)( OBrowserPage&, const void* ); - void forEachPage( PageOperation _pOperation, const void* _pArgument = NULL ); + void forEachPage( PageOperation _pOperation, const void* _pArgument = nullptr ); void setPageLineListener( OBrowserPage& _rPage, const void* ); void setPageControlObserver( OBrowserPage& _rPage, const void* ); diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index e62eb9bb74ee..7b968898c1b3 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -271,7 +271,7 @@ namespace pcr ); if ( pFound != m_aSupportedProperties.end() ) return pFound; - return NULL; + return nullptr; } const Property& PropertyHandler::impl_getPropertyFromId_throw( PropertyId _nPropId ) const diff --git a/extensions/source/propctrlr/propertyhandler.hxx b/extensions/source/propctrlr/propertyhandler.hxx index 65a0b80214ad..91fa5e2819c0 100644 --- a/extensions/source/propctrlr/propertyhandler.hxx +++ b/extensions/source/propctrlr/propertyhandler.hxx @@ -257,7 +257,7 @@ namespace pcr */ inline bool impl_isSupportedProperty_nothrow( PropertyId _nPropId ) const { - return impl_getPropertyFromId_nothrow( _nPropId ) != NULL; + return impl_getPropertyFromId_nothrow( _nPropId ) != nullptr; } /** retrieves a property given by name diff --git a/extensions/source/propctrlr/pushbuttonnavigation.cxx b/extensions/source/propctrlr/pushbuttonnavigation.cxx index 2315c94ef87f..095d142c15a0 100644 --- a/extensions/source/propctrlr/pushbuttonnavigation.cxx +++ b/extensions/source/propctrlr/pushbuttonnavigation.cxx @@ -51,7 +51,7 @@ namespace pcr ".uno:FormController/moveToNew", ".uno:FormController/deleteRecord", ".uno:FormController/refreshForm", - NULL + nullptr }; static sal_Int32 lcl_getNavigationURLIndex( const OUString& _rNavURL ) diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index d9fcf04b2652..4b58bca359ff 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -51,8 +51,8 @@ namespace pcr :ModalDialog(pParent, "LabelSelectionDialog", "modules/spropctrlr/ui/labelselectiondialog.ui") ,m_aModelImages(PcrRes(RID_IL_FORMEXPLORER)) ,m_xControlModel(_xControlModel) - ,m_pInitialSelection(NULL) - ,m_pLastSelected(NULL) + ,m_pInitialSelection(nullptr) + ,m_pLastSelected(nullptr) ,m_bHaveAssignableControl(false) { get(m_pMainDesc, "label"); @@ -114,7 +114,7 @@ namespace pcr SvTreeListEntry* pRoot = m_pControlTree->InsertEntry(PcrRes(RID_STR_FORMS).toString(), aRootImage, aRootImage); // build the tree - m_pInitialSelection = NULL; + m_pInitialSelection = nullptr; m_bHaveAssignableControl = false; InsertEntries(xSearch, pRoot); m_pControlTree->Expand(pRoot); @@ -245,13 +245,13 @@ namespace pcr DBG_ASSERT(pLB == m_pControlTree, "OSelectLabelDialog::OnEntrySelected : where did this come from ?"); (void)pLB; SvTreeListEntry* pSelected = m_pControlTree->FirstSelected(); - void* pData = pSelected ? pSelected->GetUserData() : NULL; + void* pData = pSelected ? pSelected->GetUserData() : nullptr; if (pData) m_xSelectedControl.set(*static_cast<Reference< XPropertySet > *>(pData)); m_pNoAssignment->SetClickHdl(Link<Button*,void>()); - m_pNoAssignment->Check(pData == NULL); + m_pNoAssignment->Check(pData == nullptr); m_pNoAssignment->SetClickHdl(LINK(this, OSelectLabelDialog, OnNoAssignmentClicked)); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index c83c8dab740c..00138e56cf9b 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -666,7 +666,7 @@ namespace pcr // initialize the color listbox XColorListRef pColorList; SfxObjectShell* pDocSh = SfxObjectShell::Current(); - const SfxPoolItem* pItem = pDocSh ? pDocSh->GetItem( SID_COLOR_TABLE ) : NULL; + const SfxPoolItem* pItem = pDocSh ? pDocSh->GetItem( SID_COLOR_TABLE ) : nullptr; if ( pItem ) { DBG_ASSERT(dynamic_cast< const SvxColorListItem* >(pItem) != nullptr, "OColorControl::OColorControl: invalid color item!"); @@ -1031,8 +1031,8 @@ namespace pcr DropDownEditControl::DropDownEditControl( vcl::Window* _pParent, WinBits _nStyle ) :Edit( _pParent, _nStyle ) - ,m_pFloatingEdit( NULL ) - ,m_pDropdownButton( NULL ) + ,m_pFloatingEdit( nullptr ) + ,m_pDropdownButton( nullptr ) ,m_nOperationMode( eStringList ) ,m_bDropdown(false) ,m_pHelper(nullptr) diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index 5d8cb73af831..d0f44a9ceed2 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -93,7 +93,7 @@ namespace pcr SubmissionPropertyHandler::SubmissionPropertyHandler( const Reference< XComponentContext >& _rxContext ) :EditPropertyHandler_Base( _rxContext ) ,OPropertyChangeListener( m_aMutex ) - ,m_pPropChangeMultiplexer( NULL ) + ,m_pPropChangeMultiplexer( nullptr ) { } @@ -242,7 +242,7 @@ namespace pcr { m_pPropChangeMultiplexer->dispose(); m_pPropChangeMultiplexer->release(); - m_pPropChangeMultiplexer = NULL; + m_pPropChangeMultiplexer = nullptr; } EditPropertyHandler_Base::onNewComponent(); diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx index e650e0ccd545..4deb6e46817e 100644 --- a/extensions/source/propctrlr/taborder.cxx +++ b/extensions/source/propctrlr/taborder.cxx @@ -74,7 +74,7 @@ namespace pcr ,m_xModel( _rxTabModel ) ,m_xControlContainer( _rxControlCont ) ,m_xORB( _rxORB ) - ,pImageList( NULL ) + ,pImageList( nullptr ) { get(m_pLB_Controls, "CTRLtree"); get(m_pPB_OK, "ok"); @@ -200,7 +200,7 @@ namespace pcr aName = ::comphelper::getString( xControl->getPropertyValue( PROPERTY_NAME ) ); // TODO: do Basic controls have a name? aImage = GetImage( xControl ); - m_pLB_Controls->InsertEntry( aName, aImage, aImage, 0, false, TREELIST_APPEND, xControl.get() ); + m_pLB_Controls->InsertEntry( aName, aImage, aImage, nullptr, false, TREELIST_APPEND, xControl.get() ); } } else @@ -349,7 +349,7 @@ namespace pcr void* pData = pSelEntryPrev->GetUserData(); GetModel()->Remove( pSelEntryPrev ); - InsertEntry( aSelEntryPrevText, aImage, aImage, 0, false, nSelEntryPos, pData ); + InsertEntry( aSelEntryPrevText, aImage, aImage, nullptr, false, nSelEntryPos, pData ); pSelEntry = NextSelected( pSelEntry ); } @@ -380,7 +380,7 @@ namespace pcr aImage = GetExpandedEntryBmp(pSelEntryNext); GetModel()->Remove( pSelEntryNext ); - InsertEntry( aSelEntryNextText, aImage, aImage, 0, false, nSelEntryPos, pData ); + InsertEntry( aSelEntryNextText, aImage, aImage, nullptr, false, nSelEntryPos, pData ); pSelEntry = PrevSelected( pSelEntry ); } diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index df3fdde7a19f..ef15cd7d6364 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -78,7 +78,7 @@ namespace pcr else { TreatAsNumber( false ); - SetFormatter( NULL ); + SetFormatter( nullptr ); SetText( "" ); } } @@ -252,7 +252,7 @@ namespace pcr if ( bFallback ) { getTypedControlWindow()->TreatAsNumber(false); - getTypedControlWindow()->SetFormatter(NULL); + getTypedControlWindow()->SetFormatter(nullptr); getTypedControlWindow()->SetText(""); m_nLastDecimalDigits = 0; } diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index 214b7df7997d..3f9db2d982f4 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -608,7 +608,7 @@ namespace pcr }; size_t i=0; - const OUString* pLoop = NULL; + const OUString* pLoop = nullptr; for ( i = 0, pLoop = aFacets; i < SAL_N_ELEMENTS( aFacets ); ++i, ++pLoop diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx index b036e8947ead..b315e4c0273b 100644 --- a/extensions/source/resource/oooresourceloader.cxx +++ b/extensions/source/resource/oooresourceloader.cxx @@ -180,7 +180,7 @@ namespace extensions { namespace resource OpenOfficeResourceBundle::OpenOfficeResourceBundle( const Reference< XComponentContext >& /*_rxContext*/, const OUString& _rBaseName, const Locale& _rLocale ) :m_aLocale( _rLocale ) - ,m_pResourceManager( NULL ) + ,m_pResourceManager( nullptr ) { OUString sBaseName( _rBaseName ); m_pResourceManager = new SimpleResMgr( OUStringToOString( sBaseName, RTL_TEXTENCODING_UTF8 ).getStr(), @@ -188,7 +188,7 @@ namespace extensions { namespace resource if ( !m_pResourceManager->IsValid() ) { - delete m_pResourceManager, m_pResourceManager = NULL; + delete m_pResourceManager, m_pResourceManager = nullptr; throw MissingResourceException(); } diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 4b40e37fe8fa..ccdb44cd8492 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -143,10 +143,10 @@ GridWindow::GridWindow(vcl::Window* pParent) , m_fMinChunkX(0.0) , m_fChunkY(0.0) , m_fMinChunkY(0.0) - , m_pXValues(NULL) - , m_pOrigYValues(NULL) + , m_pXValues(nullptr) + , m_pOrigYValues(nullptr) , m_nValues(0) - , m_pNewYValues(NULL) + , m_pNewYValues(nullptr) , m_BmOffX(0) , m_BmOffY(0) , m_bCutValues(false) diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index d2d3e4ba655d..5e94f8a0018e 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -76,32 +76,32 @@ inline void dbg_msg( const char* pString, ... ) } int Sane::nRefCount = 0; -oslModule Sane::pSaneLib = 0; +oslModule Sane::pSaneLib = nullptr; SANE_Int Sane::nVersion = 0; -SANE_Device** Sane::ppDevices = 0; +SANE_Device** Sane::ppDevices = nullptr; int Sane::nDevices = 0; SANE_Status (*Sane::p_init)( SANE_Int*, - SANE_Auth_Callback ) = 0; -void (*Sane::p_exit)() = 0; + SANE_Auth_Callback ) = nullptr; +void (*Sane::p_exit)() = nullptr; SANE_Status (*Sane::p_get_devices)( const SANE_Device***, - SANE_Bool ) = 0; -SANE_Status (*Sane::p_open)( SANE_String_Const, SANE_Handle ) = 0; -void (*Sane::p_close)( SANE_Handle ) = 0; + SANE_Bool ) = nullptr; +SANE_Status (*Sane::p_open)( SANE_String_Const, SANE_Handle ) = nullptr; +void (*Sane::p_close)( SANE_Handle ) = nullptr; const SANE_Option_Descriptor* (*Sane::p_get_option_descriptor)( - SANE_Handle, SANE_Int ) = 0; + SANE_Handle, SANE_Int ) = nullptr; SANE_Status (*Sane::p_control_option)( SANE_Handle, SANE_Int, SANE_Action, void*, - SANE_Int* ) = 0; + SANE_Int* ) = nullptr; SANE_Status (*Sane::p_get_parameters)( SANE_Handle, - SANE_Parameters* ) = 0; -SANE_Status (*Sane::p_start)( SANE_Handle ) = 0; + SANE_Parameters* ) = nullptr; +SANE_Status (*Sane::p_start)( SANE_Handle ) = nullptr; SANE_Status (*Sane::p_read)( SANE_Handle, SANE_Byte*, SANE_Int, - SANE_Int* ) = 0; -void (*Sane::p_cancel)( SANE_Handle ) = 0; -SANE_Status (*Sane::p_set_io_mode)( SANE_Handle, SANE_Bool ) = 0; -SANE_Status (*Sane::p_get_select_fd)( SANE_Handle, SANE_Int* ) = 0; -SANE_String_Const (*Sane::p_strstatus)( SANE_Status ) = 0; + SANE_Int* ) = nullptr; +void (*Sane::p_cancel)( SANE_Handle ) = nullptr; +SANE_Status (*Sane::p_set_io_mode)( SANE_Handle, SANE_Bool ) = nullptr; +SANE_Status (*Sane::p_get_select_fd)( SANE_Handle, SANE_Int* ) = nullptr; +SANE_String_Const (*Sane::p_strstatus)( SANE_Status ) = nullptr; static bool bSaneSymbolLoadFailed = false; @@ -149,10 +149,10 @@ SANE_Status Sane::ControlOption( int nOption, SANE_Action nAction, } Sane::Sane() : - mppOptions( 0 ), + mppOptions( nullptr ), mnOptions( 0 ), mnDevice( -1 ), - maHandle( 0 ) + maHandle( nullptr ) { if( ! nRefCount || ! pSaneLib ) Init(); @@ -224,7 +224,7 @@ void Sane::Init() DeInit(); else { - SANE_Status nStatus = p_init( &nVersion, 0 ); + SANE_Status nStatus = p_init( &nVersion, nullptr ); FAIL_SHUTDOWN_STATE( nStatus, "sane_init", ); nStatus = p_get_devices( const_cast<const SANE_Device***>(&ppDevices), SANE_FALSE ); @@ -245,7 +245,7 @@ void Sane::DeInit() { p_exit(); osl_unloadModule( pSaneLib ); - pSaneLib = 0; + pSaneLib = nullptr; } } @@ -265,7 +265,7 @@ void Sane::ReloadOptions() const SANE_Option_Descriptor* pZero = p_get_option_descriptor( maHandle, 0 ); SANE_Word pOptions[2]; SANE_Status nStatus = p_control_option( maHandle, 0, SANE_ACTION_GET_VALUE, - static_cast<void*>(pOptions), NULL ); + static_cast<void*>(pOptions), nullptr ); if( nStatus != SANE_STATUS_GOOD ) fprintf( stderr, "Error: sane driver returned %s while reading number of options !\n", p_strstatus( nStatus ) ); @@ -279,7 +279,7 @@ void Sane::ReloadOptions() for( int i = 1; i < mnOptions; i++ ) mppOptions[ i ] = p_get_option_descriptor( maHandle, i ); - CheckConsistency( NULL, true ); + CheckConsistency( nullptr, true ); maReloadOptionsLink.Call( *this ); } @@ -323,8 +323,8 @@ void Sane::Close() { p_close( maHandle ); delete [] mppOptions; - mppOptions = 0; - maHandle = 0; + mppOptions = nullptr; + maHandle = nullptr; mnDevice = -1; } } @@ -507,8 +507,8 @@ static inline sal_uInt8 _ReadValue( FILE* fp, int depth ) bool Sane::CheckConsistency( const char* pMes, bool bInit ) { - static const SANE_Option_Descriptor** pDescArray = NULL; - static const SANE_Option_Descriptor* pZero = NULL; + static const SANE_Option_Descriptor** pDescArray = nullptr; + static const SANE_Option_Descriptor* pZero = nullptr; if( bInit ) { @@ -573,7 +573,7 @@ bool Sane::Start( BitmapTransporter& rBitmap ) if( ( nOption = GetOptionByName( "resolution" ) ) != -1 ) (void)GetOptionValue( nOption, fResl ); - sal_uInt8* pBuffer = NULL; + sal_uInt8* pBuffer = nullptr; SANE_Status nStatus = SANE_STATUS_GOOD; @@ -700,7 +700,7 @@ bool Sane::Start( BitmapTransporter& rBitmap ) FD_SET( (int)fd, &fdset ); tv.tv_sec = 5; tv.tv_usec = 0; - if( select( fd+1, &fdset, NULL, NULL, &tv ) == 0 ) + if( select( fd+1, &fdset, nullptr, nullptr, &tv ) == 0 ) fprintf( stderr, "Timout on sane_read descriptor\n" ); } nLen = 0; @@ -890,7 +890,7 @@ int Sane::GetRange( int n, double*& rpDouble ) return -1; } - rpDouble = 0; + rpDouble = nullptr; int nItems, i; bool bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED; @@ -972,7 +972,7 @@ OUString Sane::GetOptionUnitName( int n ) bool Sane::ActivateButtonOption( int n ) { - SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, NULL ); + SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, nullptr ); if( nStatus != SANE_STATUS_GOOD ) return false; return true; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 85f7b08a53cb..95505d159589 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -84,7 +84,7 @@ public: ScanPreview(vcl::Window* pParent, WinBits nStyle) : Window(pParent, nStyle) , maMaxBottomRight(PREVIEW_WIDTH, PREVIEW_HEIGHT) - , mpParentDialog(NULL) + , mpParentDialog(nullptr) , meDragDirection(TopLeft) , mbDragEnable(false) , mbDragDrawn(false) @@ -214,7 +214,7 @@ SaneDlg::SaneDlg( vcl::Window* pParent, Sane& rSane, bool bScanEnabled ) : mbScanEnabled( bScanEnabled ), mnCurrentOption(0), mnCurrentElement(0), - mpRange(0), + mpRange(nullptr), mfMin(0.0), mfMax(0.0), doScan(false) @@ -399,7 +399,7 @@ void SaneDlg::InitFields() mpReslBox->Enable(); mpReslBox->SetValue( (long)fRes ); - double *pDouble = NULL; + double *pDouble = nullptr; nValue = mrSane.GetRange( nOption, pDouble ); if( nValue > -1 ) { @@ -445,8 +445,8 @@ void SaneDlg::InitFields() // set scan area for( i = 0; i < 4; i++ ) { - char const *pOptionName = NULL; - MetricField* pField = NULL; + char const *pOptionName = nullptr; + MetricField* pField = nullptr; switch( i ) { case 0: @@ -487,7 +487,7 @@ void SaneDlg::InitFields() case 3: aBottomRight.Y() = (int)fValue;break; } } - double *pDouble = NULL; + double *pDouble = nullptr; nValue = mrSane.GetRange( nOption, pDouble ); if( nValue > -1 ) { @@ -558,7 +558,7 @@ void SaneDlg::InitFields() // fill OptionBox mpOptionBox->Clear(); - SvTreeListEntry* pParentEntry = 0; + SvTreeListEntry* pParentEntry = nullptr; bool bGroupRejected = false; for( i = 1; i < mrSane.CountOptions(); i++ ) { @@ -789,7 +789,7 @@ IMPL_LINK_TYPED( SaneDlg, ModifyHdl, Edit&, rEdit, void ) int nOption = mrSane.GetOptionByName( "resolution" ); if( nOption != -1 ) { - double* pDouble = NULL; + double* pDouble = nullptr; int nValues = mrSane.GetRange( nOption, pDouble ); if( nValues > 0 ) { @@ -1010,7 +1010,7 @@ void SaneDlg::EstablishStringRange() { const char** ppStrings = mrSane.GetStringConstraint( mnCurrentOption ); mpStringRangeBox->Clear(); - for( int i = 0; ppStrings[i] != 0; i++ ) + for( int i = 0; ppStrings[i] != nullptr; i++ ) mpStringRangeBox->InsertEntry( OUString( ppStrings[i], strlen(ppStrings[i]), osl_getThreadTextEncoding() ) ); OString aValue; mrSane.GetOptionValue( mnCurrentOption, aValue ); @@ -1025,7 +1025,7 @@ void SaneDlg::EstablishQuantumRange() if( mpRange ) { delete [] mpRange; - mpRange = 0; + mpRange = nullptr; } int nValues = mrSane.GetRange( mnCurrentOption, mpRange ); if( nValues == 0 ) @@ -1033,7 +1033,7 @@ void SaneDlg::EstablishQuantumRange() mfMin = mpRange[ 0 ]; mfMax = mpRange[ 1 ]; delete [] mpRange; - mpRange = 0; + mpRange = nullptr; EstablishNumericOption(); } else if( nValues > 0 ) @@ -1484,7 +1484,7 @@ bool SaneDlg::SetAdjustedNumericalValue( if( nElement < 0 || nElement >= mrSane.GetOptionElements( nOption ) ) return false; - double* pValues = NULL; + double* pValues = nullptr; int nValues; if( ( nValues = mrSane.GetRange( nOption, pValues ) ) < 0 ) { diff --git a/extensions/source/scanner/scanner.cxx b/extensions/source/scanner/scanner.cxx index 7fcbb1fcd9d8..e9820977f4c3 100644 --- a/extensions/source/scanner/scanner.cxx +++ b/extensions/source/scanner/scanner.cxx @@ -32,7 +32,7 @@ Reference< XInterface > SAL_CALL ScannerManager_CreateInstance( const Reference< ScannerManager::ScannerManager() : - mpData( NULL ) + mpData( nullptr ) { AcquireData(); } @@ -86,7 +86,7 @@ Sequence< OUString > ScannerManager::getSupportedServiceNames_Static() throw () sal_Bool SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) throw( ScannerException, std::exception ) { - return configureScannerAndScan( rContext, NULL ); + return configureScannerAndScan( rContext, nullptr ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/scanner/scnserv.cxx b/extensions/source/scanner/scnserv.cxx index 49ae76d2d1be..66689fe6b529 100644 --- a/extensions/source/scanner/scnserv.cxx +++ b/extensions/source/scanner/scnserv.cxx @@ -30,7 +30,7 @@ using namespace com::sun::star::registry; extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL scn_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ ) { Reference< css::lang::XSingleServiceFactory > xFactory; - void* pRet = 0; + void* pRet = nullptr; if( OUString::createFromAscii( pImplName ) == ScannerManager::getImplementationName_Static() ) { diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 5b15700b5434..45ac34e76410 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -54,7 +54,7 @@ struct OutData osl::Condition& StopCondition; CURL *curl; - OutData(osl::Condition& rCondition) : FileHandle(NULL), Offset(0), StopCondition(rCondition), curl(NULL) {}; + OutData(osl::Condition& rCondition) : FileHandle(nullptr), Offset(0), StopCondition(rCondition), curl(nullptr) {}; }; @@ -133,12 +133,12 @@ write_function( void *ptr, size_t size, size_t nmemb, void *stream ) { OutData *out = static_cast < OutData * > (stream); - if( NULL == out->FileHandle ) + if( nullptr == out->FileHandle ) openFile(*out); sal_uInt64 nBytesWritten = 0; - if( NULL != out->FileHandle ) + if( nullptr != out->FileHandle ) osl_writeFile(out->FileHandle, ptr, size * nmemb, &nBytesWritten); return (size_t) nBytesWritten; @@ -233,7 +233,7 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal CURL * pCURL = curl_easy_init(); bool ret = false; - if( NULL != pCURL ) + if( nullptr != pCURL ) { out.curl = pCURL; @@ -272,7 +272,7 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal CURLcode cc = curl_easy_perform(pCURL); // treat zero byte downloads as errors - if( NULL == out.FileHandle ) + if( nullptr == out.FileHandle ) openFile(out); if( CURLE_OK == cc ) @@ -304,7 +304,7 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal OString aMessage("Unknown error"); const char * error_message = curl_easy_strerror(cc); - if( NULL != error_message ) + if( nullptr != error_message ) aMessage = error_message; if ( CURLE_HTTP_RETURNED_ERROR == cc ) @@ -367,7 +367,7 @@ Download::start(const OUString& rURL, const OUString& rFile, const OUString& rDe // check for existing file oslFileError rc = osl_openFile( aFile.pData, &out.FileHandle, osl_File_OpenFlag_Write | osl_File_OpenFlag_Create ); osl_closeFile(out.FileHandle); - out.FileHandle = NULL; + out.FileHandle = nullptr; if( osl_File_E_EXIST == rc ) { @@ -412,7 +412,7 @@ Download::start(const OUString& rURL, const OUString& rFile, const OUString& rDe bool ret = curl_run(rURL, out, aProxyHost, nProxyPort); - if( NULL != out.FileHandle ) + if( nullptr != out.FileHandle ) { osl_syncFile(out.FileHandle); osl_closeFile(out.FileHandle); diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 35e8c9ef03bb..82e37cf0f570 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -139,8 +139,8 @@ OUString getImageFromFileName(const OUString& aFile) aUnpackPath += "unpack_update"; } - oslFileHandle hOut = NULL; - oslProcess hProcess = NULL; + oslFileHandle hOut = nullptr; + oslProcess hProcess = nullptr; OUString aSystemPath; osl::File::getSystemPathFromFileURL(aFile, aSystemPath); @@ -149,11 +149,11 @@ OUString getImageFromFileName(const OUString& aFile) aUnpackPath.pData, // [in] Image name &aSystemPath.pData, 1, // [in] Arguments osl_Process_WAIT | osl_Process_NORMAL, // [in] Options - NULL, // [in] Security - NULL, // [in] Working directory - NULL, 0, // [in] Environment variables + nullptr, // [in] Security + nullptr, // [in] Working directory + nullptr, 0, // [in] Environment variables &hProcess, // [out] Process handle - NULL, &hOut, NULL // [out] File handles for redirected I/O + nullptr, &hOut, nullptr // [out] File handles for redirected I/O ); if( osl_Process_E_None == rc ) @@ -743,7 +743,7 @@ void SAL_CALL ShutdownThread::onTerminated() UpdateCheck::UpdateCheck() : m_eState(NOT_INITIALIZED) , m_eUpdateState(UPDATESTATES_COUNT) - , m_pThread(NULL) + , m_pThread(nullptr) , m_bHasExtensionUpdate(false) , m_bShowExtUpdDlg(false) { @@ -861,7 +861,7 @@ UpdateCheck::cancel() aGuard.clear(); - if( NULL != pThread ) + if( nullptr != pThread ) pThread->cancel(); setUIState(eUIState); @@ -947,7 +947,7 @@ UpdateCheck::pause() { osl::ClearableMutexGuard aGuard(m_aMutex); - if( NULL != m_pThread ) + if( nullptr != m_pThread ) m_pThread->suspend(); rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext); @@ -964,7 +964,7 @@ UpdateCheck::resume() { osl::ClearableMutexGuard aGuard(m_aMutex); - if( NULL != m_pThread ) + if( nullptr != m_pThread ) m_pThread->resume(); rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext); @@ -998,10 +998,10 @@ UpdateCheck::shutdownThread(bool join) // copy thread object pointer to stack osl::Thread *pThread = m_pThread; - m_pThread = NULL; + m_pThread = nullptr; aGuard.clear(); - if( NULL != pThread ) + if( nullptr != pThread ) { pThread->terminate(); if( join ) @@ -1029,7 +1029,7 @@ UpdateCheck::enableAutoCheck(bool enable) void UpdateCheck::enableDownload(bool enable, bool paused) { - OSL_ASSERT(NULL == m_pThread); + OSL_ASSERT(nullptr == m_pThread); State eState = DISABLED; if( enable ) diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 5adc8d5bb85c..1b3c2272ff0c 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -306,7 +306,7 @@ void SAL_CALL UpdateCheckJob::queryTermination( lang::EventObject const & ) void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & ) throw ( uno::RuntimeException, std::exception ) { - if ( m_pInitThread.get() != 0 ) + if ( m_pInitThread.get() != nullptr ) { m_pInitThread->setTerminating(); m_pInitThread->join(); @@ -344,7 +344,7 @@ static const cppu::ImplementationEntry kImplementations_entries[] = UpdateCheckJob::getImplName, UpdateCheckJob::getServiceNames, cppu::createSingleComponentFactory, - NULL, + nullptr, 0 }, { @@ -352,10 +352,10 @@ static const cppu::ImplementationEntry kImplementations_entries[] = UpdateCheckConfig::getImplName, UpdateCheckConfig::getServiceNames, cppu::createSingleComponentFactory, - NULL, + nullptr, 0 }, - { NULL, NULL, NULL, NULL, NULL, 0 } + { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } } ; diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 189b35bd8470..d4e03b3bac74 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -103,10 +103,10 @@ UpdateHandler::UpdateHandler( const uno::Reference< uno::XComponentContext > & r UpdateHandler::~UpdateHandler() { - mxContext = NULL; - mxUpdDlg = NULL; - mxInteractionHdl = NULL; - mxActionListener = NULL; + mxContext = nullptr; + mxUpdDlg = nullptr; + mxInteractionHdl = nullptr; + mxActionListener = nullptr; } @@ -436,7 +436,7 @@ void SAL_CALL UpdateHandler::handle( uno::Reference< task::XInteractionRequest > throw uno::RuntimeException( "UpdateHandler: unable to obtain service manager from component context", *this ); mxInteractionHdl.set( - task::InteractionHandler::createWithParent(mxContext, 0), + task::InteractionHandler::createWithParent(mxContext, nullptr), uno::UNO_QUERY_THROW); } uno::Reference< task::XInteractionRequestStringResolver > xStrResolver = @@ -1311,7 +1311,7 @@ void UpdateHandler::createDialog() xControl->setVisible( false ); } - xControl->createPeer( NULL, NULL ); + xControl->createPeer( nullptr, nullptr ); { for ( int i = 0; i < HELP_BUTTON; i++ ) { diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index 918b8610d4ac..bbf21be7a85a 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -539,7 +539,7 @@ UpdateInformationProvider::getChildNode(const uno::Reference< xml::dom::XNode >& return m_xXPathAPI->selectSingleNode(rxNode, "./atom:" + rName); } catch (const xml::xpath::XPathException &) { // ignore - return 0; + return nullptr; } } @@ -773,10 +773,10 @@ static const cppu::ImplementationEntry kImplementations_entries[] = UpdateInformationProvider::getImplName, UpdateInformationProvider::getServiceNames, cppu::createSingleComponentFactory, - NULL, + nullptr, 0 }, - { NULL, NULL, NULL, NULL, NULL, 0 } + { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } } ; diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index a78cfdaedb1f..a9335156d968 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -200,7 +200,7 @@ public: UpdateCheckUI::UpdateCheckUI(const uno::Reference<uno::XComponentContext>& xContext) : m_xContext(xContext) - , mpIconMBar( NULL ) + , mpIconMBar( nullptr ) , mbShowBubble( false ) , mbShowMenuIcon( false ) , mbBubbleChanged( false ) @@ -385,7 +385,7 @@ void SAL_CALL UpdateCheckUI::disposing(const lang::EventObject&) uno::Reference< beans::XPropertySetInfo > UpdateCheckUI::getPropertySetInfo() throw ( uno::RuntimeException, std::exception ) { - return NULL; + return nullptr; } @@ -519,11 +519,11 @@ void UpdateCheckUI::removeVetoableChangeListener( const OUString& /*aPropertyNam BubbleWindow * UpdateCheckUI::GetBubbleWindow() { if ( !mpIconSysWin ) - return NULL; + return nullptr; Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); if( aIconRect.IsEmpty() ) - return NULL; + return nullptr; BubbleWindow* pBubbleWin = mpBubbleWin; @@ -564,16 +564,16 @@ void UpdateCheckUI::RemoveBubbleWindow( bool bRemoveIcon ) if ( mpIconMBar && ( mnIconID != 0 ) ) { mpIconMBar->RemoveMenuBarButton( mnIconID ); - mpIconMBar = NULL; + mpIconMBar = nullptr; mnIconID = 0; } } catch ( ... ) { - mpIconMBar = NULL; + mpIconMBar = nullptr; mnIconID = 0; } - mpIconSysWin = NULL; + mpIconSysWin = nullptr; } } @@ -637,9 +637,9 @@ IMPL_LINK_NOARG_TYPED(UpdateCheckUI, UserEventHdl, void*, void) vcl::Window *pTopWin = Application::GetFirstTopLevelWindow(); vcl::Window *pActiveWin = Application::GetActiveTopWindow(); - SystemWindow *pActiveSysWin = NULL; + SystemWindow *pActiveSysWin = nullptr; - vcl::Window *pBubbleWin = NULL; + vcl::Window *pBubbleWin = nullptr; if ( mpBubbleWin ) pBubbleWin = mpBubbleWin; @@ -647,7 +647,7 @@ IMPL_LINK_NOARG_TYPED(UpdateCheckUI, UserEventHdl, void*, void) pActiveSysWin = pActiveWin->GetSystemWindow(); if ( pActiveWin == pBubbleWin ) - pActiveSysWin = NULL; + pActiveSysWin = nullptr; while ( !pActiveSysWin && pTopWin ) { @@ -700,7 +700,7 @@ IMPL_LINK_TYPED( UpdateCheckUI, WindowEventHdl, VclWindowEvent&, rEvent, void ) { SolarMutexGuard aGuard; if ( ( mpIconSysWin == rEvent.GetWindow() ) && - mpBubbleWin && ( mpIconMBar != NULL ) ) + mpBubbleWin && ( mpIconMBar != nullptr ) ) { Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); Point aWinPos = aIconRect.BottomCenter(); @@ -725,7 +725,7 @@ IMPL_LINK_TYPED( UpdateCheckUI, ApplicationEventHdl, VclSimpleEvent&, rEvent, vo if ( pWindow && pWindow->IsTopWindow() ) { SystemWindow *pSysWin = pWindow->GetSystemWindow(); - MenuBar *pMBar = pSysWin ? pSysWin->GetMenuBar() : NULL; + MenuBar *pMBar = pSysWin ? pSysWin->GetMenuBar() : nullptr; if (pMBar) { AddMenuBarIcon( pSysWin, true ); @@ -969,10 +969,10 @@ static const cppu::ImplementationEntry kImplementations_entries[] = getImplementationName, getServiceNames, cppu::createSingleComponentFactory, - NULL, + nullptr, 0 }, - { NULL, NULL, NULL, NULL, NULL, 0 } + { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } } ; |