diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-02 20:34:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-03 21:24:35 +0100 |
commit | 8d98e380a2309273c2d5c74cd6c9acffa44c9438 (patch) | |
tree | 37a89b51b64daa2a875f8b0281bf08ea11121c5c /tools | |
parent | bccf34c19ae022b67565e212fa4ec0d5213947de (diff) |
fix broken indent
Change-Id: Ie11ad33f1d61d4abd1d40eaeda714993c3e2b295
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/fsys/dirent.cxx | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index e0082619f0bc..3b6e9cd118bf 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -1590,52 +1590,52 @@ DirEntry DirEntry::TempName( DirEntryKind eKind ) const strcat(ret_val,ext); - if ( FSYS_KIND_FILE == eKind ) + if ( FSYS_KIND_FILE == eKind ) + { + SvFileStream aStream( String( ret_val, osl_getThreadTextEncoding()), + STREAM_WRITE|STREAM_SHARE_DENYALL ); + if ( aStream.IsOpen() ) + { + aStream.Seek( STREAM_SEEK_TO_END ); + if ( 0 == aStream.Tell() ) { - SvFileStream aStream( String( ret_val, osl_getThreadTextEncoding()), - STREAM_WRITE|STREAM_SHARE_DENYALL ); - if ( aStream.IsOpen() ) - { - aStream.Seek( STREAM_SEEK_TO_END ); - if ( 0 == aStream.Tell() ) - { - aRet = DirEntry( String( ret_val, osl_getThreadTextEncoding())); - break; - } - aStream.Close(); - } + aRet = DirEntry( String( ret_val, osl_getThreadTextEncoding())); + break; } - else + aStream.Close(); + } + } + else + { + // Redirect + String aRetVal(ret_val, osl_getThreadTextEncoding()); + String aRedirected (aRetVal); + if ( FSYS_KIND_DIR == eKind ) + { + if (0 == _mkdir(rtl::OUStringToOString(aRedirected, osl_getThreadTextEncoding()).getStr())) { - // Redirect - String aRetVal(ret_val, osl_getThreadTextEncoding()); - String aRedirected (aRetVal); - if ( FSYS_KIND_DIR == eKind ) - { - if (0 == _mkdir(rtl::OUStringToOString(aRedirected, osl_getThreadTextEncoding()).getStr())) - { - aRet = DirEntry( aRetVal ); - break; - } - } - else - { + aRet = DirEntry( aRetVal ); + break; + } + } + else + { #if defined(UNX) - if (access(rtl::OUStringToOString(aRedirected, osl_getThreadTextEncoding()).getStr(), F_OK)) - { - aRet = DirEntry( aRetVal ); - break; - } + if (access(rtl::OUStringToOString(aRedirected, osl_getThreadTextEncoding()).getStr(), F_OK)) + { + aRet = DirEntry( aRetVal ); + break; + } #else - struct stat aStat; - if (stat(rtl::OUStringToOString(aRedirected, osl_getThreadTextEncoding()).getStr(), &aStat)) - { - aRet = DirEntry( aRetVal ); - break; - } -#endif - } + struct stat aStat; + if (stat(rtl::OUStringToOString(aRedirected, osl_getThreadTextEncoding()).getStr(), &aStat)) + { + aRet = DirEntry( aRetVal ); + break; } +#endif + } + } } delete[] ret_val; @@ -1655,9 +1655,9 @@ const DirEntry &DirEntry::operator[]( sal_uInt16 nParentLevel ) const { DBG_CHKTHIS( DirEntry, ImpCheckDirEntry ); - //TPF: maybe to be implemented (FastFSys) + //TPF: maybe to be implemented (FastFSys) - const DirEntry *pRes = this; + const DirEntry *pRes = this; while ( pRes && nParentLevel-- ) pRes = pRes->pParent; |