summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlnumfe.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-30 10:57:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-30 13:53:28 +0000
commit5988a3cf91e2cb5bf1628b88965e3652932e4eb6 (patch)
treee1b0d898b60b570bd7ec9ad2f7e866232cdccaf2 /xmloff/source/style/xmlnumfe.cxx
parenta5084d15e1b72e303e1628fbff84432036b014a9 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/style/xmlnumfe.cxx')
-rw-r--r--xmloff/source/style/xmlnumfe.cxx13
1 files changed, 4 insertions, 9 deletions
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 )