summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-03-02 10:13:50 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-03-03 14:32:08 +0100
commitbc820a345058f1cb41a49f8961c0aef26065dc53 (patch)
tree7086f449b3258c735e6622b68d89ce34b97ddd29 /sax
parent01a640ce6f2072e72bcea86695a7ab7cc96a13b6 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'sax')
-rw-r--r--sax/source/tools/converter.cxx10
1 files changed, 3 insertions, 7 deletions
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;
}