summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-05-23 23:48:58 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-05-24 00:33:18 +0000
commitcee4cc9bb3b5f0121a8f57e4203c2cdabffe6715 (patch)
tree0a83052f5cbc08fc2a5722ad7fc567f983d9e15c /desktop/source
parentfa9416906e615f5f19ad8524176d2ed693662769 (diff)
handle std::string vs std::wstring during export
Change-Id: I00a32eb465b54e2a2747eebd00605212f14e5384 Reviewed-on: https://gerrit.libreoffice.org/25380 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/app/sofficemain.cxx11
1 files changed, 8 insertions, 3 deletions
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 <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