summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-10 14:09:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-11 09:24:42 +0200
commit3322e500f48794d3569c27f73cc5f3bafb5f2397 (patch)
tree3dc405729d94e9f27020a695b9e55e6efd91657a /embeddedobj
parent078e65cac18fec8729ed8087233caa1655a02d02 (diff)
avoid some OUString construction on some hot paths
Change-Id: I098b017d22b7a4502998a0901ddcfca08a57ee43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134115 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index b32d07f1c59c..e49e5169cc79 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -190,10 +190,13 @@ static void TransferMediaType( const uno::Reference< embed::XStorage >& i_rSourc
static uno::Reference< util::XCloseable > CreateDocument( const uno::Reference< uno::XComponentContext >& _rxContext,
const OUString& _rDocumentServiceName, bool _bEmbeddedScriptSupport, const bool i_bDocumentRecoverySupport )
{
+ static constexpr OUStringLiteral sEmbeddedObject = u"EmbeddedObject";
+ static constexpr OUStringLiteral sEmbeddedScriptSupport = u"EmbeddedScriptSupport";
+ static constexpr OUStringLiteral sDocumentRecoverySupport = u"DocumentRecoverySupport";
::comphelper::NamedValueCollection aArguments;
- aArguments.put( "EmbeddedObject", true );
- aArguments.put( "EmbeddedScriptSupport", _bEmbeddedScriptSupport );
- aArguments.put( "DocumentRecoverySupport", i_bDocumentRecoverySupport );
+ aArguments.put( sEmbeddedObject, true );
+ aArguments.put( sEmbeddedScriptSupport, _bEmbeddedScriptSupport );
+ aArguments.put( sDocumentRecoverySupport, i_bDocumentRecoverySupport );
uno::Reference< uno::XInterface > xDocument;
try