diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-10 14:09:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-11 09:24:42 +0200 |
commit | 3322e500f48794d3569c27f73cc5f3bafb5f2397 (patch) | |
tree | 3dc405729d94e9f27020a695b9e55e6efd91657a /package | |
parent | 078e65cac18fec8729ed8087233caa1655a02d02 (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 'package')
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 3 | ||||
-rw-r--r-- | package/source/xstor/xstorage.cxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 9e454e016d5e..c2f979b61f9d 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -242,8 +242,9 @@ OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext >& rCon uno::Reference< io::XStream > CreateMemoryStream( const uno::Reference< uno::XComponentContext >& rContext ) { + static constexpr OUStringLiteral sName(u"com.sun.star.comp.MemoryStream"); return uno::Reference< io::XStream >( - rContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.MemoryStream", rContext), + rContext->getServiceManager()->createInstanceWithContext(sName, rContext), uno::UNO_QUERY_THROW); } diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index a5777deb771e..bdcd699a7eb7 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -473,7 +473,8 @@ void OStorage_Impl::GetStorageProperties() uno::Reference< beans::XPropertySet > xPackageProps( m_xPackage, uno::UNO_QUERY_THROW ); xPackageProps->getPropertyValue( MEDIATYPE_FALLBACK_USED_PROPERTY ) >>= m_bMTFallbackUsed; - xProps->getPropertyValue( "MediaType" ) >>= m_aMediaType; + static constexpr OUStringLiteral sMediaType(u"MediaType"); + xProps->getPropertyValue( sMediaType ) >>= m_aMediaType; m_bControlMediaType = true; } |