summaryrefslogtreecommitdiff
path: root/drawinglayer/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 /drawinglayer/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 'drawinglayer/source')
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 39ffdf05e318..b774848cc3a4 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1239,7 +1239,7 @@ void VclMetafileProcessor2D::processTextHierarchyFieldPrimitive2D(
{
// support for FIELD_SEQ_BEGIN, FIELD_SEQ_END and URL. It wraps text primitives (but is not limited to)
// thus do the MetafileAction embedding stuff but just handle recursively.
- const OString aCommentStringCommon("FIELD_SEQ_BEGIN");
+ static constexpr OStringLiteral aCommentStringCommon("FIELD_SEQ_BEGIN");
OUString aURL;
switch (rFieldPrimitive.getType())
@@ -1333,7 +1333,7 @@ void VclMetafileProcessor2D::processTextHierarchyBulletPrimitive2D(
void VclMetafileProcessor2D::processTextHierarchyParagraphPrimitive2D(
const primitive2d::TextHierarchyParagraphPrimitive2D& rParagraphPrimitive)
{
- const OString aCommentString("XTEXT_EOP");
+ static constexpr OStringLiteral aCommentString("XTEXT_EOP");
static bool bSuppressPDFExtOutDevDataSupport(false); // loplugin:constvars:ignore
if (nullptr == mpPDFExtOutDevData || bSuppressPDFExtOutDevDataSupport)
@@ -1495,9 +1495,9 @@ void VclMetafileProcessor2D::processTextSimplePortionPrimitive2D(
rTxt, nTextPosition, rLocale, css::i18n::WordType::ANY_WORD, true));
sal_Int32 nNextSentenceBreak(
rBreakIterator.endOfSentence(rTxt, nTextPosition, rLocale));
- const OString aCommentStringA("XTEXT_EOC");
- const OString aCommentStringB("XTEXT_EOW");
- const OString aCommentStringC("XTEXT_EOS");
+ static constexpr OStringLiteral aCommentStringA("XTEXT_EOC");
+ static constexpr OStringLiteral aCommentStringB("XTEXT_EOW");
+ static constexpr OStringLiteral aCommentStringC("XTEXT_EOS");
for (sal_Int32 i(nTextPosition); i < nTextPosition + nTextLength; i++)
{