diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-04 11:43:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-04 11:52:34 +0200 |
commit | cc25f70ef1e9fa7637b4bfd332ebdc33844a41c2 (patch) | |
tree | 76fe846c5b4ec24faa6ee53d34c49554eac3d4a8 /ucb/source/ucp/file | |
parent | adc20c3937f3119d39af5a0c8e4a439d8127fe63 (diff) |
compareTo -> equals
convert OUString::compareTo usage to equals to startsWith where it
is more appropriate
Change-Id: I6f5b5b7942429c0099ad082ba4984fd18e422121
Diffstat (limited to 'ucb/source/ucp/file')
-rw-r--r-- | ucb/source/ucp/file/bc.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/file/filglob.cxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 6faafb969f0d..6d7bdcb7f7bb 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -625,11 +625,10 @@ BaseContent::createNewContent( if ( Info.Type.isEmpty() ) return Reference< XContent >(); - bool bFolder - = ( Info.Type.compareTo( m_pMyShell->FolderContentType ) == 0 ); + bool bFolder = Info.Type == m_pMyShell->FolderContentType; if ( !bFolder ) { - if ( Info.Type.compareTo( m_pMyShell->FileContentType ) != 0 ) + if ( Info.Type != m_pMyShell->FileContentType ) { // Neither folder nor file to create! return Reference< XContent >(); diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index ea12bf72d97f..2d074c927ac9 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -166,7 +166,7 @@ namespace fileaccess { || ( ( dstL > srcL ) && - ( srcUnqPath.compareTo( dstUnqPath, srcL ) == 0 ) + dstUnqPath.startsWith(srcUnqPath) && ( dstUnqPath[ srcL ] == slash ) ) ); |