diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-19 01:43:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-19 09:59:25 +0100 |
commit | c9894bda18af063c0c564ca7548e1084b7c84ac5 (patch) | |
tree | 23e4a75fd7637bcfec62ad0e76ec9f06f9edff18 /tools | |
parent | ditch SHL_SBX and don't leak (diff) | |
download | core-c9894bda18af063c0c564ca7548e1084b7c84ac5.tar.gz core-c9894bda18af063c0c564ca7548e1084b7c84ac5.zip |
ByteString->rtl::OStringBuffer
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/fsys/dirent.cxx | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index 15611506fda9..151d7825fc9b 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -1408,18 +1408,23 @@ sal_Bool DirEntry::Find( const String& rPfad, char cDelim ) sal_uInt16 nTokenCount = rPfad.GetTokenCount( cDelim ); sal_Int32 nIndex = 0; - ByteString aThis = ACCESSDELIM(DEFSTYLE); - aThis += ByteString(GetFull(), osl_getThreadTextEncoding()); + rtl::OString aThis = rtl::OStringBuffer() + .append(ACCESSDELIM_C(DEFSTYLE)) + .append(rtl::OUStringToOString(GetFull(), + osl_getThreadTextEncoding())) + .makeStringAndClear(); for ( sal_uInt16 nToken = 0; nToken < nTokenCount; ++nToken ) { - ByteString aPath = rtl::OUStringToOString(rPfad, osl_getThreadTextEncoding()).getToken( 0, cDelim, nIndex ); + rtl::OStringBuffer aPath(rtl::OUStringToOString(rPfad, + osl_getThreadTextEncoding()).getToken( 0, cDelim, nIndex )); - if ( aPath.Len() ) + if ( aPath.getLength() ) { - if (aPath.GetChar(aPath.Len()-1)== ACCESSDELIM(DEFSTYLE)[0]) - aPath.Erase(aPath.Len()-1); - aPath += aThis; - DirEntry aEntry( String(aPath, osl_getThreadTextEncoding())); + if (aPath[aPath.getLength()-1] == ACCESSDELIM_C(DEFSTYLE)) + aPath.remove(aPath.getLength()-1, 1); + aPath.append(aThis); + DirEntry aEntry(rtl::OStringToOUString( + aPath.makeStringAndClear(), osl_getThreadTextEncoding())); if ( aEntry.ToAbs() && ( ( !bWild && aEntry.Exists() ) || ( bWild && aEntry.First() ) ) ) { |