desktop/source/app/crashreport.cxx | 2 +- extensions/source/ole/unoobjw.cxx | 2 +- fpicker/source/win32/VistaFilePickerImpl.cxx | 2 +- shell/source/tools/lngconvex/lngconvex.cxx | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit e624979ce4e06f34ce8c8e8c2ee5c2b5a9a10f57 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Nov 8 08:41:12 2023 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Nov 8 14:32:49 2023 +0100 loplugin:unnecessarygetstr (clang-cl) Change-Id: Ic0ec1614d48382bb5735a67bf9588657b9ebd521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159106 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx index 186a59b02101..b90a04907f69 100644 --- a/desktop/source/app/crashreport.cxx +++ b/desktop/source/app/crashreport.cxx @@ -76,7 +76,7 @@ static bool dumpCallback(const wchar_t* path, const wchar_t* id, std::string aPath = conv1.to_bytes(std::wstring(path)) + conv1.to_bytes(std::wstring(id)) + ".dmp"; CrashReporter::addKeyValue("Active-SfxObject",CrashReporter::getActiveSfxObjectName(),CrashReporter::AddItem); CrashReporter::addKeyValue("Last-4-Uno-Commands",CrashReporter::getLoggedUnoCommands(),CrashReporter::AddItem); - CrashReporter::addKeyValue("DumpFile", OStringToOUString(aPath.c_str(), RTL_TEXTENCODING_UTF8), CrashReporter::AddItem); + CrashReporter::addKeyValue("DumpFile", OStringToOUString(aPath, RTL_TEXTENCODING_UTF8), CrashReporter::AddItem); CrashReporter::addKeyValue("GDIHandles", OUString::number(::GetGuiResources(::GetCurrentProcess(), GR_GDIOBJECTS)), CrashReporter::Write); SAL_WARN("desktop", "minidump generated: " << aPath); return succeeded; diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 936e049b147a..915ecd92f8fc 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -1817,7 +1817,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::Invoke(DISPID dispidMembe sParams += ","; std::stringstream aStringStream; aStringStream << pdispparams->rgvarg[i]; - sParams += OUString::createFromAscii(aStringStream.str().c_str()); + sParams += OUString::createFromAscii(aStringStream.str()); } sParams += "]"; #endif diff --git a/fpicker/source/win32/VistaFilePickerImpl.cxx b/fpicker/source/win32/VistaFilePickerImpl.cxx index 67e977156bd2..8a2531ab0119 100644 --- a/fpicker/source/win32/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/VistaFilePickerImpl.cxx @@ -1116,7 +1116,7 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(Request& rRequest) if ( SUCCEEDED(hResult) ) { const OUString& sItem = m_lItems[bValue]; - aValue <<= OUString(sItem.getStr()); + aValue <<= sItem; } } break; diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 546d76653dca..f016d01f7133 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -113,7 +113,7 @@ OUString get_absolute_path( std::string make_absolute(const std::string& file_name) { OUString fp = get_absolute_path( - get_module_path(), OStringToOUString(file_name.c_str())); + get_module_path(), OStringToOUString(file_name)); return std::string(OUStringToOString(fp)); } @@ -157,7 +157,7 @@ public: { return OStringToOUString( maBcp47, RTL_TEXTENCODING_ASCII_US); } std::string make_std_string() const - { return maBcp47.getStr(); } + { return std::string(maBcp47); } private: OString maBcp47; @@ -184,7 +184,7 @@ std::string make_winrc_unicode_string(const OUString& str) std::string make_winrc_unicode_string(const std::string& str) { return make_winrc_unicode_string( - OUString::createFromAscii(str.c_str())); + OUString::createFromAscii(str)); } /** A replacement table contains pairs of @@ -272,8 +272,8 @@ void add_group_entries( OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8); Substitutor.add_substitution( - GroupName.getStr(), make_winrc_unicode_string(key_value_utf16)); - map[ ltype ] = std::string( iso_lang.getStr() ); + std::string(GroupName), make_winrc_unicode_string(key_value_utf16)); + map[ ltype ] = std::string( iso_lang ); } else {