Fix uses of char16_t*/wchar_t* stream inserters
...that are helpfully deleted in C++20, as now implemented at least by VS 2019 16.6.4 when using --with-latest-c++ Change-Id: Iaf80f793e73fc90768bb146c9cf3d300d6747c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99170 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -367,9 +367,10 @@ extern "C" void invalidParameterHandler(
|
||||
{
|
||||
SAL_INFO(
|
||||
"basic",
|
||||
"invalid parameter during _wgetdcwd; \"" << (expression ? o3tl::toU(expression) : u"???")
|
||||
<< "\" (" << (function ? o3tl::toU(function) : u"???") << ") at "
|
||||
<< (file ? o3tl::toU(file) : u"???") << ":" << line);
|
||||
"invalid parameter during _wgetdcwd; \""
|
||||
<< (expression ? OUString(o3tl::toU(expression)) : OUString("???"))
|
||||
<< "\" (" << (function ? OUString(o3tl::toU(function)) : OUString("???")) << ") at "
|
||||
<< (file ? OUString(o3tl::toU(file)) : OUString("???")) << ":" << line);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1162,7 +1162,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::GetIDsOfNames(REFIID /*ri
|
||||
// Initialise returned rgdispid values.
|
||||
rgdispid[i] = DISPID_UNKNOWN;
|
||||
|
||||
SAL_INFO("extensions.olebridge", " " << o3tl::toU(rgszNames[i]));
|
||||
SAL_INFO("extensions.olebridge", " " << OUString(o3tl::toU(rgszNames[i])));
|
||||
}
|
||||
|
||||
HRESULT ret = DISP_E_UNKNOWNNAME;
|
||||
|
@@ -487,7 +487,8 @@ inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, t
|
||||
case VT_SAFEARRAY:
|
||||
break; // FIXME
|
||||
case VT_LPSTR:
|
||||
stream << rVariant.bstrVal;
|
||||
stream << std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t>().to_bytes(
|
||||
rVariant.bstrVal);
|
||||
break;
|
||||
case VT_LPWSTR:
|
||||
stream << std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t>().to_bytes(
|
||||
|
@@ -33,7 +33,7 @@ void buildPath(
|
||||
wchar_t p[MAX_PATH];
|
||||
wchar_t * e = tools::buildPath(
|
||||
p, front, front + std::wcslen(front), back, std::wcslen(back));
|
||||
CPPUNIT_ASSERT_EQUAL(p + std::wcslen(path), e);
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<void *>(p + std::wcslen(path)), static_cast<void *>(e));
|
||||
CPPUNIT_ASSERT_EQUAL(0, std::wcscmp(path, p));
|
||||
#else
|
||||
(void) front;
|
||||
|
Reference in New Issue
Block a user