summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-24 09:58:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-24 13:13:00 +0200
commitb4ae96a261ccb7bbaaa2f7bc844a6a0e973755d5 (patch)
tree84e0ddb4018b93808800596fc0ef6d4583d9a91e /embeddedobj
parente8f2ccb42014b5eccabd42e5f95190be9e8f4519 (diff)
elide some OUString allocation
Change-Id: I29df28792eb413005a85235fce7295320798ae65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx17
1 files changed, 11 insertions, 6 deletions
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 );