From cee4cc9bb3b5f0121a8f57e4203c2cdabffe6715 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Mon, 23 May 2016 23:48:58 +0200 Subject: handle std::string vs std::wstring during export Change-Id: I00a32eb465b54e2a2747eebd00605212f14e5384 Reviewed-on: https://gerrit.libreoffice.org/25380 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard --- desktop/source/app/sofficemain.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'desktop/source/app/sofficemain.cxx') diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 40bd1dd7b5cf..70c2287eaf3e 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -51,6 +51,8 @@ #include #elif defined WNT #include +#include +#include #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> 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 -- cgit