diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-03-19 14:14:15 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-28 00:05:09 +0200 |
commit | 80481f4e2c76bcfbc7e735f78f5c5c81f6ab0d67 (patch) | |
tree | 8e685324b921ac246b1620c932b07fc7202d5d7d /include | |
parent | 2682c5a0975a4b8f43480eb66ff6a95bbf26fc5e (diff) |
Add BSTR handling
Change-Id: I89fcb37a5848120d5a3b2d73d40384c18d6cc069
(cherry picked from commit 584063ccaa3c5b7b984f30e288380cdf3b2f0ec4)
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/windowsdebugoutput.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/comphelper/windowsdebugoutput.hxx b/include/comphelper/windowsdebugoutput.hxx index d4e3372d5bec..17c60b3d74cc 100644 --- a/include/comphelper/windowsdebugoutput.hxx +++ b/include/comphelper/windowsdebugoutput.hxx @@ -291,7 +291,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; @@ -415,7 +416,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; |