summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-14 11:42:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-14 15:48:38 +0200
commit77d083f2cbe496274cdab38a3a34497d1b742d86 (patch)
tree7092c7dbd5d746deb30565d8670dd79246327b58 /sal
parentde2cb96d5f9bb3c831fd136062582b4c11a003d1 (diff)
New loplugin:getstr
...to find matches of ... << s.getStr() (for the rtl string classes) that can be written as just ... << s Some notes: * The OUStringToOString(..., RTL_TEXTENCODING_UTF8) is left explicit in desktop/source/app/crashreport.cxx (even though that would also be done internally by the "<< OUString" operator) to clarify that these values are written out as UTF-8 (and not as what that operator << happens to use, which just also happens to be UTF-8). * OUSTRING_TO_CSTR (include/oox/helper/helper.hxx) is no longer used now. * Just don't bother to use osl_getThreadTextEncoding() in the SAL_WARN in lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx. * The toUtf8() in the SAL_DEBUG in pyuno/source/module/pyuno_module.cxx can just go, too. Change-Id: I4602f0379ef816bff310f1e51b57c56b7e3f0136 Reviewed-on: https://gerrit.libreoffice.org/80762 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/uunxapi.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 1005140a2c91..aecfab6d85a0 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -183,9 +183,9 @@ int osl::access(const OString& pstrPath, int mode)
int result = ::access(fn.getStr(), mode);
int saved_errno = errno;
if (result == -1)
- SAL_INFO("sal.file", "access(" << fn.getStr() << ",0" << std::oct << mode << std::dec << "): " << UnixErrnoString(saved_errno));
+ SAL_INFO("sal.file", "access(" << fn << ",0" << std::oct << mode << std::dec << "): " << UnixErrnoString(saved_errno));
else
- SAL_INFO("sal.file", "access(" << fn.getStr() << ",0" << std::oct << mode << std::dec << "): OK");
+ SAL_INFO("sal.file", "access(" << fn << ",0" << std::oct << mode << std::dec << "): OK");
done_accessing_file_path(fn.getStr(), state);
@@ -232,9 +232,9 @@ template<typename T> bool realpath_(const T& pstrFileName, T& ppstrResolvedName)
bool bRet = realpath(fn.getStr(), rp);
int saved_errno = errno;
if (!bRet)
- SAL_INFO("sal.file", "realpath(" << fn.getStr() << "): " << UnixErrnoString(saved_errno));
+ SAL_INFO("sal.file", "realpath(" << fn << "): " << UnixErrnoString(saved_errno));
else
- SAL_INFO("sal.file", "realpath(" << fn.getStr() << "): OK");
+ SAL_INFO("sal.file", "realpath(" << fn << "): OK");
done_accessing_file_path(fn.getStr(), state);