diff options
Diffstat (limited to 'svl')
-rw-r--r-- | svl/qa/unit/test_URIHelper.cxx | 2 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 8 | ||||
-rw-r--r-- | svl/source/passwordcontainer/syscreds.cxx | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/svl/qa/unit/test_URIHelper.cxx b/svl/qa/unit/test_URIHelper.cxx index 3d160d66bee5..313ce6538c96 100644 --- a/svl/qa/unit/test_URIHelper.cxx +++ b/svl/qa/unit/test_URIHelper.cxx @@ -162,7 +162,7 @@ css::uno::Any Content::execute( uri += "/"; break; case '2': - if (uri.getLength() > 0 && uri[uri.getLength() - 1] == '/') { + if (uri.endsWith("/")) { uri = uri.copy(0, uri.getLength() -1); } break; diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 8c4f7d28361f..ad99f8bb19bc 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -788,8 +788,8 @@ UrlRecord PasswordContainer::find( else { OUString tmpUrl( aUrl ); - if ( tmpUrl.getStr()[tmpUrl.getLength() - 1] != (sal_Unicode)'/' ) - tmpUrl += OUString("/"); + if ( !tmpUrl.endsWith("/") ) + tmpUrl += "/"; aIter = m_aContainer.lower_bound( tmpUrl ); if( aIter != m_aContainer.end() && aIter->first.match( tmpUrl ) ) @@ -919,7 +919,7 @@ void SAL_CALL PasswordContainer::remove( const OUString& aURL, const OUString& a if( aInd > 0 && aUrl.getLength()-1 == aInd ) aUrl = aUrl.copy( 0, aUrl.getLength() - 1 ); else - aUrl += OUString("/"); + aUrl += "/"; aIter = m_aContainer.find( aUrl ); } @@ -960,7 +960,7 @@ void SAL_CALL PasswordContainer::removePersistent( const OUString& aURL, const O if( aInd > 0 && aUrl.getLength()-1 == aInd ) aUrl = aUrl.copy( 0, aUrl.getLength() - 1 ); else - aUrl += OUString("/"); + aUrl += "/"; aIter = m_aContainer.find( aUrl ); } diff --git a/svl/source/passwordcontainer/syscreds.cxx b/svl/source/passwordcontainer/syscreds.cxx index 9423acfc005f..5bd60dcf8537 100644 --- a/svl/source/passwordcontainer/syscreds.cxx +++ b/svl/source/passwordcontainer/syscreds.cxx @@ -141,8 +141,8 @@ namespace else { OUString tmpUrl( aUrl ); - if ( tmpUrl.getStr()[tmpUrl.getLength() - 1] != (sal_Unicode)'/' ) - tmpUrl += OUString("/"); + if ( !tmpUrl.endsWith("/") ) + tmpUrl += "/"; aIter = rContainer.lower_bound( tmpUrl ); if( aIter != rContainer.end() && aIter->match( tmpUrl ) ) |