diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:35:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:08 +0200 |
commit | 5285beeaa49f6678b471d472868c305c7d9da5f9 (patch) | |
tree | a3dbd28995142ab16b448f28e95821115ef5408f /ucb | |
parent | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (diff) |
remove redundant calls to OUString constructor in if expression
Convert code like:
if( aStr == OUString("xxxx") )
to this:
if( aStr == "xxxx" )
Change-Id: I8d201f048477731eff590fb988259ef0935c080c
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/filrset.cxx | 16 | ||||
-rw-r--r-- | ucb/source/ucp/file/prov.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpresultsetbase.cxx | 16 |
3 files changed, 17 insertions, 17 deletions
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index 315fe9c3e4ea..457f4ca77b11 100644 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.cxx @@ -813,8 +813,8 @@ void SAL_CALL XResultSet_impl::setPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == OUString("IsRowCountFinal") || - aPropertyName == OUString("RowCount") ) + if( aPropertyName == "IsRowCountFinal" || + aPropertyName == "RowCount" ) return; throw beans::UnknownPropertyException( OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -826,13 +826,13 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == OUString("IsRowCountFinal") ) + if( PropertyName == "IsRowCountFinal" ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == OUString("RowCount") ) + else if ( PropertyName == "RowCount" ) { uno::Any aAny; sal_Int32 count = sal::static_int_cast<sal_Int32>(m_aItems.size()); @@ -851,7 +851,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == OUString("IsRowCountFinal") ) + if( aPropertyName == "IsRowCountFinal" ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -860,7 +860,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == OUString("RowCount") ) + else if ( aPropertyName == "RowCount" ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -880,13 +880,13 @@ void SAL_CALL XResultSet_impl::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == OUString("IsRowCountFinal") && + if( aPropertyName == "IsRowCountFinal" && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == OUString("RowCount") && + else if ( aPropertyName == "RowCount" && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index ee414b9bb960..ee8a19fca8fc 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -192,7 +192,7 @@ FileProvider::supportsService( const OUString& ServiceName ) throw( RuntimeException ) { - return ServiceName == OUString("com.sun.star.ucb.FileContentProvider"); + return ServiceName == "com.sun.star.ucb.FileContentProvider"; } diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx index 589f7aabe285..f220f09f44da 100644 --- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx @@ -527,8 +527,8 @@ void SAL_CALL ResultSetBase::setPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == OUString("IsRowCountFinal") || - aPropertyName == OUString("RowCount") ) + if( aPropertyName == "IsRowCountFinal" || + aPropertyName == "RowCount" ) return; throw beans::UnknownPropertyException(); @@ -541,13 +541,13 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == OUString("IsRowCountFinal") ) + if( PropertyName == "IsRowCountFinal" ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == OUString("RowCount") ) + else if ( PropertyName == "RowCount" ) { uno::Any aAny; sal_Int32 count = m_aItems.size(); @@ -566,7 +566,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == OUString("IsRowCountFinal") ) + if( aPropertyName == "IsRowCountFinal" ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -575,7 +575,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == OUString("RowCount") ) + else if ( aPropertyName == "RowCount" ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -595,13 +595,13 @@ void SAL_CALL ResultSetBase::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == OUString("IsRowCountFinal") && + if( aPropertyName == "IsRowCountFinal" && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == OUString("RowCount") && + else if ( aPropertyName == "RowCount" && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); |