diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-09-19 12:41:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-09-19 12:41:12 +0200 |
commit | 9960535bf562e91c19e119cbbcbefe07ac6ddb39 (patch) | |
tree | 73c469bbc1d2258f6f1938edfb4a78968707f389 /unoidl | |
parent | b345b3b6bceddcce8966243304c9112e58a33304 (diff) |
Fix indentation
Change-Id: I7814547ef29ec728a5a815196427b661bf285256
Diffstat (limited to 'unoidl')
-rwxr-xr-x | unoidl/source/sourcetreeprovider.cxx | 77 |
1 files changed, 38 insertions, 39 deletions
diff --git a/unoidl/source/sourcetreeprovider.cxx b/unoidl/source/sourcetreeprovider.cxx index 850e9837b3bf..2cfe93885b3c 100755 --- a/unoidl/source/sourcetreeprovider.cxx +++ b/unoidl/source/sourcetreeprovider.cxx @@ -39,45 +39,44 @@ namespace { // osl_FileStatus_Mask_Validate): OUString getFileName(OUString const & uri, osl::FileStatus & status) { #if defined MACOSX - sal_Int32 i = uri.lastIndexOf('/') + 1; - OUString path; - if (osl::FileBase::getSystemPathFromFileURL(uri.copy(0, i), path) - != osl::FileBase::E_None) - { - SAL_WARN( - "unoidl", - "cannot getSystemPathFromFileURL(" << uri.copy(0, i) << ")"); - return status.getFileName(); - } - OString dir(OUStringToOString(path, osl_getThreadTextEncoding())); - OString name(OUStringToOString(uri.copy(i), osl_getThreadTextEncoding())); - DIR * d = opendir(dir.getStr()); - if (d == 0) { - SAL_WARN("unoidl", "cannot opendir(" << dir << ")"); - return status.getFileName(); - } - for (;;) { - dirent ent; - dirent * p; - int e = readdir_r(d, &ent, &p); - if (e != 0) { - SAL_WARN("unoidl", "cannot readdir_r"); - closedir(d); - return status.getFileName(); - } - if (p == 0) { - SAL_WARN( - "unoidl", "cannot find " << name << " via readdir of " << dir); - closedir(d); - return status.getFileName(); - } - if (name.equalsIgnoreAsciiCase(p->d_name)) { - closedir(d); - return OUString( - p->d_name, std::strlen(p->d_name), - osl_getThreadTextEncoding()); - } - } + sal_Int32 i = uri.lastIndexOf('/') + 1; + OUString path; + if (osl::FileBase::getSystemPathFromFileURL(uri.copy(0, i), path) + != osl::FileBase::E_None) + { + SAL_WARN( + "unoidl", + "cannot getSystemPathFromFileURL(" << uri.copy(0, i) << ")"); + return status.getFileName(); + } + OString dir(OUStringToOString(path, osl_getThreadTextEncoding())); + OString name(OUStringToOString(uri.copy(i), osl_getThreadTextEncoding())); + DIR * d = opendir(dir.getStr()); + if (d == 0) { + SAL_WARN("unoidl", "cannot opendir(" << dir << ")"); + return status.getFileName(); + } + for (;;) { + dirent ent; + dirent * p; + int e = readdir_r(d, &ent, &p); + if (e != 0) { + SAL_WARN("unoidl", "cannot readdir_r"); + closedir(d); + return status.getFileName(); + } + if (p == 0) { + SAL_WARN( + "unoidl", "cannot find " << name << " via readdir of " << dir); + closedir(d); + return status.getFileName(); + } + if (name.equalsIgnoreAsciiCase(p->d_name)) { + closedir(d); + return OUString( + p->d_name, std::strlen(p->d_name), osl_getThreadTextEncoding()); + } + } #else (void) uri; return status.getFileName(); |