diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:26:52 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:55 +0100 |
commit | 05b4902145b0924393b5ae4d9e9dfb92d2926b99 (patch) | |
tree | 24ae58a44bf1239ab96d34cc9028118261b2d3ff /ucb/source/ucp/file | |
parent | 1c4f33b5d8ba6a8cebb0235bb2e7e37e33045a5b (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I72bf3e008a8941d6e0fdea81b6b3e4a959ff28c5
Diffstat (limited to 'ucb/source/ucp/file')
-rw-r--r-- | ucb/source/ucp/file/bc.cxx | 42 | ||||
-rw-r--r-- | ucb/source/ucp/file/filid.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/file/filrow.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/file/filrset.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/file/filrset.hxx | 10 | ||||
-rw-r--r-- | ucb/source/ucp/file/filtask.hxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/file/prov.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/file/shell.cxx | 54 |
8 files changed, 64 insertions, 64 deletions
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 82e3f292c1cb..f55962484a21 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -82,14 +82,14 @@ BaseContent::BaseContent( shell* pMyShell, const OUString& parentName, bool bFolder ) : m_pMyShell( pMyShell ), - m_xContentIdentifier( 0 ), + m_xContentIdentifier( nullptr ), m_aUncPath( parentName ), m_bFolder( bFolder ), m_nState( JustInserted ), - m_pDisposeEventListeners( 0 ), - m_pContentEventListeners( 0 ), - m_pPropertySetInfoChangeListeners( 0 ), - m_pPropertyListener( 0 ) + m_pDisposeEventListeners( nullptr ), + m_pContentEventListeners( nullptr ), + m_pPropertySetInfoChangeListeners( nullptr ), + m_pPropertyListener( nullptr ) { m_pMyShell->m_pProvider->acquire(); // No registering, since we have no name @@ -107,10 +107,10 @@ BaseContent::BaseContent( shell* pMyShell, m_aUncPath( aUncPath ), m_bFolder( false ), m_nState( FullFeatured ), - m_pDisposeEventListeners( 0 ), - m_pContentEventListeners( 0 ), - m_pPropertySetInfoChangeListeners( 0 ), - m_pPropertyListener( 0 ) + m_pDisposeEventListeners( nullptr ), + m_pContentEventListeners( nullptr ), + m_pPropertySetInfoChangeListeners( nullptr ), + m_pPropertyListener( nullptr ) { m_pMyShell->m_pProvider->acquire(); m_pMyShell->registerNotifier( m_aUncPath,this ); @@ -219,17 +219,17 @@ BaseContent::dispose() pDisposeEventListeners = - m_pDisposeEventListeners, m_pDisposeEventListeners = 0; + m_pDisposeEventListeners, m_pDisposeEventListeners = nullptr; pContentEventListeners = - m_pContentEventListeners, m_pContentEventListeners = 0; + m_pContentEventListeners, m_pContentEventListeners = nullptr; pPropertySetInfoChangeListeners = m_pPropertySetInfoChangeListeners, - m_pPropertySetInfoChangeListeners = 0; + m_pPropertySetInfoChangeListeners = nullptr; pPropertyListener = - m_pPropertyListener, m_pPropertyListener = 0; + m_pPropertyListener, m_pPropertyListener = nullptr; } if ( pDisposeEventListeners && pDisposeEventListeners->getLength() ) @@ -722,7 +722,7 @@ BaseContent::getParent( bool err = fileaccess::shell::getUrlFromUnq( ParentUnq, ParentUrl ); if( err ) - return Reference< XInterface >( 0 ); + return Reference< XInterface >( nullptr ); FileContentIdentifier* p = new FileContentIdentifier( ParentUnq ); Reference< XContentIdentifier > Identifier( p ); @@ -969,7 +969,7 @@ BaseContent::open( sal_Int32 nMyCommandIdentifier, const OpenCommandArgument2& aCommandArgument ) { - Reference< XDynamicResultSet > retValue( 0 ); + Reference< XDynamicResultSet > retValue( nullptr ); if( ( m_nState & Deleted ) ) { @@ -1268,7 +1268,7 @@ BaseContent::cDEL() m_xContentIdentifier, m_pContentEventListeners->getElements() ); else - p = 0; + p = nullptr; return p; } @@ -1284,7 +1284,7 @@ BaseContent::cEXC( const OUString& aNewName ) FileContentIdentifier* pp = new FileContentIdentifier( aNewName ); m_xContentIdentifier.set( pp ); - ContentEventNotifier* p = 0; + ContentEventNotifier* p = nullptr; if( m_pContentEventListeners ) p = new ContentEventNotifier( m_pMyShell, this, @@ -1300,7 +1300,7 @@ ContentEventNotifier* BaseContent::cCEL() { osl::MutexGuard aGuard( m_aMutex ); - ContentEventNotifier* p = 0; + ContentEventNotifier* p = nullptr; if( m_pContentEventListeners ) p = new ContentEventNotifier( m_pMyShell, this, @@ -1314,7 +1314,7 @@ PropertySetInfoChangeNotifier* BaseContent::cPSL() { osl::MutexGuard aGuard( m_aMutex ); - PropertySetInfoChangeNotifier* p = 0; + PropertySetInfoChangeNotifier* p = nullptr; if( m_pPropertySetInfoChangeListeners ) p = new PropertySetInfoChangeNotifier( this, m_xContentIdentifier, @@ -1331,11 +1331,11 @@ BaseContent::cPCL() osl::MutexGuard aGuard( m_aMutex ); if (!m_pPropertyListener) - return NULL; + return nullptr; Sequence< OUString > seqNames = m_pPropertyListener->getContainedTypes(); - PropertyChangeNotifier* p = 0; + PropertyChangeNotifier* p = nullptr; sal_Int32 length = seqNames.getLength(); diff --git a/ucb/source/ucp/file/filid.cxx b/ucb/source/ucp/file/filid.cxx index f2d45bb55292..2652a95a8641 100644 --- a/ucb/source/ucp/file/filid.cxx +++ b/ucb/source/ucp/file/filid.cxx @@ -93,7 +93,7 @@ FileContentIdentifier::getTypes( void ) throw( uno::RuntimeException, std::exception ) { - static cppu::OTypeCollection* pCollection = NULL; + static cppu::OTypeCollection* pCollection = nullptr; if ( !pCollection ) { osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() ); if ( !pCollection ) diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index ad497f6997d8..978263290d98 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx @@ -80,7 +80,7 @@ XRow_impl::XRow_impl( shell* pMyShell,const uno::Sequence< uno::Any >& seq ) m_nWasNull(false), m_pMyShell( pMyShell ), m_xProvider( pMyShell->m_pProvider ), - m_xTypeConverter( 0 ) + m_xTypeConverter( nullptr ) { } diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index 60bbfbb7a8b4..3f973de9143b 100644 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.cxx @@ -56,9 +56,9 @@ XResultSet_impl::XResultSet_impl( shell* pMyShell, , m_aFolder( aUnqPath ) , m_sProperty( seq ) , m_sSortingInfo( seqSort ) - , m_pDisposeEventListeners( 0 ) - , m_pRowCountListeners( 0 ) - , m_pIsFinalListeners( 0 ) + , m_pDisposeEventListeners( nullptr ) + , m_pRowCountListeners( nullptr ) + , m_pIsFinalListeners( nullptr ) , m_bStatic( false ) , m_nErrorCode( TASKHANDLER_NO_ERROR ) , m_nMinorErrorCode( TASKHANDLER_NO_ERROR ) @@ -671,7 +671,7 @@ XResultSet_impl::connectToCache( if( xStubFactory.is() ) { xStubFactory->connectToCache( - this, xCache,m_sSortingInfo, NULL ); + this, xCache,m_sSortingInfo, nullptr ); return; } } diff --git a/ucb/source/ucp/file/filrset.hxx b/ucb/source/ucp/file/filrset.hxx index e018d67787e3..daa5de3ae6b9 100644 --- a/ucb/source/ucp/file/filrset.hxx +++ b/ucb/source/ucp/file/filrset.hxx @@ -63,27 +63,27 @@ class XResultSet_impl : public Notifier, virtual ContentEventNotifier* cDEL() override { - return 0; + return nullptr; } virtual ContentEventNotifier* cEXC( const OUString& ) override { - return 0; + return nullptr; } virtual ContentEventNotifier* cCEL() override { - return 0; + return nullptr; } virtual PropertySetInfoChangeNotifier* cPSL() override { - return 0; + return nullptr; } virtual PropertyChangeNotifier* cPCL() override { - return 0; + return nullptr; } sal_Int32 SAL_CALL CtorSuccess() { return m_nErrorCode;} diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx index 44e6870b3216..a515f549a664 100644 --- a/ucb/source/ucp/file/filtask.hxx +++ b/ucb/source/ucp/file/filtask.hxx @@ -63,13 +63,13 @@ namespace fileaccess explicit TaskHandling( const css::uno::Reference< css::ucb::XCommandEnvironment >& xCommandEnv - = css::uno::Reference< css::ucb::XCommandEnvironment >( 0 ) ) + = css::uno::Reference< css::ucb::XCommandEnvironment >( nullptr ) ) : m_bAbort( false ), m_bHandled( false ), m_nErrorCode( TASKHANDLER_NO_ERROR ), m_nMinorCode( TASKHANDLER_NO_ERROR ), - m_xInteractionHandler( 0 ), - m_xProgressHandler( 0 ), + m_xInteractionHandler( nullptr ), + m_xProgressHandler( nullptr ), m_xCommandEnvironment( xCommandEnv ) { } diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 82cfca68f3b0..96db2c759a31 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -50,7 +50,7 @@ using namespace com::sun::star::container; extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpfile_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * ) { - void * pRet = 0; + void * pRet = nullptr; Reference< XMultiServiceFactory > xSMgr( static_cast< XMultiServiceFactory * >( pServiceManager ) ); @@ -87,7 +87,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpfile_component_getFactory( FileProvider::FileProvider( const Reference< XComponentContext >& rxContext ) : m_xContext(rxContext) , m_FileSystemNotation(FileSystemNotation::UNKNOWN_NOTATION) - , m_pMyShell(NULL) + , m_pMyShell(nullptr) { } diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 2d3cea0631d7..cb27c763df17 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -70,11 +70,11 @@ using namespace com::sun::star::ucb; #endif shell::UnqPathData::UnqPathData() - : properties( 0 ), - notifier( 0 ), - xS( 0 ), - xC( 0 ), - xA( 0 ) + : properties( nullptr ), + notifier( nullptr ), + xS( nullptr ), + xC( nullptr ), + xA( nullptr ) { // empty } @@ -97,11 +97,11 @@ shell::UnqPathData& shell::UnqPathData::operator=( UnqPathData& a ) xS = a.xS; xC = a.xC; xA = a.xA; - a.properties = 0; - a.notifier = 0; - a.xS = 0; - a.xC = 0; - a.xA = 0; + a.properties = nullptr; + a.notifier = nullptr; + a.xS = nullptr; + a.xC = nullptr; + a.xA = nullptr; return *this; } @@ -543,9 +543,9 @@ shell::deassociate( const OUString& aUnqPath, if( properties.find( ContentTProperty )->getState() == beans::PropertyState_DEFAULT_VALUE ) { - it->second.xS = 0; - it->second.xC = 0; - it->second.xA = 0; + it->second.xS = nullptr; + it->second.xC = nullptr; + it->second.xA = nullptr; if(m_xFileRegistry.is()) m_xFileRegistry->removePropertySet( aUnqPath ); } @@ -672,7 +672,7 @@ shell::open( sal_Int32 CommandId, xInputStream->getMinorError() ); delete xInputStream; - xInputStream = 0; + xInputStream = nullptr; } return uno::Reference< io::XInputStream >( xInputStream ); @@ -708,7 +708,7 @@ shell::open_rw( sal_Int32 CommandId, xStream->getMinorError() ); delete xStream; - xStream = 0; + xStream = nullptr; } return uno::Reference< io::XStream >( xStream ); } @@ -744,7 +744,7 @@ shell::ls( sal_Int32 CommandId, p->getMinorError() ); delete p; - p = 0; + p = nullptr; } return uno::Reference< XDynamicResultSet > ( p ); @@ -893,7 +893,7 @@ shell::setv( const OUString& aUnqPath, IOErrorCode ioError(IOErrorCode_GENERAL); ret[i] <<= InteractiveAugmentedIOException( OUString(), - 0, + nullptr, task::InteractionClassification_ERROR, ioError, names ); @@ -1001,7 +1001,7 @@ shell::setv( const OUString& aUnqPath, } ret[i] <<= InteractiveAugmentedIOException( OUString(), - 0, + nullptr, task::InteractionClassification_ERROR, ioError, names ); @@ -1290,7 +1290,7 @@ bool getType( TaskManager & task, sal_Int32 id, OUString const & fileUrl, osl::DirectoryItem * item, osl::FileStatus::Type * type) { - OSL_ASSERT(item != 0 && type != 0); + OSL_ASSERT(item != nullptr && type != nullptr); osl::FileBase::RC err = osl::DirectoryItem::get(fileUrl, *item); if (err != osl::FileBase::E_None) { task.installError(id, TASKHANDLING_TRANSFER_BY_COPY_SOURCE, err); @@ -2243,7 +2243,7 @@ shell::commit( const shell::ContentMap::iterator& it, uno::Any aAny; shell::PropertySet::iterator it1; - if( it->second.properties == 0 ) + if( it->second.properties == nullptr ) { OUString aPath = it->first; insertDefaultProperties( aPath ); @@ -2755,12 +2755,12 @@ shell::getContentExchangedEventListeners( const OUString& aOldPrefix, // copy Ownership also delete itnew->second.properties; itnew->second.properties = itold->second.properties; - itold->second.properties = 0; + itold->second.properties = nullptr; // copy existing list std::list< Notifier* >* copyList = itnew->second.notifier; itnew->second.notifier = itold->second.notifier; - itold->second.notifier = 0; + itold->second.notifier = nullptr; m_aContent.erase( itold ); @@ -2780,7 +2780,7 @@ shell::getContentExchangedEventListeners( const OUString& aOldPrefix, // Merge with preexisting notifiers // However, these may be in status BaseContent::Deleted - if( copyList != 0 ) + if( copyList != nullptr ) { std::list< Notifier* >::iterator copyIt = copyList->begin(); while( copyIt != copyList->end() ) @@ -2906,12 +2906,12 @@ shell::erasePersistentSet( const OUString& aUnqPath, ContentMap::iterator it = m_aContent.find( old_Name ); if( it != m_aContent.end() ) { - it->second.xS = 0; - it->second.xC = 0; - it->second.xA = 0; + it->second.xS = nullptr; + it->second.xC = nullptr; + it->second.xA = nullptr; delete it->second.properties; - it->second.properties = 0; + it->second.properties = nullptr; } } |