summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-24 16:23:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-25 19:00:44 +0200
commit18321eb3f447c9e6519e1691673677fc8a2c8117 (patch)
tree5bc66cbd208485d26048af9a37f39972b314cf4b /package
parenta0731f14d1b9c86a626e8560053d87dcaaef8ad6 (diff)
elide some OUString allocation
Change-Id: Idcb296980ea498373a0fb4f8c0c584eef2c5c9f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134922 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/owriteablestream.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index fee3ec5059b7..c9d012a61cff 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -1034,20 +1034,23 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProper
// The "Compressed" property must be set after "MediaType" property,
// since the setting of the last one can change the value of the first one
-
+ static constexpr OUStringLiteral sMediaType = u"MediaType";
+ static constexpr OUStringLiteral sCompressed = u"Compressed";
+ static constexpr OUStringLiteral sSize = u"Size";
+ static constexpr OUStringLiteral sEncrypted = u"Encrypted";
if ( m_nStorageType == embed::StorageFormats::OFOPXML || m_nStorageType == embed::StorageFormats::PACKAGE )
{
- aResultRange[0].Name = "MediaType";
- aResultRange[1].Name = "Compressed";
- aResultRange[2].Name = "Size";
+ aResultRange[0].Name = sMediaType;
+ aResultRange[1].Name = sCompressed;
+ aResultRange[2].Name = sSize;
if ( m_nStorageType == embed::StorageFormats::PACKAGE )
- aResultRange[3].Name = "Encrypted";
+ aResultRange[3].Name = sEncrypted;
}
else
{
- aResultRange[0].Name = "Compressed";
- aResultRange[1].Name = "Size";
+ aResultRange[0].Name = sCompressed;
+ aResultRange[1].Name = sSize;
}
// TODO: may be also raw stream should be marked