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>
This commit is contained in:
Noel Grandin
2022-05-24 13:13:00 +02:00
parent e8f2ccb420
commit b4ae96a261
2 changed files with 13 additions and 7 deletions
@@ -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 );
+2 -1
View File
@@ -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;