summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-12 12:43:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-13 08:38:53 +0200
commitfdfd517a6f75e394ddcb1e195decbfed33ba56b9 (patch)
treee3bff14e5531affcd908415b4e85d7ceac4aa1fd /ucb/source
parente568c9dca8b93b96a8a130a8fb6f1bba1a33d6ea (diff)
loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx21
-rw-r--r--ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx2
2 files changed, 12 insertions, 11 deletions
diff --git a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
index 03b4f0008ce9..1bcf87eacf3d 100644
--- a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/log.hxx>
+#include <o3tl/string_view.hxx>
#include "UCBDeadPropertyValue.hxx"
using namespace http_dav_ucp;
@@ -64,25 +65,25 @@ bool UCBDeadPropertyValue::supportsType( const uno::Type & rType )
// static
-bool UCBDeadPropertyValue::createFromXML(OUString const& rType,
+bool UCBDeadPropertyValue::createFromXML(std::u16string_view rType,
OUString const& rValue,
uno::Any & rOutData)
{
bool success = true;
- if (rType.equalsIgnoreAsciiCase(aTypeString))
+ if (o3tl::equalsIgnoreAsciiCase(rType, aTypeString))
{
rOutData <<= rValue;
}
- else if (rType.equalsIgnoreAsciiCase(aTypeLong))
+ else if (o3tl::equalsIgnoreAsciiCase(rType, aTypeLong))
{
rOutData <<= rValue.toInt32();
}
- else if (rType.equalsIgnoreAsciiCase(aTypeShort))
+ else if (o3tl::equalsIgnoreAsciiCase(rType, aTypeShort))
{
rOutData <<= sal_Int16( rValue.toInt32() );
}
- else if (rType.equalsIgnoreAsciiCase(aTypeBoolean))
+ else if (o3tl::equalsIgnoreAsciiCase(rType, aTypeBoolean))
{
if (rValue.equalsIgnoreAsciiCase(u"true"))
{
@@ -93,23 +94,23 @@ bool UCBDeadPropertyValue::createFromXML(OUString const& rType,
rOutData <<= false;
}
}
- else if (rType.equalsIgnoreAsciiCase(aTypeChar))
+ else if (o3tl::equalsIgnoreAsciiCase(rType, aTypeChar))
{
rOutData <<= rValue.toChar();
}
- else if (rType.equalsIgnoreAsciiCase(aTypeByte))
+ else if (o3tl::equalsIgnoreAsciiCase(rType, aTypeByte))
{
rOutData <<= sal_Int8( rValue.toChar() );
}
- else if (rType.equalsIgnoreAsciiCase(aTypeHyper))
+ else if (o3tl::equalsIgnoreAsciiCase(rType, aTypeHyper))
{
rOutData <<= rValue.toInt64();
}
- else if (rType.equalsIgnoreAsciiCase(aTypeFloat))
+ else if (o3tl::equalsIgnoreAsciiCase(rType, aTypeFloat))
{
rOutData <<= rValue.toFloat();
}
- else if (rType.equalsIgnoreAsciiCase(aTypeDouble))
+ else if (o3tl::equalsIgnoreAsciiCase(rType, aTypeDouble))
{
rOutData <<= rValue.toDouble();
}
diff --git a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx
index 03240d010df1..12574e0a950b 100644
--- a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx
+++ b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx
@@ -33,7 +33,7 @@ class UCBDeadPropertyValue
public:
static bool supportsType( const css::uno::Type & rType );
- static bool createFromXML(OUString const& rType,
+ static bool createFromXML(std::u16string_view rType,
OUString const& rValue,
css::uno::Any & rOutData);
static ::std::optional<::std::pair<OUString, OUString>>