summaryrefslogtreecommitdiff
path: root/svl/source/items/style.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/items/style.cxx')
-rw-r--r--svl/source/items/style.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 5856393f57e9..0ab10a4c7801 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -36,6 +36,7 @@
#include <algorithm>
#include <comphelper/servicehelper.hxx>
#include <o3tl/make_unique.hxx>
+#include <rtl/ustrbuf.hxx>
#include <string.h>
@@ -328,7 +329,7 @@ bool SfxStyleSheetBase::IsUsed() const
OUString SfxStyleSheetBase::GetDescription( MapUnit eMetric )
{
SfxItemIter aIter( GetItemSet() );
- OUString aDesc;
+ OUStringBuffer aDesc;
const SfxPoolItem* pItem = aIter.FirstItem();
IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
@@ -341,13 +342,13 @@ OUString SfxStyleSheetBase::GetDescription( MapUnit eMetric )
*pItem, eMetric, aItemPresentation, aIntlWrapper ) )
{
if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
- aDesc += " + ";
+ aDesc.append(" + ");
if ( !aItemPresentation.isEmpty() )
- aDesc += aItemPresentation;
+ aDesc.append(aItemPresentation);
}
pItem = aIter.NextItem();
}
- return aDesc;
+ return aDesc.makeStringAndClear();
}
SfxStyleFamily SfxStyleSheetIterator::GetSearchFamily() const