desktop/source/app/crashreport.cxx | 11 +++-------- sdext/source/pdfimport/pdfparse/pdfparse.cxx | 25 +------------------------ 2 files changed, 4 insertions(+), 32 deletions(-)
New commits: commit f894670c2cb654a1e21fb34f440977af74e8a560 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Feb 25 10:35:32 2024 +0600 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Feb 25 06:48:45 2024 +0100 Avoid UTF-16->UTF-8->UTF-16 conversion Change-Id: I82e45643b3543d924fda025aa47ef2fabb7f914e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163897 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx index b90a04907f69..18db12d07b38 100644 --- a/desktop/source/app/crashreport.cxx +++ b/desktop/source/app/crashreport.cxx @@ -68,15 +68,10 @@ static bool dumpCallback(const wchar_t* path, const wchar_t* id, MDRawAssertionInfo* /*assertion*/, bool succeeded) { - // TODO: moggi: can we avoid this conversion -#ifdef _MSC_VER -#pragma warning (disable: 4996) -#endif - std::wstring_convert<std::codecvt_utf8<wchar_t>> conv1; - std::string aPath = conv1.to_bytes(std::wstring(path)) + conv1.to_bytes(std::wstring(id)) + ".dmp"; + OUString aPath(OUString::Concat(o3tl::toU(path)) + o3tl::toU(id) + ".dmp"); CrashReporter::addKeyValue("Active-SfxObject",CrashReporter::getActiveSfxObjectName(),CrashReporter::AddItem); CrashReporter::addKeyValue("Last-4-Uno-Commands",CrashReporter::getLoggedUnoCommands(),CrashReporter::AddItem); - CrashReporter::addKeyValue("DumpFile", OStringToOUString(aPath, RTL_TEXTENCODING_UTF8), CrashReporter::AddItem); + CrashReporter::addKeyValue("DumpFile", aPath, CrashReporter::AddItem); CrashReporter::addKeyValue("GDIHandles", OUString::number(::GetGuiResources(::GetCurrentProcess(), GR_GDIOBJECTS)), CrashReporter::Write); SAL_WARN("desktop", "minidump generated: " << aPath); return succeeded; @@ -238,7 +233,7 @@ void CrashReporter::updateMinidumpLocation() mpExceptionHandler->set_minidump_descriptor(descriptor); #elif defined _WIN32 OUString aURL = getCrashDirectory(); - mpExceptionHandler->set_dump_path(o3tl::toW(aURL.getStr())); + mpExceptionHandler->set_dump_path(std::wstring(o3tl::toW(aURL))); #endif } commit 1cdf33d7485ec45c9ddcfcf7d1445f5b0a69dfec Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Feb 25 10:21:26 2024 +0600 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Feb 25 06:48:39 2024 +0100 Simplify boost includes, and drop unneeded warning suppression Likely obsoleted by commit 046e9545956d8ad1d69345d6b4a4c0a33714d179 (Try to revert to use of file_iterator from boost on Windows, 2023-11-01). Change-Id: Icddb21203755845f6d3c46ba168fb51443f04251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163896 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx index 1a78fde79de1..34424b9ec320 100644 --- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -20,18 +20,7 @@ #include <pdfparse.hxx> -// boost using obsolete stuff -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4996) -#pragma warning(disable:4503) -#endif - -// workaround windows compiler: do not include multi_pass.hpp -#include <boost/spirit/include/classic_core.hpp> -#include <boost/spirit/include/classic_utility.hpp> -#include <boost/spirit/include/classic_error_handling.hpp> -#include <boost/spirit/include/classic_file_iterator.hpp> +#include <boost/spirit/include/classic.hpp> #include <boost/bind/bind.hpp> #include <string.h> @@ -44,14 +33,6 @@ #include <sal/log.hxx> #include <utility> -// disable warnings again because someone along the line has enabled them -// (we have included boost headers, what did you expect?) -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4996) -#pragma warning(disable:4503) -#endif - using namespace boost::spirit::classic; using namespace pdfparse; @@ -631,8 +612,4 @@ std::unique_ptr<PDFEntry> PDFReader::read(std::u16string_view aFileName) return pRet; } -#if defined(_MSC_VER) -#pragma warning(pop) -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */