diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-26 13:27:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-26 19:37:20 +0200 |
commit | 5fe702f1b69a02a274621a01db68256a94edfd36 (patch) | |
tree | 8b07b80a9046040ba7da685e4063f5f21e1f0eaa /formula | |
parent | cf2dc247ff5f726238856e9b46a4926a30430e14 (diff) |
add o3tl::toUInt32
Change-Id: I07f11bf12fbe1d1c2d812fa0965d6e632e1e1aba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133437
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 80065f2bc855..560377d0d5d5 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -23,6 +23,7 @@ #include <formula/errorcodes.hxx> #include <formula/token.hxx> #include <formula/tokenarray.hxx> +#include <o3tl/string_view.hxx> #include <core_resource.hxx> #include <core_resource.hrc> @@ -1234,7 +1235,7 @@ FormulaError FormulaCompiler::GetErrorConstant( const OUString& rName ) const // digits. if (rName.startsWithIgnoreAsciiCase("#ERR") && rName.getLength() <= 10 && rName[rName.getLength()-1] == '!') { - sal_uInt32 nErr = rName.copy( 4, rName.getLength() - 5).toUInt32(); + sal_uInt32 nErr = o3tl::toUInt32(rName.subView( 4, rName.getLength() - 5)); if (0 < nErr && nErr <= SAL_MAX_UINT16 && isPublishedFormulaError(static_cast<FormulaError>(nErr))) nError = static_cast<FormulaError>(nErr); } |