summaryrefslogtreecommitdiffstats
path: root/comphelper
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-10-12 13:38:52 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-10-12 16:29:33 +0200
commitd6ea967e040d01ec69649ac689472018e477db34 (patch)
tree37ddac7bb861554373d844ab3206245422430703 /comphelper
parentUse size_t for string lengths (diff)
downloadcore-d6ea967e040d01ec69649ac689472018e477db34.tar.gz
core-d6ea967e040d01ec69649ac689472018e477db34.zip
Get rid of 2 OUStringBuffer in comphelper
Change-Id: Ib348288c729cab76ef39f6a33d173f7a20534f2f Reviewed-on: https://gerrit.libreoffice.org/80714 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/configuration.cxx6
-rw-r--r--comphelper/source/property/propertystatecontainer.cxx6
2 files changed, 2 insertions, 10 deletions
diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx
index 89ce0e3be024..9c26e1a08307 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -55,17 +55,13 @@ OUString getDefaultLocale(
}
OUString extendLocalizedPath(OUString const & path, OUString const & locale) {
- OUStringBuffer buf(path);
- buf.append("/['*");
SAL_WARN_IF(
locale.match("*"), "comphelper",
"Locale \"" << locale << "\" starts with \"*\"");
assert(locale.indexOf('&') == -1);
assert(locale.indexOf('"') == -1);
assert(locale.indexOf('\'') == -1);
- buf.append(locale);
- buf.append("']");
- return buf.makeStringAndClear();
+ return path + "/['*" + locale + "']";
}
}
diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx
index 6d2071f90dfb..e83d4752a57e 100644
--- a/comphelper/source/property/propertystatecontainer.cxx
+++ b/comphelper/source/property/propertystatecontainer.cxx
@@ -37,11 +37,7 @@ namespace comphelper
// Would be nice to have localized exception strings (a simply resource file containing
// strings only would suffice, and could be realized with a UNO service, so we do not
// need the dependency to the Tools project)
- OUStringBuffer sMessage;
- sMessage.append( "The property \"" );
- sMessage.append( _rPropertyName );
- sMessage.append( "\" is unknown." );
- return sMessage.makeStringAndClear();
+ return "The property \"" + _rPropertyName + "\" is unknown.";
}
}