diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-20 00:05:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-20 11:55:05 +0100 |
commit | c4a477614cad811286f3821ecb35412683b4dff8 (patch) | |
tree | afb369a22a6890ddc979f17938d9e2a4ae651d86 /svtools | |
parent | 1489254311e75a379a129bceeab49643ebea04e0 (diff) |
String::CreateFromInt32->rtl::OUString::valueOf
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/calendar.cxx | 8 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 3 | ||||
-rw-r--r-- | svtools/source/control/valueacc.cxx | 9 |
3 files changed, 10 insertions, 10 deletions
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 9732c7647011..b1f92aa3e9bb 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -232,8 +232,8 @@ void Calendar::ImplInit( WinBits nWinStyle ) maWeekText = XubString( SvtResId( STR_SVT_CALENDAR_WEEK ) ); // Tagestexte anlegen - for ( sal_uInt16 i = 0; i < 31; i++ ) - mpDayText[i] = new UniString( UniString::CreateFromInt32( i+1 ) ); + for (sal_Int32 i = 0; i < 31; ++i) + mpDayText[i] = new UniString(rtl::OUString::valueOf(i+1)); maDragScrollTimer.SetTimeoutHdl( STATIC_LINK( this, Calendar, ScrollHdl ) ); maDragScrollTimer.SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() ); @@ -979,8 +979,8 @@ void Calendar::ImplDraw( sal_Bool bPaint ) maCalendarWrapper.setGregorianDateTime( aDate); for ( sal_uInt16 nWeekCount = 0; nWeekCount < 6; nWeekCount++ ) { - sal_Int16 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR); - String aWeekText( String::CreateFromInt32( nWeek)); + sal_Int32 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR); + rtl::OUString aWeekText(rtl::OUString::valueOf(nWeek)); long nOffX = (mnWeekWidth-WEEKNUMBER_OFFX)-GetTextWidth( aWeekText ); long nOffY = (mnDayHeight-GetTextHeight())/2; DrawText( Point( nDayX+nOffX, nDayY+nOffY ), aWeekText ); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 3222452380cf..6f1065a0f093 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -510,7 +510,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) nMaxWidth /= nTickUnit; else nMaxWidth /= aImplRulerUnitTab[mnUnitIndex].nTickUnit; - UniString aNumStr( UniString::CreateFromInt32( nMaxWidth ) ); + UniString aNumStr(rtl::OUString::valueOf(static_cast<sal_Int32>(nMaxWidth))); long nTxtWidth = GetTextWidth( aNumStr ); const long nTextOff = 4; if ( nTickWidth < nTxtWidth+nTextOff ) @@ -593,7 +593,6 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) // Tick3 - Output (Text) if ( !(nTick % nTick3) ) { - //aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit ); if ( ( mnUnitIndex == RULER_UNIT_CHAR ) || ( mnUnitIndex == RULER_UNIT_LINE ) ) aNumStr = UniString::CreateFromInt32( nTick / nTickUnit ); else diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 37c48c2ed4b6..e6d63fa3933d 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -951,16 +951,17 @@ sal_Int16 SAL_CALL ValueItemAcc::getAccessibleRole() throw (uno::RuntimeException) { const SolarMutexGuard aSolarGuard; - String aRet; + rtl::OUString aRet; if( mpParent ) { aRet = mpParent->maText; - if( !aRet.Len() ) + if( aRet.isEmpty() ) { - aRet = String( RTL_CONSTASCII_USTRINGPARAM( "Item " ) ); - aRet += String::CreateFromInt32( mpParent->mnId ); + rtl::OUStringBuffer aBuffer("Item "); + aBuffer.append(static_cast<sal_Int32>(mpParent->mnId)); + aRet = aBuffer.makeStringAndClear(); } } |