summaryrefslogtreecommitdiffstats
path: root/cppuhelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b /cppuhelper
parenttdf#138907 sw TitlePageDlg: fix round-tripping (diff)
downloadcore-042033f1e6da22616cb76c8d950c20c9efecbad5.tar.gz
core-042033f1e6da22616cb76c8d950c20c9efecbad5.zip
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/servicemanager.cxx12
-rw-r--r--cppuhelper/source/servicemanager.hxx5
-rw-r--r--cppuhelper/source/shlib.cxx7
3 files changed, 13 insertions, 11 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 070f1edd966b..d7eff0b74cf6 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -1466,7 +1466,7 @@ bool cppuhelper::ServiceManager::readLegacyRdbFile(OUString const & uri) {
}
OUString cppuhelper::ServiceManager::readLegacyRdbString(
- OUString const & uri, RegistryKey & key, OUString const & path)
+ std::u16string_view uri, RegistryKey & key, OUString const & path)
{
RegistryKey subkey;
RegValueType t;
@@ -1477,7 +1477,7 @@ OUString cppuhelper::ServiceManager::readLegacyRdbString(
|| s == 0 || s > o3tl::make_unsigned(SAL_MAX_INT32))
{
throw css::uno::DeploymentException(
- "Failure reading legacy rdb file " + uri,
+ OUString::Concat("Failure reading legacy rdb file ") + uri,
static_cast< cppu::OWeakObject * >(this));
}
OUString val;
@@ -1492,14 +1492,14 @@ OUString cppuhelper::ServiceManager::readLegacyRdbString(
| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
{
throw css::uno::DeploymentException(
- "Failure reading legacy rdb file " + uri,
+ OUString::Concat("Failure reading legacy rdb file ") + uri,
static_cast< cppu::OWeakObject * >(this));
}
return val;
}
void cppuhelper::ServiceManager::readLegacyRdbStrings(
- OUString const & uri, RegistryKey & key, OUString const & path,
+ std::u16string_view uri, RegistryKey & key, OUString const & path,
std::vector< OUString > * strings)
{
assert(strings != nullptr);
@@ -1511,14 +1511,14 @@ void cppuhelper::ServiceManager::readLegacyRdbStrings(
return;
default:
throw css::uno::DeploymentException(
- "Failure reading legacy rdb file " + uri,
+ OUString::Concat("Failure reading legacy rdb file ") + uri,
static_cast< cppu::OWeakObject * >(this));
}
OUString prefix(subkey.getName() + "/");
RegistryKeyNames names;
if (subkey.getKeyNames(OUString(), names) != RegError::NO_ERROR) {
throw css::uno::DeploymentException(
- "Failure reading legacy rdb file " + uri,
+ OUString::Concat("Failure reading legacy rdb file ") + uri,
static_cast< cppu::OWeakObject * >(this));
}
for (sal_uInt32 i = 0; i != names.getLength(); ++i) {
diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx
index 24a7e56a4ba9..f6a505492be8 100644
--- a/cppuhelper/source/servicemanager.hxx
+++ b/cppuhelper/source/servicemanager.hxx
@@ -14,6 +14,7 @@
#include <cassert>
#include <map>
#include <memory>
+#include <string_view>
#include <vector>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -321,11 +322,11 @@ private:
bool readLegacyRdbFile(OUString const & uri);
OUString readLegacyRdbString(
- OUString const & uri, RegistryKey & key,
+ std::u16string_view uri, RegistryKey & key,
OUString const & path);
void readLegacyRdbStrings(
- OUString const & uri, RegistryKey & key,
+ std::u16string_view uri, RegistryKey & key,
OUString const & path, std::vector< OUString > * strings);
void insertRdbFiles(
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 89ce8b8554db..b0a938a4abac 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -21,6 +21,7 @@
#include <cassert>
#include <cstdlib>
+#include <string_view>
#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
#include <com/sun/star/registry/CannotRegisterImplementationException.hpp>
@@ -112,8 +113,8 @@ extern "C" void getFactory(va_list * args) {
css::uno::Reference<css::uno::XInterface> invokeComponentFactory(
css::uno::Environment const & source, css::uno::Environment const & target,
- component_getFactoryFunc function, OUString const & uri,
- OUString const & implementation,
+ component_getFactoryFunc function, std::u16string_view uri,
+ std::u16string_view implementation,
css::uno::Reference<css::lang::XMultiServiceFactory> const & serviceManager)
{
if (!(source.is() && target.is())) {
@@ -147,7 +148,7 @@ css::uno::Reference<css::uno::XInterface> invokeComponentFactory(
}
if (factory == nullptr) {
throw css::loader::CannotActivateFactoryException(
- ("calling factory function for \"" + implementation + "\" in <"
+ (OUString::Concat("calling factory function for \"") + implementation + "\" in <"
+ uri + "> returned null"),
css::uno::Reference<css::uno::XInterface>());
}