embeddedobj/source/commonembedding/persistence.cxx |   17 +++++++++++------
 ucbhelper/source/client/content.cxx                |    3 ++-
 2 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit b4ae96a261ccb7bbaaa2f7bc844a6a0e973755d5
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue May 24 09:58:54 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue May 24 13:13:00 2022 +0200

    elide some OUString allocation
    
    Change-Id: I29df28792eb413005a85235fce7295320798ae65
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134859
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/embeddedobj/source/commonembedding/persistence.cxx 
b/embeddedobj/source/commonembedding/persistence.cxx
index e49e5169cc79..65e88266a78f 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -778,14 +778,19 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl(
         if ( aFilterName.isEmpty() )
             throw io::IOException(); // TODO:
 
+        static constexpr OUStringLiteral sFilterName = u"FilterName";
+        static constexpr OUStringLiteral sHierarchicalDocumentName = 
u"HierarchicalDocumentName";
+        static constexpr OUStringLiteral sDocumentBaseURL = u"DocumentBaseURL";
+        static constexpr OUStringLiteral sSourceShellID = u"SourceShellID";
+        static constexpr OUStringLiteral sDestinationShellID = 
u"DestinationShellID";
         uno::Sequence<beans::PropertyValue> aArgs{
-            comphelper::makePropertyValue("FilterName", aFilterName),
-            comphelper::makePropertyValue("HierarchicalDocumentName", 
aHierarchName),
-            comphelper::makePropertyValue("DocumentBaseURL", aBaseURL),
-            comphelper::makePropertyValue("SourceShellID",
-                                          getStringPropertyValue(rObjArgs, 
u"SourceShellID")),
+            comphelper::makePropertyValue(sFilterName, aFilterName),
+            comphelper::makePropertyValue(sHierarchicalDocumentName, 
aHierarchName),
+            comphelper::makePropertyValue(sDocumentBaseURL, aBaseURL),
+            comphelper::makePropertyValue(sSourceShellID,
+                                          getStringPropertyValue(rObjArgs, 
sSourceShellID)),
             comphelper::makePropertyValue(
-                "DestinationShellID", getStringPropertyValue(rObjArgs, 
u"DestinationShellID"))
+                sDestinationShellID, getStringPropertyValue(rObjArgs, 
sDestinationShellID))
         };
 
         xDoc->storeToStorage( xStorage, aArgs );
diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index 7f3268c41754..4eeeab2008d6 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -491,8 +491,9 @@ Reference< XRow > Content::getPropertyValuesInterface(
 //        rProp.Attributes = ;
     }
 
+    static constexpr OUStringLiteral sgetPropertyValues = u"getPropertyValues";
     Command aCommand;
-    aCommand.Name     = "getPropertyValues";
+    aCommand.Name     = sgetPropertyValues;
     aCommand.Handle   = -1; // n/a
     aCommand.Argument <<= aProps;
 

Reply via email to