From 99a1290b3f2c8584db0a33fe48adf93dccce3a92 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 21 Jul 2021 09:42:47 +0200 Subject: Use existing rtl_math_stringToDouble ...like it is also already done in LineParser::readDouble in sdext/source/pdfimport/wrapper/wrapper.cxx (esp. since the code should be changed to use C++17 std::from_chars once that is available in all our baselines), reverting again the introduction of rtl_str_toDouble_WithLength in b1df9c67349cf4cc5be4128d797aefb87f50e38f "[API CHANGE] reduce cost of numeric conversion" Change-Id: If7e3a15649f80093d3407157412fd3deb3a38b12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119318 Reviewed-by: Noel Grandin Reviewed-by: Stephan Bergmann Tested-by: Jenkins --- sal/rtl/string.cxx | 8 -------- sal/util/sal.map | 5 ----- 2 files changed, 13 deletions(-) (limited to 'sal') diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx index 660f22552b0c..94be8029032a 100644 --- a/sal/rtl/string.cxx +++ b/sal/rtl/string.cxx @@ -110,14 +110,6 @@ double SAL_CALL rtl_str_toDouble(char const * pStr) SAL_THROW_EXTERN_C() nullptr, nullptr); } -double SAL_CALL rtl_str_toDouble_WithLength(const char* pStr, - sal_Int32 nStrLength) SAL_THROW_EXTERN_C() -{ - assert(pStr); - return rtl_math_stringToDouble(pStr, pStr + nStrLength, '.', 0, - nullptr, nullptr); -} - /* ======================================================================= */ static int rtl_ImplGetFastUTF8ByteLen( const sal_Unicode* pStr, sal_Int32 nLen ) diff --git a/sal/util/sal.map b/sal/util/sal.map index e33dde55b8da..49efb2a436cd 100644 --- a/sal/util/sal.map +++ b/sal/util/sal.map @@ -755,11 +755,6 @@ PRIVATE_1.7 { # LibreOffice 7.1 rtl_uString_newReplaceAllFromIndexUtf16LUtf16L; } PRIVATE_1.5; -PRIVATE_1.8 { # LibreOffice 7.3 - global: - rtl_str_toDouble_WithLength; -} PRIVATE_1.7; - PRIVATE_textenc.1 { # LibreOffice 3.6 global: _ZN3sal6detail7textenc20convertCharToUnicode*; -- cgit