diff options
author | Jean-Noël Rouvignac <jn.rouvignac@gmail.com> | 2013-02-01 09:33:19 +0100 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-02-14 13:20:14 +0000 |
commit | 77fd448d0990adc79406e13a127b2b1834984b71 (patch) | |
tree | 3b8d1b23e7029dedcb97eb1d38ba83c91dfdac51 /svx/source/dialog/dlgunit.hxx | |
parent | 5502501a8848c771aff5a77448a02451e22398a4 (diff) |
Removed several useless macros: UNISTRING, USTR, USTR_ASCII, ASCII_STR, ASCII_STRING, CONST_ASCII, ASCSTR, ASCII, DEFINE_CONST_UNICODE, DEFINE_CONST_OUSTRING
Change-Id: I96d690bf9f9b319e9eeafcf218ec5ce87f21215f
Reviewed-on: https://gerrit.libreoffice.org/1954
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'svx/source/dialog/dlgunit.hxx')
-rw-r--r-- | svx/source/dialog/dlgunit.hxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/svx/source/dialog/dlgunit.hxx b/svx/source/dialog/dlgunit.hxx index 4d2aa68b25c4..2956faf4f45a 100644 --- a/svx/source/dialog/dlgunit.hxx +++ b/svx/source/dialog/dlgunit.hxx @@ -22,19 +22,19 @@ #include <svx/svdtrans.hxx> -inline String GetUnitString( long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep ) +inline OUString GetUnitString( long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep ) { - String aVal = rtl::OUString::valueOf(static_cast<sal_Int64>( - MetricField::ConvertValue(nVal_100, 2, MAP_100TH_MM, eFieldUnit))); + OUStringBuffer aVal = OUString::number( + MetricField::ConvertValue(nVal_100, 2, MAP_100TH_MM, eFieldUnit)); - while( aVal.Len() < 3 ) - aVal.Insert( sal_Unicode('0'), 0 ); + while( aVal.getLength() < 3 ) + aVal.insert( 0, "0" ); - aVal.Insert( cSep, aVal.Len() - 2 ); - aVal += sal_Unicode(' '); - aVal += SdrFormatter::GetUnitStr( eFieldUnit ); + aVal.insert( aVal.getLength() - 2, cSep ); + aVal.append(" "); + aVal.append(SdrFormatter::GetUnitStr( eFieldUnit )); - return aVal; + return aVal.makeStringAndClear(); } #endif // _SVX_DLG_DLGUNIT_HXX |