From bc820a345058f1cb41a49f8961c0aef26065dc53 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 2 Mar 2021 10:13:50 +0100 Subject: Remove workaround now its fixed in AFL++ and oss-fuzz updated remove workaround for problem fixed by: https://github.com/AFLplusplus/AFLplusplus/commit/333509bb0a56be9bd2e236f0e2f37d4af2dd7d59> +# "better unicode support" for now: oss-fuzz updated: https://github.com/google/oss-fuzz/pull/5273 Change-Id: Id3f1790ef452ed7732032801fc4ec028e57443eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111806 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sax/source/tools/converter.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'sax') diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index 4b476be934ee..f4f6dccb8ddc 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -728,10 +728,6 @@ void Converter::convertAngle(OUStringBuffer& rBuffer, sal_Int16 const nAngle, bool Converter::convertAngle(sal_Int16& rAngle, std::u16string_view rString, bool const isWrongOOo10thDegAngle) { - const std::u16string_view deg = u"deg"; - const std::u16string_view grad = u"grad"; - const std::u16string_view rad = u"rad"; - // ODF 1.1 leaves it undefined what the number means, but ODF 1.2 says it's // degrees, while OOo has historically used 10th of degrees :( // So import degrees when we see the "deg" suffix but continue with 10th of @@ -741,15 +737,15 @@ bool Converter::convertAngle(sal_Int16& rAngle, std::u16string_view rString, sal_Int32 nValue(0); double fValue(0.0); bool bRet = ::sax::Converter::convertDouble(fValue, rString); - if (std::u16string_view::npos != rString.find(deg)) + if (std::u16string_view::npos != rString.find(u"deg")) { nValue = fValue * 10.0; } - else if (std::u16string_view::npos != rString.find(grad)) + else if (std::u16string_view::npos != rString.find(u"grad")) { nValue = (fValue * 9.0 / 10.0) * 10.0; } - else if (std::u16string_view::npos != rString.find(rad)) + else if (std::u16string_view::npos != rString.find(u"rad")) { nValue = basegfx::rad2deg(fValue) * 10.0; } -- cgit