summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-26 13:27:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-26 19:37:20 +0200
commit5fe702f1b69a02a274621a01db68256a94edfd36 (patch)
tree8b07b80a9046040ba7da685e4063f5f21e1f0eaa /comphelper
parentcf2dc247ff5f726238856e9b46a4926a30430e14 (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 'comphelper')
-rw-r--r--comphelper/source/misc/sequenceashashmap.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx
index 21a7f0971b94..0f15823651f9 100644
--- a/comphelper/source/misc/sequenceashashmap.cxx
+++ b/comphelper/source/misc/sequenceashashmap.cxx
@@ -80,7 +80,7 @@ uno::Any jsonToUnoAny(const boost::property_tree::ptree& aTree)
else if (aTypeClass == uno::TypeClass_SHORT)
aAny <<= static_cast<sal_Int16>(o3tl::toInt32(rValue));
else if (aTypeClass == uno::TypeClass_UNSIGNED_SHORT)
- aAny <<= static_cast<sal_uInt16>(OString(rValue.c_str()).toUInt32());
+ aAny <<= static_cast<sal_uInt16>(o3tl::toUInt32(rValue));
else if (aTypeClass == uno::TypeClass_LONG)
aAny <<= o3tl::toInt32(rValue);
else if (aTypeClass == uno::TypeClass_UNSIGNED_LONG)
@@ -331,7 +331,7 @@ std::vector<css::beans::PropertyValue> JsonToPropertyValues(const OString& rJson
else if (rType == "short")
aValue.Value <<= sal_Int16(o3tl::toInt32(rValue));
else if (rType == "unsigned short")
- aValue.Value <<= sal_uInt16(OString(rValue.c_str()).toUInt32());
+ aValue.Value <<= sal_uInt16(o3tl::toUInt32(rValue));
else if (rType == "int64")
aValue.Value <<= o3tl::toInt64(rValue);
else if (rType == "int32")
@@ -341,9 +341,9 @@ std::vector<css::beans::PropertyValue> JsonToPropertyValues(const OString& rJson
else if (rType == "uint64")
aValue.Value <<= OString(rValue.c_str()).toUInt64();
else if (rType == "uint32")
- aValue.Value <<= OString(rValue.c_str()).toUInt32();
+ aValue.Value <<= o3tl::toUInt32(rValue);
else if (rType == "uint16")
- aValue.Value <<= sal_uInt16(OString(rValue.c_str()).toUInt32());
+ aValue.Value <<= sal_uInt16(o3tl::toUInt32(rValue));
else if (rType == "[]byte")
{
aNodeValue = rPair.second.get_child("value", aNodeNull);