diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index ef7e97884735..22512bd5a929 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -172,7 +173,9 @@ public: double toDouble() const { assert(mnIdx < mrList.maAttributeTokens.size()); - return rtl_str_toDouble(mrList.getFastAttributeValue(mnIdx)); + const char* pStr = mrList.getFastAttributeValue(mnIdx); + sal_Int32 nLen = mrList.AttributeValueLength(mnIdx); + return rtl_math_stringToDouble(pStr, pStr + nLen, '.', 0, nullptr, nullptr); } bool toBoolean() const {