From dfa53b3a69dda7eafc1c3573d5d20cd1b29c77c0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 18 May 2022 14:10:13 +0200 Subject: [PATCH] elide some OUString allocation in SvxNumberType::GetNumStr Change-Id: Ia552796cfe99e7886f4b716e717643269b570c38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134530 Tested-by: Jenkins Reviewed-by: Noel Grandin --- editeng/source/items/numitem.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index f6d70cf723ac..cbbd7efb9dc4 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -133,10 +133,12 @@ OUString SvxNumberType::GetNumStr( sal_Int32 nNo, const css::lang::Locale& rLoca return OUString('0'); else { + static constexpr OUStringLiteral sNumberingType = u"NumberingType"; + static constexpr OUStringLiteral sValue = u"Value"; Sequence< PropertyValue > aProperties { - comphelper::makePropertyValue("NumberingType", static_cast(nNumType)), - comphelper::makePropertyValue("Value", nNo) + comphelper::makePropertyValue(sNumberingType, static_cast(nNumType)), + comphelper::makePropertyValue(sValue, nNo) }; try