desktop/source/app/sofficemain.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
New commits: commit cee4cc9bb3b5f0121a8f57e4203c2cdabffe6715 Author: Markus Mohrhard <[email protected]> Date: Mon May 23 23:48:58 2016 +0200 handle std::string vs std::wstring during export Change-Id: I00a32eb465b54e2a2747eebd00605212f14e5384 Reviewed-on: https://gerrit.libreoffice.org/25380 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 40bd1dd..70c2287 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -51,6 +51,8 @@ #include <client/linux/handler/exception_handler.h> #elif defined WNT #include <client/windows/handler/exception_handler.h> +#include <locale> +#include <codecvt> #endif #endif @@ -78,16 +80,19 @@ static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, return succeeded; } #elif defined WNT -static bool dumpCallback(const wchar_t* path, const wchar_t* /*id*/, +static bool dumpCallback(const wchar_t* path, const wchar_t* id, void* /*context*/, EXCEPTION_POINTERS* /*exinfo*/, MDRawAssertionInfo* /*assertion*/, bool succeeded) { std::string ini_path = CrashReporter::getIniFileName(); std::ofstream minidump_file(ini_path, std::ios_base::app); - minidump_file << "DumpFile=" << path << "\n";; + // TODO: moggi: can we avoid this conversion + std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1; + std::string aPath = conv1.to_bytes(std::wstring(path)) + conv1.to_bytes(std::wstring(id)); + minidump_file << "DumpFile=" << aPath << "\n";; minidump_file.close(); - SAL_WARN("desktop", "minidump generated: " << path); + SAL_WARN("desktop", "minidump generated: " << aPath); return succeeded; } #endif _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
