summaryrefslogtreecommitdiff
path: root/comphelper/source/misc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-21 10:12:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-21 21:46:09 +0200
commitf712c531336b2c44636a35ad682913550640e0d3 (patch)
tree17f96584923f9de4945479eb67d65fa7b2a2331e /comphelper/source/misc
parent90cbe03a0bd65151c197d3d4aeaf48a696f13fad (diff)
loplugin:unnecessarygetstr extend to checking std::string::c_str
Change-Id: I17398e2a6a31a2c98ba8e54b5c8045f22aee8759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper/source/misc')
-rw-r--r--comphelper/source/misc/lok.cxx2
-rw-r--r--comphelper/source/misc/sequenceashashmap.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 405411db7ba8..b5cbcc74cb54 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -232,7 +232,7 @@ bool isAllowlistedLanguage(const OUString& lang)
continue;
std::cerr << s << " ";
- aList.emplace_back(OStringToOUString(s.c_str(), RTL_TEXTENCODING_UTF8));
+ aList.emplace_back(OStringToOUString(s, RTL_TEXTENCODING_UTF8));
}
std::cerr << std::endl;
}
diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx
index 3bbce289ffe0..50a4e0216cd0 100644
--- a/comphelper/source/misc/sequenceashashmap.cxx
+++ b/comphelper/source/misc/sequenceashashmap.cxx
@@ -49,7 +49,7 @@ uno::Any jsonToUnoAny(const boost::property_tree::ptree& aTree)
uno::Sequence<uno::Reference<reflection::XIdlField>> aFields;
uno::Reference<reflection::XIdlClass> xIdlClass
= css::reflection::theCoreReflection::get(comphelper::getProcessComponentContext())
- ->forName(OUString::fromUtf8(rType.c_str()));
+ ->forName(OUString::fromUtf8(rType));
if (xIdlClass.is())
{
uno::TypeClass aTypeClass = xIdlClass->getTypeClass();
@@ -91,7 +91,7 @@ uno::Any jsonToUnoAny(const boost::property_tree::ptree& aTree)
else if (aTypeClass == uno::TypeClass_DOUBLE)
aAny <<= o3tl::toDouble(rValue);
else if (aTypeClass == uno::TypeClass_STRING)
- aAny <<= OUString::fromUtf8(rValue.c_str());
+ aAny <<= OUString::fromUtf8(rValue);
}
}
return aAny;
@@ -321,9 +321,9 @@ std::vector<css::beans::PropertyValue> JsonToPropertyValues(const OString& rJson
const std::string& rValue = rPair.second.get<std::string>("value", "");
beans::PropertyValue aValue;
- aValue.Name = OUString::fromUtf8(rPair.first.c_str());
+ aValue.Name = OUString::fromUtf8(rPair.first);
if (rType == "string")
- aValue.Value <<= OUString::fromUtf8(rValue.c_str());
+ aValue.Value <<= OUString::fromUtf8(rValue);
else if (rType == "boolean")
aValue.Value <<= OString(rValue.c_str()).toBoolean();
else if (rType == "float")