summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-21 10:21:01 +0200
committerNoel Grandin <noel@peralex.com>2013-10-23 08:29:15 +0200
commit7a06928bcf638e1eeedebc9d53c306a1b852cc9b (patch)
treec0402c2da4e2c522ecf32a0b413128f727cbc0fa /svl/source
parenta55d02bacb2c8f21cba759c8fe3931df07a85b0c (diff)
convert code to use OUString::endsWith
Convert places that call aStr[aStr.getLength()-1] == 'x' to use the shorter form aStr.endsWith("x") Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
Diffstat (limited to 'svl/source')
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx8
-rw-r--r--svl/source/passwordcontainer/syscreds.cxx4
2 files changed, 6 insertions, 6 deletions
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 ) )