diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-08-21 15:07:31 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-08-21 15:10:35 +0200 |
commit | 64b993e046f23baaacaff1572b7d2a816588b5ef (patch) | |
tree | 237dce36a1d4787d168a0520839f6aab22500487 /i18npool | |
parent | 75f41baab6ce75786a91fe461835ee16a23ec18e (diff) |
finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.
Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/calendar/calendar_jewish.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/i18npool/source/calendar/calendar_jewish.cxx b/i18npool/source/calendar/calendar_jewish.cxx index 634c414efd2e..b9356948f92f 100644 --- a/i18npool/source/calendar/calendar_jewish.cxx +++ b/i18npool/source/calendar/calendar_jewish.cxx @@ -287,7 +287,7 @@ Calendar_jewish::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNa if (nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR) { sal_Int32 value = getValue(CalendarFieldIndex::YEAR) % 1000; // take last 3 digits - return aNatNum.getNativeNumberString(OUString::valueOf(value), aLocale, nNativeNumberMode ); + return aNatNum.getNativeNumberString(OUString::number(value), aLocale, nNativeNumberMode ); } else return Calendar_gregorian::getDisplayString(nCalendarDisplayCode, nNativeNumberMode ); diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 0bc185ca4810..e7c215339a18 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -342,7 +342,7 @@ void lcl_formatChars( const sal_Unicode table[], int tableSize, int n, OUString& if( n>=tableSize ) lcl_formatChars( table, tableSize, (n-tableSize)/tableSize, s ); - s += OUString::valueOf( table[ n % tableSize ] ); + s += OUString( table[ n % tableSize ] ); } static @@ -355,7 +355,7 @@ void lcl_formatChars1( const sal_Unicode table[], int tableSize, int n, OUString int repeat_count = n / tableSize + 1; for( int i=0; i<repeat_count; i++ ) - s += OUString::valueOf( table[ n%tableSize ] ); + s += OUString( table[ n%tableSize ] ); } static @@ -367,9 +367,9 @@ void lcl_formatChars2( const sal_Unicode table_capital[], const sal_Unicode tabl if( n>=tableSize ) { lcl_formatChars2( table_capital, table_small, tableSize, (n-tableSize)/tableSize, s ); - s += OUString::valueOf( table_small[ n % tableSize ] ); + s += OUString( table_small[ n % tableSize ] ); } else - s += OUString::valueOf( table_capital[ n % tableSize ] ); + s += OUString( table_capital[ n % tableSize ] ); } static @@ -379,10 +379,10 @@ void lcl_formatChars3( const sal_Unicode table_capital[], const sal_Unicode tabl // if A=='A' then 0=>A, 1=>B, ..., 25=>Z, 26=>Aa, 27=>Bb, ... int repeat_count = n / tableSize + 1; - s += OUString::valueOf( table_capital[ n%tableSize ] ); + s += OUString( table_capital[ n%tableSize ] ); for( int i=1; i<repeat_count; i++ ) - s += OUString::valueOf( table_small[ n%tableSize ] ); + s += OUString( table_small[ n%tableSize ] ); } @@ -624,7 +624,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal result += toRoman( number ).toAsciiLowerCase(); break; case ARABIC: - result += OUString::valueOf( number ); + result += OUString::number( number ); break; case NUMBER_NONE: return OUString(""); // ignore prefix and suffix @@ -643,7 +643,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal break; case TRANSLITERATION: try { - const OUString &tmp = OUString::valueOf( number ); + const OUString &tmp = OUString::number( number ); OUString transliteration; getPropertyByName(aProperties, "Transliteration", sal_True) >>= transliteration; impl_loadTranslit(); @@ -651,7 +651,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal result += translit->transliterateString2String(tmp, 0, tmp.getLength()); } catch (Exception& ) { // When translteration property is missing, return default number (bug #101141#) - result += OUString::valueOf( number ); + result += OUString::number( number ); // OSL_ASSERT(0); // throw IllegalArgumentException(); } @@ -856,10 +856,10 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal if (natNum) { NativeNumberSupplier sNatNum; - result += sNatNum.getNativeNumberString(OUString::valueOf( number ), locale, natNum); + result += sNatNum.getNativeNumberString(OUString::number( number ), locale, natNum); } else if (tableSize) { if ( number > tableSize && !recycleSymbol) - result += OUString::valueOf( number); + result += OUString::number( number); else result += OUString(&table[--number % tableSize], 1); } |