summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/string.cxx14
-rw-r--r--sal/rtl/strtmpl.hxx10
-rw-r--r--sal/util/sal.map6
3 files changed, 30 insertions, 0 deletions
diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx
index 94be8029032a..6fc2df75698d 100644
--- a/sal/rtl/string.cxx
+++ b/sal/rtl/string.cxx
@@ -110,6 +110,14 @@ 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 )
@@ -559,6 +567,12 @@ sal_Int32 SAL_CALL rtl_str_toInt32(const char* pStr, sal_Int16 nRadix) SAL_THROW
return rtl::str::toInt32(pStr, nRadix);
}
+sal_Int32 SAL_CALL rtl_str_toInt32_WithLength(const char* pStr, sal_Int16 nRadix,
+ sal_Int32 nStrLength) SAL_THROW_EXTERN_C()
+{
+ return rtl::str::toInt32_WithLength(pStr, nRadix, nStrLength);
+}
+
sal_Int64 SAL_CALL rtl_str_toInt64(const char* pStr, sal_Int16 nRadix) SAL_THROW_EXTERN_C()
{
return rtl::str::toInt64(pStr, nRadix);
diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx
index 094a1cc1f2ab..493184f92efa 100644
--- a/sal/rtl/strtmpl.hxx
+++ b/sal/rtl/strtmpl.hxx
@@ -914,6 +914,16 @@ sal_Int32 toInt32 ( const IMPL_RTL_STRCODE* pStr,
}
template <typename IMPL_RTL_STRCODE>
+sal_Int32 toInt32_WithLength ( const IMPL_RTL_STRCODE* pStr,
+ sal_Int16 nRadix,
+ sal_Int32 nStrLength)
+
+{
+ assert(pStr);
+ return toInt_WithLength<sal_Int32, sal_uInt32>(pStr, nRadix, nStrLength);
+}
+
+template <typename IMPL_RTL_STRCODE>
sal_Int64 toInt64 ( const IMPL_RTL_STRCODE* pStr,
sal_Int16 nRadix )
{
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 49efb2a436cd..e2339bdc13ac 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -755,6 +755,12 @@ PRIVATE_1.7 { # LibreOffice 7.1
rtl_uString_newReplaceAllFromIndexUtf16LUtf16L;
} PRIVATE_1.5;
+PRIVATE_1.8 { # LibreOffice 7.3
+ global:
+ rtl_str_toInt32_WithLength;
+ rtl_str_toDouble_WithLength;
+} PRIVATE_1.7;
+
PRIVATE_textenc.1 { # LibreOffice 3.6
global:
_ZN3sal6detail7textenc20convertCharToUnicode*;