From 5988a3cf91e2cb5bf1628b88965e3652932e4eb6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 30 Mar 2023 10:57:25 +0200 Subject: loplugin:stringadd in xmloff when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Id38d983e59386554c61e9bdcd9333554bbf4665c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149756 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/style/xmlnumfe.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'xmloff/source/style/xmlnumfe.cxx') diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 7d44f43342ef..a335f79ae23a 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -274,15 +274,10 @@ SvXMLNumFmtExport::~SvXMLNumFmtExport() static OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, bool bDefPart, std::u16string_view rPrefix ) { - OUStringBuffer aFmtName(10); - aFmtName.append( rPrefix ); - aFmtName.append( nKey ); - if (!bDefPart) - { - aFmtName.append( 'P' ); - aFmtName.append( nPart ); - } - return aFmtName.makeStringAndClear(); + if (bDefPart) + return rPrefix + OUString::number(nKey); + else + return rPrefix + OUString::number(nKey) + "P" + OUString::number( nPart ); } void SvXMLNumFmtExport::AddCalendarAttr_Impl( const OUString& rCalendar ) -- cgit tion value='distro/cib/libreoffice-5-2'>distro/cib/libreoffice-5-2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff