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 /svl | |
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 'svl')
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 66cfda5e9aad..6a2537a56bda 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -29,6 +29,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/sequence.hxx> +#include <o3tl/string_view.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/task/InteractionHandler.hpp> #include <com/sun/star/task/MasterPasswordRequest.hpp> @@ -425,7 +426,7 @@ std::vector< OUString > PasswordContainer::DecodePasswords( std::u16string_view unsigned char code[RTL_DIGEST_LENGTH_MD5]; for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ ) - code[ ind ] = static_cast<char>(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16)); + code[ ind ] = static_cast<char>(o3tl::toUInt32(aMasterPasswd.subView( ind*2, 2 ), 16)); unsigned char iv[RTL_DIGEST_LENGTH_MD5] = {0}; if (!aIV.empty()) @@ -487,7 +488,7 @@ OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines unsigned char code[RTL_DIGEST_LENGTH_MD5]; for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ ) - code[ ind ] = static_cast<char>(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16)); + code[ ind ] = static_cast<char>(o3tl::toUInt32(aMasterPasswd.subView( ind*2, 2 ), 16)); unsigned char iv[RTL_DIGEST_LENGTH_MD5] = {0}; if (!aIV.empty()) |