summaryrefslogtreecommitdiff
path: root/writerperfect/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-26 16:16:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-27 13:10:44 +0200
commite266d448f45348f27f8291ea5d0542747d7c8168 (patch)
tree0d6d14e94d9bf25aeeb4ef21630ee72c10681645 /writerperfect/source
parent05c6cdb144d1732ca51d463845fa6ddef7c08265 (diff)
loplugin:stringstatic look for more strings
that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerperfect/source')
-rw-r--r--writerperfect/source/impress/KeynoteImportFilter.cxx4
-rw-r--r--writerperfect/source/writer/EPUBPackage.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx
index ccd93e3d2aaa..abf7d21e4055 100644
--- a/writerperfect/source/impress/KeynoteImportFilter.cxx
+++ b/writerperfect/source/impress/KeynoteImportFilter.cxx
@@ -215,8 +215,8 @@ KeynoteImportFilter::detect(css::uno::Sequence<css::beans::PropertyValue>& Descr
if (bUCBContentChanged)
pDescriptor[nUCBContentLocation].Value <<= xContent;
- const OUString sTypeName("impress_AppleKeynote");
- pDescriptor[nTypeNameLocation].Value <<= sTypeName;
+ static constexpr OUStringLiteral sTypeName(u"impress_AppleKeynote");
+ pDescriptor[nTypeNameLocation].Value <<= OUString(sTypeName);
return sTypeName;
}
diff --git a/writerperfect/source/writer/EPUBPackage.cxx b/writerperfect/source/writer/EPUBPackage.cxx
index c08b60ad70ed..ba8bac1d91ce 100644
--- a/writerperfect/source/writer/EPUBPackage.cxx
+++ b/writerperfect/source/writer/EPUBPackage.cxx
@@ -43,7 +43,7 @@ EPUBPackage::EPUBPackage(uno::Reference<uno::XComponentContext> xContext,
mxOutputStream.set(
mxStorage->openStreamElementByHierarchicalName("mimetype", embed::ElementModes::READWRITE),
uno::UNO_QUERY);
- const OString aMimeType("application/epub+zip");
+ static constexpr OStringLiteral aMimeType("application/epub+zip");
uno::Sequence<sal_Int8> aData(reinterpret_cast<const sal_Int8*>(aMimeType.getStr()),
aMimeType.getLength());
mxOutputStream->writeBytes(aData);