summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/rtl/string.h20
-rw-r--r--sal/rtl/string.cxx8
-rw-r--r--sal/util/sal.map5
-rw-r--r--sax/source/tools/fastattribs.cxx4
4 files changed, 3 insertions, 34 deletions
diff --git a/include/rtl/string.h b/include/rtl/string.h
index 155c1d46126c..d29caf93a718 100644
--- a/include/rtl/string.h
+++ b/include/rtl/string.h
@@ -863,26 +863,6 @@ SAL_DLLPUBLIC float SAL_CALL rtl_str_toFloat(
SAL_DLLPUBLIC double SAL_CALL rtl_str_toDouble(
const char * str ) SAL_THROW_EXTERN_C();
-/** Interpret a string as a double.
-
- This function cannot be used for language-specific conversion. The string
- must be null-terminated.
-
- @param str
- a null-terminated string.
-
- @param nStrLength
- number of chars to process
-
- @return
- the double value represented by the string, or 0.0 if the string does not
- represent a double.
-
- @since LibreOffice 7.3
- */
-SAL_DLLPUBLIC double SAL_CALL rtl_str_toDouble_WithLength(
- const char * str, sal_Int32 nStrLength ) SAL_THROW_EXTERN_C();
-
/* ======================================================================= */
#ifdef _WIN32
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*;
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx
index 2512f6296aee..9bf4a3f4ae6e 100644
--- a/sax/source/tools/fastattribs.cxx
+++ b/sax/source/tools/fastattribs.cxx
@@ -20,6 +20,7 @@
#include <algorithm>
#include <com/sun/star/xml/sax/SAXException.hpp>
+#include <rtl/math.h>
#include <sax/fastattribs.hxx>
using namespace ::com::sun::star::uno;
@@ -221,7 +222,8 @@ bool FastAttributeList::getAsDouble( sal_Int32 nToken, double &rDouble) const
for (size_t i = 0; i < maAttributeTokens.size(); ++i)
if (maAttributeTokens[i] == nToken)
{
- rDouble = rtl_str_toDouble_WithLength( getFastAttributeValue(i), AttributeValueLength(i) );
+ auto const p = getFastAttributeValue(i);
+ rDouble = rtl_math_stringToDouble( p, p + AttributeValueLength(i), '.', 0, nullptr, nullptr );
return true;
}
return false;