summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-08-17 14:46:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-18 08:55:23 +0200
commitf29ef71073bb31f05d6cc50f952e827134868c2d (patch)
tree832f6b3676064b46454ff89439ad6aca7d5fc0d0 /comphelper
parentcc9bc379de14a5ecfcb7b510fe74beeab768f875 (diff)
avoid constructing OUString on hot path (tdf#105575)
Change-Id: I7c9925fc7f68cdc9bd1a9c1834daabff09c8cf6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120604 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/processfactory/processfactory.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx
index 8df1e244ca19..ea5595646e4c 100644
--- a/comphelper/source/processfactory/processfactory.cxx
+++ b/comphelper/source/processfactory/processfactory.cxx
@@ -86,8 +86,9 @@ Reference< XComponentContext > getComponentContext(
Reference< XComponentContext > xRet;
uno::Reference<beans::XPropertySet> const xProps( factory, uno::UNO_QUERY );
if (xProps.is()) {
+ static constexpr OUStringLiteral DEFAULT_CONTEXT = u"DefaultContext";
try {
- xRet.set( xProps->getPropertyValue("DefaultContext"),
+ xRet.set( xProps->getPropertyValue(DEFAULT_CONTEXT),
uno::UNO_QUERY );
}
catch (beans::UnknownPropertyException & e) {