diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-19 11:36:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-19 14:11:50 +0100 |
commit | 447e5b4b36271b197660a9383a0f88c2761896c6 (patch) | |
tree | dfbdfcfacf2e890fe51db57684927f345c1a4acb /unotools | |
parent | aae1b8ffade1ef0756899436497fa049b396fc26 (diff) |
death to some UniStrings
Change-Id: I0fa0c60e12c418d25f8bd96cc04c6abd74b1a608
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/i18n/localedatawrapper.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 698a457d6724..f4714b64d966 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -1458,17 +1458,17 @@ rtl::OUString LocaleDataWrapper::getLongDate( const Date& rDate, CalendarWrapper // day of month nVal = rCal.getValue( CalendarFieldIndex::DAY_OF_MONTH ); pBuf = ImplAdd2UNum( aBuf, nVal, bDayOfMonthWithLeadingZero ); - String aDay( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) ); + rtl::OUString aDay(aBuf, pBuf-aBuf); // month of year nVal = rCal.getValue( CalendarFieldIndex::MONTH ); - String aMonth( rCal.getDisplayName( CalendarDisplayIndex::MONTH, nVal, nDisplayMonth ) ); + rtl::OUString aMonth( rCal.getDisplayName( CalendarDisplayIndex::MONTH, nVal, nDisplayMonth ) ); // year nVal = rCal.getValue( CalendarFieldIndex::YEAR ); if ( bTwoDigitYear ) pBuf = ImplAddUNum( aBuf, nVal % 100, 2 ); else pBuf = ImplAddUNum( aBuf, nVal ); - String aYear( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) ); + rtl::OUString aYear(aBuf, pBuf-aBuf); // concatenate switch ( getLongDateFormat() ) { @@ -1524,7 +1524,7 @@ rtl::OUString LocaleDataWrapper::getDuration( const Time& rTime, sal_Bool bSec, } } - return String( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) ); + return rtl::OUString(aBuf, pBuf-aBuf); } @@ -1554,14 +1554,13 @@ rtl::OUString LocaleDataWrapper::getNum( sal_Int64 nNumber, sal_uInt16 nDecimals sal_Unicode* pBuf = ImplAddFormatNum( pBuffer, nNumber, nDecimals, bUseThousandSep, bTrailingZeros ); - String aStr( pBuffer, (xub_StrLen)(sal_uLong)(pBuf-pBuffer) ); + rtl::OUString aStr(pBuffer, pBuf-pBuffer); if ( pBuffer != aBuf ) delete [] pBuffer; return aStr; } - rtl::OUString LocaleDataWrapper::getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals, const rtl::OUString& rCurrencySymbol, sal_Bool bUseThousandSep ) const { @@ -1753,7 +1752,7 @@ rtl::OUString LocaleDataWrapper::getCurr( sal_Int64 nNumber, sal_uInt16 nDecimal } } - String aNumber( pBuffer, (xub_StrLen)(sal_uLong)(pBuf-pBuffer) ); + rtl::OUString aNumber(pBuffer, pBuf-pBuffer); if ( pBuffer != aBuf ) delete [] pBuffer; |