Kaydet (Commit) 9c9276c9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

ucbhelper: Use appropriate OUString functions on string constants

Change-Id: Id5832f8ca20f5ff3179a25bc3c28be7b9fde5bfb
üst dd728444
...@@ -1193,7 +1193,7 @@ void Content_Impl::disposing( const EventObject& Source ) ...@@ -1193,7 +1193,7 @@ void Content_Impl::disposing( const EventObject& Source )
xContent = m_xContent; xContent = m_xContent;
m_aURL = ""; m_aURL.clear();
m_xCommandProcessor = 0; m_xCommandProcessor = 0;
m_xContent = 0; m_xContent = 0;
} }
...@@ -1314,7 +1314,7 @@ void Content_Impl::inserted() ...@@ -1314,7 +1314,7 @@ void Content_Impl::inserted()
{ {
// URL might have changed during 'insert' => recalculate in next getURL() // URL might have changed during 'insert' => recalculate in next getURL()
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
m_aURL = ""; m_aURL.clear();
} }
......
...@@ -288,7 +288,7 @@ XTYPEPROVIDER_IMPL_9( ResultSet, ...@@ -288,7 +288,7 @@ XTYPEPROVIDER_IMPL_9( ResultSet,
XSERVICEINFO_NOFACTORY_IMPL_1( ResultSet, XSERVICEINFO_NOFACTORY_IMPL_1( ResultSet,
OUString("ResultSet"), OUString("ResultSet"),
OUString(RESULTSET_SERVICE_NAME ) ); RESULTSET_SERVICE_NAME );
...@@ -1334,14 +1334,12 @@ void SAL_CALL ResultSet::setPropertyValue( const OUString& aPropertyName, ...@@ -1334,14 +1334,12 @@ void SAL_CALL ResultSet::setPropertyValue( const OUString& aPropertyName,
if ( aPropertyName.isEmpty() ) if ( aPropertyName.isEmpty() )
throw beans::UnknownPropertyException(); throw beans::UnknownPropertyException();
if ( aPropertyName.equals( if ( aPropertyName == "RowCount" )
OUString("RowCount") ) )
{ {
// property is read-only. // property is read-only.
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
} }
else if ( aPropertyName.equals( else if ( aPropertyName == "IsRowCountFinal" )
OUString("IsRowCountFinal") ) )
{ {
// property is read-only. // property is read-only.
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
...@@ -1365,13 +1363,11 @@ uno::Any SAL_CALL ResultSet::getPropertyValue( ...@@ -1365,13 +1363,11 @@ uno::Any SAL_CALL ResultSet::getPropertyValue(
uno::Any aValue; uno::Any aValue;
if ( PropertyName.equals( if ( PropertyName == "RowCount" )
OUString("RowCount") ) )
{ {
aValue <<= m_pImpl->m_xDataSupplier->currentCount(); aValue <<= m_pImpl->m_xDataSupplier->currentCount();
} }
else if ( PropertyName.equals( else if ( PropertyName == "IsRowCountFinal" )
OUString("IsRowCountFinal") ) )
{ {
aValue <<= m_pImpl->m_xDataSupplier->isCountFinal(); aValue <<= m_pImpl->m_xDataSupplier->isCountFinal();
} }
...@@ -1397,10 +1393,8 @@ void SAL_CALL ResultSet::addPropertyChangeListener( ...@@ -1397,10 +1393,8 @@ void SAL_CALL ResultSet::addPropertyChangeListener(
osl::MutexGuard aGuard( m_pImpl->m_aMutex ); osl::MutexGuard aGuard( m_pImpl->m_aMutex );
if ( !aPropertyName.isEmpty() && if ( !aPropertyName.isEmpty() &&
!aPropertyName.equals( aPropertyName != "RowCount" &&
OUString("RowCount") ) && aPropertyName != "IsRowCountFinal" )
!aPropertyName.equals(
OUString("IsRowCountFinal") ) )
throw beans::UnknownPropertyException(); throw beans::UnknownPropertyException();
if ( !m_pImpl->m_pPropertyChangeListeners ) if ( !m_pImpl->m_pPropertyChangeListeners )
...@@ -1423,10 +1417,8 @@ void SAL_CALL ResultSet::removePropertyChangeListener( ...@@ -1423,10 +1417,8 @@ void SAL_CALL ResultSet::removePropertyChangeListener(
osl::MutexGuard aGuard( m_pImpl->m_aMutex ); osl::MutexGuard aGuard( m_pImpl->m_aMutex );
if ( !aPropertyName.isEmpty() && if ( !aPropertyName.isEmpty() &&
!aPropertyName.equals( aPropertyName != "RowCount" &&
OUString("RowCount") ) && aPropertyName != "IsRowCountFinal" )
!aPropertyName.equals(
OUString("IsRowCountFinal") ) )
throw beans::UnknownPropertyException(); throw beans::UnknownPropertyException();
if ( m_pImpl->m_pPropertyChangeListeners ) if ( m_pImpl->m_pPropertyChangeListeners )
......
...@@ -112,8 +112,7 @@ XTYPEPROVIDER_IMPL_3( ResultSetImplHelper, ...@@ -112,8 +112,7 @@ XTYPEPROVIDER_IMPL_3( ResultSetImplHelper,
XSERVICEINFO_NOFACTORY_IMPL_1( ResultSetImplHelper, XSERVICEINFO_NOFACTORY_IMPL_1( ResultSetImplHelper,
OUString( OUString(
"ResultSetImplHelper" ), "ResultSetImplHelper" ),
OUString( DYNAMICRESULTSET_SERVICE_NAME );
DYNAMICRESULTSET_SERVICE_NAME ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment