summaryrefslogtreecommitdiff
path: root/cppuhelper
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 /cppuhelper
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 'cppuhelper')
-rw-r--r--cppuhelper/source/servicemanager.cxx5
-rw-r--r--cppuhelper/source/servicemanager.hxx2
-rw-r--r--cppuhelper/source/typemanager.cxx5
-rw-r--r--cppuhelper/source/typemanager.hxx2
4 files changed, 8 insertions, 6 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 6e2f12813445..44044e28a54e 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -46,6 +46,7 @@
#include <sal/log.hxx>
#include <uno/environment.hxx>
#include <uno/mapping.hxx>
+#include <o3tl/string_view.hxx>
#include "loadsharedlibcomponentfactory.hxx"
@@ -1322,9 +1323,9 @@ void cppuhelper::ServiceManager::removeEventListenerFromComponent(
}
}
-void cppuhelper::ServiceManager::init(OUString const & rdbUris) {
+void cppuhelper::ServiceManager::init(std::u16string_view rdbUris) {
for (sal_Int32 i = 0; i != -1;) {
- OUString uri(rdbUris.getToken(0, ' ', i));
+ OUString uri(o3tl::getToken(rdbUris, 0, ' ', i));
if (uri.isEmpty()) {
continue;
}
diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx
index d086a8d65ead..537194151735 100644
--- a/cppuhelper/source/servicemanager.hxx
+++ b/cppuhelper/source/servicemanager.hxx
@@ -193,7 +193,7 @@ public:
using ServiceManagerBase::acquire;
using ServiceManagerBase::release;
- void init(OUString const & rdbUris);
+ void init(std::u16string_view rdbUris);
void setContext(
css::uno::Reference< css::uno::XComponentContext > const & context)
diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx
index 30c1555de137..28ef85189f29 100644
--- a/cppuhelper/source/typemanager.cxx
+++ b/cppuhelper/source/typemanager.cxx
@@ -53,6 +53,7 @@
#include <sal/log.hxx>
#include <sal/macros.h>
#include <sal/types.h>
+#include <o3tl/string_view.hxx>
#include <unoidl/unoidl.hxx>
@@ -2023,9 +2024,9 @@ cppuhelper::TypeManager::createTypeDescriptionEnumeration(
depth == css::reflection::TypeDescriptionSearchDepth_INFINITE);
}
-void cppuhelper::TypeManager::init(OUString const & rdbUris) {
+void cppuhelper::TypeManager::init(std::u16string_view rdbUris) {
for (sal_Int32 i = 0; i != -1;) {
- OUString uri(rdbUris.getToken(0, ' ', i));
+ OUString uri(o3tl::getToken(rdbUris, 0, ' ', i));
if (uri.isEmpty()) {
continue;
}
diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx
index dcd415b888b1..1ee264bf16ff 100644
--- a/cppuhelper/source/typemanager.hxx
+++ b/cppuhelper/source/typemanager.hxx
@@ -47,7 +47,7 @@ public:
using TypeManager_Base::acquire;
using TypeManager_Base::release;
- void init(OUString const & rdbUris);
+ void init(std::u16string_view rdbUris);
css::uno::Any find(OUString const & name);