diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:37:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:36 +0100 |
commit | 9c9276c9e1d6cd2b9bd4bb69349dfb6fb32e6bf3 (patch) | |
tree | 928a6378bc5e1e23e0d89a81a9790c5b1f7e5ed5 /ucbhelper | |
parent | dd728444acddddd22ec659e0f9ff607673ead546 (diff) |
ucbhelper: Use appropriate OUString functions on string constants
Change-Id: Id5832f8ca20f5ff3179a25bc3c28be7b9fde5bfb
Diffstat (limited to 'ucbhelper')
-rw-r--r-- | ucbhelper/source/client/content.cxx | 4 | ||||
-rw-r--r-- | ucbhelper/source/provider/resultset.cxx | 26 | ||||
-rw-r--r-- | ucbhelper/source/provider/resultsethelper.cxx | 3 |
3 files changed, 12 insertions, 21 deletions
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index d0a5c19a7956..c9887dd771ae 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -1193,7 +1193,7 @@ void Content_Impl::disposing( const EventObject& Source ) xContent = m_xContent; - m_aURL = ""; + m_aURL.clear(); m_xCommandProcessor = 0; m_xContent = 0; } @@ -1314,7 +1314,7 @@ void Content_Impl::inserted() { // URL might have changed during 'insert' => recalculate in next getURL() osl::MutexGuard aGuard( m_aMutex ); - m_aURL = ""; + m_aURL.clear(); } diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx index 19e604cde931..3a94891b26ff 100644 --- a/ucbhelper/source/provider/resultset.cxx +++ b/ucbhelper/source/provider/resultset.cxx @@ -288,7 +288,7 @@ XTYPEPROVIDER_IMPL_9( ResultSet, XSERVICEINFO_NOFACTORY_IMPL_1( ResultSet, OUString("ResultSet"), - OUString(RESULTSET_SERVICE_NAME ) ); + RESULTSET_SERVICE_NAME ); @@ -1334,14 +1334,12 @@ void SAL_CALL ResultSet::setPropertyValue( const OUString& aPropertyName, if ( aPropertyName.isEmpty() ) throw beans::UnknownPropertyException(); - if ( aPropertyName.equals( - OUString("RowCount") ) ) + if ( aPropertyName == "RowCount" ) { // property is read-only. throw lang::IllegalArgumentException(); } - else if ( aPropertyName.equals( - OUString("IsRowCountFinal") ) ) + else if ( aPropertyName == "IsRowCountFinal" ) { // property is read-only. throw lang::IllegalArgumentException(); @@ -1365,13 +1363,11 @@ uno::Any SAL_CALL ResultSet::getPropertyValue( uno::Any aValue; - if ( PropertyName.equals( - OUString("RowCount") ) ) + if ( PropertyName == "RowCount" ) { aValue <<= m_pImpl->m_xDataSupplier->currentCount(); } - else if ( PropertyName.equals( - OUString("IsRowCountFinal") ) ) + else if ( PropertyName == "IsRowCountFinal" ) { aValue <<= m_pImpl->m_xDataSupplier->isCountFinal(); } @@ -1397,10 +1393,8 @@ void SAL_CALL ResultSet::addPropertyChangeListener( osl::MutexGuard aGuard( m_pImpl->m_aMutex ); if ( !aPropertyName.isEmpty() && - !aPropertyName.equals( - OUString("RowCount") ) && - !aPropertyName.equals( - OUString("IsRowCountFinal") ) ) + aPropertyName != "RowCount" && + aPropertyName != "IsRowCountFinal" ) throw beans::UnknownPropertyException(); if ( !m_pImpl->m_pPropertyChangeListeners ) @@ -1423,10 +1417,8 @@ void SAL_CALL ResultSet::removePropertyChangeListener( osl::MutexGuard aGuard( m_pImpl->m_aMutex ); if ( !aPropertyName.isEmpty() && - !aPropertyName.equals( - OUString("RowCount") ) && - !aPropertyName.equals( - OUString("IsRowCountFinal") ) ) + aPropertyName != "RowCount" && + aPropertyName != "IsRowCountFinal" ) throw beans::UnknownPropertyException(); if ( m_pImpl->m_pPropertyChangeListeners ) diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx index 359cca501d7f..63bb5cda3ff1 100644 --- a/ucbhelper/source/provider/resultsethelper.cxx +++ b/ucbhelper/source/provider/resultsethelper.cxx @@ -112,8 +112,7 @@ XTYPEPROVIDER_IMPL_3( ResultSetImplHelper, XSERVICEINFO_NOFACTORY_IMPL_1( ResultSetImplHelper, OUString( "ResultSetImplHelper" ), - OUString( - DYNAMICRESULTSET_SERVICE_NAME ) ); + DYNAMICRESULTSET_SERVICE_NAME ); |