diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2022-02-07 12:05:03 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-02-07 15:32:14 +0100 |
commit | f4d5f1200c380ed5d3ebb5dc26cf82217d9db565 (patch) | |
tree | 418b59ea4dae8e460e99c16ed9e5a7686cd47d5c | |
parent | Added master slide handling in getPart* functions of SdXImpressDocument (diff) | |
download | core-f4d5f1200c380ed5d3ebb5dc26cf82217d9db565.tar.gz core-f4d5f1200c380ed5d3ebb5dc26cf82217d9db565.zip |
boost / gettext warning improvement.
std::runtime_exception of:
"Invalid or unsupported charset:UTF-8 or UTF-8"
is less useful than it could be when spat out from the boost gettext
impl. Survive for the next (and probably more useful) exception.
Change-Id: Ibeb60b4a34f09f47051844c3e8048f38618d0e05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129562
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | external/boost/UnpackedTarball_boost.mk | 1 | ||||
-rw-r--r-- | external/boost/boost.between.warning.patch | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk index 33f2f2cd9b50..c93de3e1f169 100644 --- a/external/boost/UnpackedTarball_boost.mk +++ b/external/boost/UnpackedTarball_boost.mk @@ -16,6 +16,7 @@ boost_patches += boost.6142.warnings.patch.1 boost_patches += boost.utility.Wundef.warnings.patch boost_patches += boost.noiconv.patch +boost_patches += boost.between.warning.patch boost_patches += ubsan.patch.0 boost_patches += rtti.patch.0 diff --git a/external/boost/boost.between.warning.patch b/external/boost/boost.between.warning.patch new file mode 100644 index 000000000000..bb4535708549 --- /dev/null +++ b/external/boost/boost.between.warning.patch @@ -0,0 +1,13 @@ +diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp +--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp ++++ foo/misc/boost/libs/locale/src/encoding/codepage.cpp +@@ -58,6 +58,9 @@ + return cvt->convert(begin,end); + #endif + #endif ++ // ensures we get a sensible warning in boost's gettext results about a real mismatch. ++ if (to_charset && from_charset && !strcmp(to_charset, from_charset)) ++ return std::string(begin, end - begin); + throw invalid_charset_error(std::string(to_charset) + " or " + from_charset); + } + |