summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-30 10:19:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-30 09:26:58 +0000
commitaa8fb790e8d3f975c7ffadcb5a4fa390186c6d5d (patch)
tree2f65cfbad847c47f7e7d6a2e2ff644c50d1726b4 /stoc
parent2ca71b5c6e0374254e7c75c75e54fa6a8caebfde (diff)
loplugin:stringadd in starmath..svl
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Id8f229c3a5223dee8d2710caf15d4612594fc763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149748 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/inspect/introspection.cxx4
-rw-r--r--stoc/source/security/permissions.cxx14
-rw-r--r--stoc/source/uriproc/UriReference.cxx6
-rw-r--r--stoc/source/uriproc/UriReferenceFactory.cxx18
4 files changed, 16 insertions, 26 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index c219e8030f0c..e6c44c4748ba 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1441,8 +1441,8 @@ struct TypeKey {
// those matches, too:
OUStringBuffer b(static_cast<int>(theTypes.size() * 64));
for (const css::uno::Type& rType : theTypes) {
- b.append(rType.getTypeName());
- b.append('*'); // arbitrary delimiter not used by type grammar
+ b.append(rType.getTypeName()
+ + "*"); // arbitrary delimiter not used by type grammar
}
types = b.makeStringAndClear();
}
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index 12f39ce3d83a..48a1f907f01c 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -238,13 +238,11 @@ OUString SocketPermission::toString() const
{
OUStringBuffer buf( 48 );
// host
- buf.append( "com.sun.star.connection.SocketPermission (host=\"" );
- buf.append( m_host );
+ buf.append( "com.sun.star.connection.SocketPermission (host=\""
+ + m_host );
if (m_resolvedHost)
{
- buf.append( '[' );
- buf.append( m_ip );
- buf.append( ']' );
+ buf.append( "[" + m_ip + "]" );
}
// port
if (0 != m_lowerPort || 65535 != m_upperPort)
@@ -260,9 +258,9 @@ OUString SocketPermission::toString() const
}
}
// actions
- buf.append( "\", actions=\"" );
- buf.append( makeStrings( m_actions, s_actions ) );
- buf.append( "\")" );
+ buf.append( "\", actions=\""
+ + makeStrings( m_actions, s_actions )
+ + "\")" );
return buf.makeStringAndClear();
}
diff --git a/stoc/source/uriproc/UriReference.cxx b/stoc/source/uriproc/UriReference.cxx
index 9c7c7962c66a..fc272014143a 100644
--- a/stoc/source/uriproc/UriReference.cxx
+++ b/stoc/source/uriproc/UriReference.cxx
@@ -53,13 +53,11 @@ OUString UriReference::getUriReference()
std::lock_guard g(m_mutex);
OUStringBuffer buf(128);
if (!m_scheme.isEmpty()) {
- buf.append(m_scheme);
- buf.append(':');
+ buf.append(m_scheme + ":");
}
appendSchemeSpecificPart(buf);
if (m_hasFragment) {
- buf.append('#');
- buf.append(m_fragment);
+ buf.append("#" + m_fragment);
}
return buf.makeStringAndClear();
}
diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx
index ed739cdc32cf..39b9229633ca 100644
--- a/stoc/source/uriproc/UriReferenceFactory.cxx
+++ b/stoc/source/uriproc/UriReferenceFactory.cxx
@@ -427,8 +427,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute(
OUStringBuffer abs(uriReference->getScheme());
abs.append(':');
if (uriReference->hasAuthority()) {
- abs.append("//");
- abs.append(uriReference->getAuthority());
+ abs.append("//" + uriReference->getAuthority());
}
for (auto const & i : segments)
{
@@ -471,8 +470,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute(
OUStringBuffer abs(baseUriReference->getScheme());
abs.append(':');
if (baseUriReference->hasAuthority()) {
- abs.append("//");
- abs.append(baseUriReference->getAuthority());
+ abs.append("//" + baseUriReference->getAuthority());
}
abs.append(baseUriReference->getPath());
if (uriReference->hasQuery()) {
@@ -492,11 +490,9 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeAbsolute(
abs.append(baseUriReference->getScheme());
abs.append(':');
if (uriReference->hasAuthority()) {
- abs.append("//");
- abs.append(uriReference->getAuthority());
+ abs.append("//" + uriReference->getAuthority());
} else if (baseUriReference->hasAuthority()) {
- abs.append("//");
- abs.append(baseUriReference->getAuthority());
+ abs.append("//" + baseUriReference->getAuthority());
}
if (uriReference->hasRelativePath()) {
auto path1 = baseUriReference->getPath();
@@ -606,8 +602,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeRelative(
uriReference->getAuthority()))
{
if (uriReference->hasAuthority()) {
- rel.append("//");
- rel.append(uriReference->getAuthority());
+ rel.append("//" + uriReference->getAuthority());
}
rel.append(uriReference->getPath());
} else if ((equalIgnoreEscapeCase(
@@ -653,8 +648,7 @@ css::uno::Reference< css::uri::XUriReference > Factory::makeRelative(
} else {
if (uriReference->getPath().startsWith("//")) {
assert(uriReference->hasAuthority());
- rel.append("//");
- rel.append(uriReference->getAuthority());
+ rel.append("//" + uriReference->getAuthority());
}
rel.append(uriReference->getPath());
}