diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-23 00:38:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-23 10:35:45 +0100 |
commit | 050b80a6fc9b6f0c550c5ca20fa3c93e9552c13a (patch) | |
tree | adde9066eb1669bc9df616b839c96ab6070d1b12 /sw | |
parent | af6ce167af13f896e1786ef7d3c2d194aaf1c3dd (diff) |
ditch deprecated api
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/utlui/attrdesc.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx index 79b59b8b66ea..e8eb645c5640 100644 --- a/sw/source/ui/utlui/attrdesc.cxx +++ b/sw/source/ui/utlui/attrdesc.cxx @@ -36,6 +36,7 @@ #include <svtools/grfmgr.hxx> #include <unotools/intlwrapper.hxx> #include <comphelper/processfactory.hxx> +#include <rtl/ustrbuf.hxx> #include <fmtanchr.hxx> #include <fmtfsize.hxx> #include <fmtinfmt.hxx> @@ -1204,22 +1205,21 @@ SfxItemPresentation SwGammaGrf::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, String &rText, const IntlWrapper* /*pIntl*/) const { + rtl::OUStringBuffer aText; switch( ePres ) { case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: if( SFX_ITEM_PRESENTATION_COMPLETE == ePres ) - rText = SW_RESSTR( STR_GAMMA ); - else if( rText.Len() ) - rText.Erase(); - ( rText += UniString::CreateFromDouble( GetValue() )) += '%'; + aText.append(SW_RESSTR(STR_GAMMA)); + aText.append(GetValue()).append(static_cast<sal_Unicode>('%')); break; default: ePres = SFX_ITEM_PRESENTATION_NONE; - rText.Erase(); break; } + rText = aText.makeStringAndClear(); return ePres; } |