summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-03-19 14:14:15 +0200
committerTor Lillqvist <tml@collabora.com>2018-03-19 20:34:58 +0200
commit584063ccaa3c5b7b984f30e288380cdf3b2f0ec4 (patch)
tree30bd06ae4d59db160d619af4655d18cb4bba4c31 /include
parent410cc7057ae0eb61034f93fb28d7add5ec76d6e5 (diff)
Add BSTR handling
Change-Id: I89fcb37a5848120d5a3b2d73d40384c18d6cc069
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/windowsdebugoutput.hxx6
1 files changed, 4 insertions, 2 deletions
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;