summaryrefslogtreecommitdiff
path: root/configmgr
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 /configmgr
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
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 'configmgr')
-rw-r--r--configmgr/source/components.cxx4
-rw-r--r--configmgr/source/components.hxx3
-rw-r--r--configmgr/source/writemodfile.cxx6
-rw-r--r--configmgr/source/xcuparser.cxx6
-rw-r--r--configmgr/source/xcuparser.hxx3
5 files changed, 12 insertions, 10 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index cd1fceddb2ef..65bc00da9517 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -855,8 +855,8 @@ void Components::parseXcsXcuIniLayer(
}
}
-void Components::parseResLayer(int layer, OUString const & url) {
- OUString resUrl(url + "/res");
+void Components::parseResLayer(int layer, std::u16string_view url) {
+ OUString resUrl(OUString::Concat(url) + "/res");
parseXcdFiles(layer, resUrl);
parseFiles(layer, ".xcu", &parseXcuFile, resUrl, false);
}
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index 0647002f0d15..a44097810015 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -22,6 +22,7 @@
#include <sal/config.h>
#include <set>
+#include <string_view>
#include <com/sun/star/beans/Optional.hpp>
#include <com/sun/star/uno/Reference.hxx>
@@ -131,7 +132,7 @@ private:
void parseXcsXcuIniLayer(
int layer, OUString const & url, bool recordAdditions);
- void parseResLayer(int layer, OUString const & url);
+ void parseResLayer(int layer, std::u16string_view url);
void parseModificationLayer(int layer, OUString const & url);
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index 04da5f9a50ab..759959ab3bb7 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -401,7 +401,7 @@ struct PairEntrySorter
void writeModifications(
Components & components, TempFile &handle,
- OUString const & parentPathRepresentation,
+ std::u16string_view parentPathRepresentation,
rtl::Reference< Node > const & parent, OUString const & nodeName,
rtl::Reference< Node > const & node,
Modifications::Node const & modifications)
@@ -448,7 +448,7 @@ void writeModifications(
} else {
assert(node.is());
OUString pathRep(
- parentPathRepresentation + "/" +
+ OUString::Concat(parentPathRepresentation) + "/" +
Data::createSegment(node->getTemplateName(), nodeName));
// copy configmgr::Modifications::Node's to a sortable list. Use pointers
@@ -627,7 +627,7 @@ void writeModFile(
for (const auto& j : ModNodePairEntryVector)
{
writeModifications(
- components, tmp, "", rtl::Reference< Node >(), j->first,
+ components, tmp, u"", rtl::Reference< Node >(), j->first,
data.getComponents().findNode(Data::NO_LAYER, j->first),
j->second);
}
diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx
index 03e3c60ab067..af21518abd78 100644
--- a/configmgr/source/xcuparser.cxx
+++ b/configmgr/source/xcuparser.cxx
@@ -651,7 +651,7 @@ void XcuParser::handleUnknownGroupProp(
void XcuParser::handlePlainGroupProp(
xmlreader::XmlReader const & reader, GroupNode * group,
- NodeMap::iterator const & propertyIndex, OUString const & name,
+ NodeMap::iterator const & propertyIndex, std::u16string_view name,
Type type, Operation operation, bool finalized)
{
PropertyNode * property = static_cast< PropertyNode * >(
@@ -672,7 +672,7 @@ void XcuParser::handlePlainGroupProp(
type != property->getStaticType())
{
throw css::uno::RuntimeException(
- "invalid type for prop " + name + " in " + reader.getUrl());
+ OUString::Concat("invalid type for prop ") + name + " in " + reader.getUrl());
}
valueParser_.type_ = type == TYPE_ERROR ? property->getStaticType() : type;
switch (operation) {
@@ -685,7 +685,7 @@ void XcuParser::handlePlainGroupProp(
case OPERATION_REMOVE:
if (!property->isExtension()) {
throw css::uno::RuntimeException(
- "invalid remove of non-extension prop " + name + " in " +
+ OUString::Concat("invalid remove of non-extension prop ") + name + " in " +
reader.getUrl());
}
group->getMembers().erase(propertyIndex);
diff --git a/configmgr/source/xcuparser.hxx b/configmgr/source/xcuparser.hxx
index 9bec6a26081a..cf6fb3e91b2d 100644
--- a/configmgr/source/xcuparser.hxx
+++ b/configmgr/source/xcuparser.hxx
@@ -23,6 +23,7 @@
#include <set>
#include <stack>
+#include <string_view>
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
@@ -89,7 +90,7 @@ private:
void handlePlainGroupProp(
xmlreader::XmlReader const & reader, GroupNode * group,
- NodeMap::iterator const & propertyIndex, OUString const & name,
+ NodeMap::iterator const & propertyIndex, std::u16string_view name,
Type type, Operation operation, bool finalized);
void handleLocalizedGroupProp(