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 /xmlscript | |
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 'xmlscript')
-rw-r--r-- | xmlscript/source/xmldlg_imexp/imp_share.hxx | 3 | ||||
-rw-r--r-- | xmlscript/source/xmllib_imexp/imp_share.hxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index 2cc574c01b93..3b52f683b1e0 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -36,6 +36,7 @@ #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <osl/diagnose.h> #include <rtl/ref.hxx> +#include <o3tl/string_view.hxx> #include <memory> #include <vector> @@ -46,7 +47,7 @@ inline sal_Int32 toInt32( OUString const & rStr ) { sal_Int32 nVal; if (rStr.getLength() > 2 && rStr[ 0 ] == '0' && rStr[ 1 ] == 'x') - nVal = rStr.copy( 2 ).toUInt32( 16 ); + nVal = o3tl::toUInt32(rStr.subView( 2 ), 16); else nVal = rStr.toInt32(); return nVal; diff --git a/xmlscript/source/xmllib_imexp/imp_share.hxx b/xmlscript/source/xmllib_imexp/imp_share.hxx index 5178a36a47cd..d9ec1c442402 100644 --- a/xmlscript/source/xmllib_imexp/imp_share.hxx +++ b/xmlscript/source/xmllib_imexp/imp_share.hxx @@ -26,6 +26,7 @@ #include <com/sun/star/xml/input/XRoot.hpp> #include <com/sun/star/xml/sax/SAXException.hpp> #include <rtl/ref.hxx> +#include <o3tl/string_view.hxx> #include <vector> @@ -36,7 +37,7 @@ inline sal_Int32 toInt32( OUString const & rStr ) sal_Int32 nVal; if (rStr.getLength() > 2 && rStr[ 0 ] == '0' && rStr[ 1 ] == 'x') { - nVal = rStr.copy( 2 ).toUInt32( 16 ); + nVal = o3tl::toUInt32(rStr.subView( 2 ), 16); } else { |