[Libreoffice-commits] core.git: include/comphelper
Tor Lillqvist
tml at collabora.com
Mon Mar 19 18:35:32 UTC 2018
include/comphelper/windowsdebugoutput.hxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 584063ccaa3c5b7b984f30e288380cdf3b2f0ec4
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Mar 19 14:14:15 2018 +0200
Add BSTR handling
Change-Id: I89fcb37a5848120d5a3b2d73d40384c18d6cc069
diff --git a/include/comphelper/windowsdebugoutput.hxx b/include/comphelper/windowsdebugoutput.hxx
index da5acbb5a8d9..0bb71dce99bf 100644
--- a/include/comphelper/windowsdebugoutput.hxx
+++ b/include/comphelper/windowsdebugoutput.hxx
@@ -295,7 +295,8 @@ inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, t
stream << *(double*)rVariant.byref;
break; // FIXME
case VT_BSTR:
- stream << (OLECHAR*)rVariant.byref;
+ stream << std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t>().to_bytes(
+ *(OLECHAR**)rVariant.byref);
break;
case VT_DISPATCH:
stream << rVariant.byref;
@@ -419,7 +420,8 @@ inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, t
stream << (double)rVariant.date;
break; // FIXME
case VT_BSTR:
- stream << rVariant.bstrVal;
+ stream << std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t>().to_bytes(
+ rVariant.bstrVal);
break;
case VT_DISPATCH:
stream << rVariant.pdispVal;
More information about the Libreoffice-commits
mailing list