diff options
-rw-r--r-- | external/libnumbertext/Afl++ICE.patch1 | 30 | ||||
-rw-r--r-- | external/libnumbertext/UnpackedTarball_libnumbertext.mk | 1 | ||||
-rw-r--r-- | sax/source/tools/converter.cxx | 10 |
3 files changed, 3 insertions, 38 deletions
diff --git a/external/libnumbertext/Afl++ICE.patch1 b/external/libnumbertext/Afl++ICE.patch1 deleted file mode 100644 index 62104200632d..000000000000 --- a/external/libnumbertext/Afl++ICE.patch1 +++ /dev/null @@ -1,30 +0,0 @@ ---- /src/Soros.cxx 2021-02-24 15:31:59.003956770 +0000 -+++ /src/Soros.cxx 2021-02-24 15:32:29.156601577 +0000 -@@ -45,6 +45,9 @@ - begins(0), - ends(0) - { -+ const std::wstring_view numbertext = L"__numbertext__"; -+ const std::wstring_view semicolon = L";"; -+ - program = translate(program, m, c, L"\\"); // \\, \", \;, \# -> \uE000..\uE003 - // switch off all country-dependent lines, and switch on the requested ones - program = regex_replace(program, wregex(L"(^|[\n;])([^\n;#]*#[^\n]*\\[:[^\n:\\]]*:\\][^\n]*)"), L"$1#$2"); -@@ -52,7 +55,7 @@ - program = regex_replace(program, wregex(L"(^|[\n;])#([^\n;#]*#[^\n]*\\[:" + filtered_lang + L":\\][^\n]*)"), L"$1$2"); - program = regex_replace(program, wregex(L"(#[^\n]*)?(\n|$)"), L";"); // remove comments - // __numbertext__ sets the place of left zero deletion rule -- if (program.find(L"__numbertext__") == std::wstring::npos) -+ if (program.find(numbertext) == std::wstring::npos) - program.insert(0, L"__numbertext__;"); - program = regex_replace(program, wregex(L"__numbertext__"), - // default left zero deletion -@@ -69,7 +72,7 @@ - wregex quoteStart(L"^\""); - wregex quoteEnd(L"\"$"); - std::wstring smacro; -- while ((pos = program.find(L";", pos)) != std::wstring::npos) { -+ while ((pos = program.find(semicolon, pos)) != std::wstring::npos) { - wsmatch sp; - std::wstring linOrig = program.substr(old_pos, pos - old_pos); - // pattern extension after == macro ==: diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk index 1238290049d1..48cd2a9a273d 100644 --- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk +++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk @@ -18,7 +18,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1)) $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \ external/libnumbertext/MSVCNonBMPBug.patch1 \ external/libnumbertext/WinUnicodePath.patch1 \ - external/libnumbertext/Afl++ICE.patch1 \ )) # vim: set noet sw=4 ts=4: 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; } |