diff options
Diffstat (limited to 'xmloff/source/style/xmlnumfe.cxx')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 13 |
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 ) |