diff options
-rw-r--r-- | sd/source/ui/dlg/copydlg.cxx | 12 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/cintitem.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/rngitem_inc.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/calendar.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/dlgunit.hxx | 3 | ||||
-rw-r--r-- | svx/source/stbctrls/pszctrl.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docnum.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/fields/cellfml.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 61 | ||||
-rw-r--r-- | tools/inc/tools/string.hxx | 1 | ||||
-rw-r--r-- | tools/source/string/tustring.cxx | 11 | ||||
-rw-r--r-- | ucb/workben/ucb/ucbdemo.cxx | 6 | ||||
-rw-r--r-- | unotools/source/ucbhelper/tempfile.cxx | 2 |
14 files changed, 57 insertions, 69 deletions
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index 63708e81777b..45ae8d003498 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -133,22 +133,22 @@ CopyDlg::~CopyDlg() { String& rStr = GetExtraData(); - rStr = UniString::CreateFromInt64( maNumFldCopies.GetValue() ); + rStr = rtl::OUString::valueOf(static_cast<sal_Int64>(maNumFldCopies.GetValue())); rStr.Append( TOKEN ); - rStr += UniString::CreateFromInt64( maMtrFldMoveX.GetValue() ); + rStr += rtl::OUString::valueOf(static_cast<sal_Int64>(maMtrFldMoveX.GetValue())); rStr.Append( TOKEN ); - rStr += UniString::CreateFromInt64( maMtrFldMoveY.GetValue() ); + rStr += rtl::OUString::valueOf(static_cast<sal_Int64>(maMtrFldMoveY.GetValue())); rStr.Append( TOKEN ); - rStr += UniString::CreateFromInt64( maMtrFldAngle.GetValue() ); + rStr += rtl::OUString::valueOf(static_cast<sal_Int64>(maMtrFldAngle.GetValue())); rStr.Append( TOKEN ); - rStr += UniString::CreateFromInt64( maMtrFldWidth.GetValue() ); + rStr += rtl::OUString::valueOf(static_cast<sal_Int64>(maMtrFldWidth.GetValue())); rStr.Append( TOKEN ); - rStr += UniString::CreateFromInt64( maMtrFldHeight.GetValue() ); + rStr += rtl::OUString::valueOf(static_cast<sal_Int64>(maMtrFldHeight.GetValue())); rStr.Append( TOKEN ); rStr += UniString::CreateFromInt32( (long)maLbStartColor.GetSelectEntryColor().GetColor() ); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 33feb52ed13f..acf8c5f44b5c 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1869,7 +1869,7 @@ IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG ) UpdateButtons(); // display Unicode position as symbol name while iterating over characters - const String aHex( String::CreateFromInt64( cChar, 16 ).ToUpperAscii() ); + const String aHex(rtl::OUString::valueOf(static_cast<sal_Int64>(cChar), 16 ).toAsciiUpperCase()); const String aPattern( A2OU( aHex.Len() > 4 ? "Ux000000" : "Ux0000" ) ); String aUnicodePos( aPattern.Copy( 0, aPattern.Len() - aHex.Len() ) ); aUnicodePos += aHex; diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx index 2ae7c4714557..4584d993dc2f 100644 --- a/svl/source/items/cintitem.cxx +++ b/svl/source/items/cintitem.cxx @@ -472,7 +472,7 @@ SfxItemPresentation CntUInt32Item::GetPresentation(SfxItemPresentation, const { DBG_CHKTHIS(CntUInt32Item, 0); - rText = XubString::CreateFromInt64(m_nValue); + rText = rtl::OUString::valueOf(static_cast<sal_Int64>(m_nValue)); return SFX_ITEM_PRESENTATION_NAMELESS; } diff --git a/svl/source/items/rngitem_inc.cxx b/svl/source/items/rngitem_inc.cxx index b1c21c3aa9f4..7c87cb71d85b 100644 --- a/svl/source/items/rngitem_inc.cxx +++ b/svl/source/items/rngitem_inc.cxx @@ -80,9 +80,9 @@ SfxItemPresentation SfxXRangeItem::GetPresentation const IntlWrapper * ) const { - rText = UniString::CreateFromInt64(nFrom); + rText = rtl::OUString::valueOf(static_cast<sal_Int64>(nFrom)); rText += ':'; - rText += UniString::CreateFromInt64(nTo); + rText += rtl::OUString::valueOf(static_cast<sal_Int64>(nTo)); return SFX_ITEM_PRESENTATION_NAMELESS; } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index f7919dc708af..2a06db143eaa 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -917,7 +917,7 @@ void Calendar::ImplDraw( sal_Bool bPaint ) String aMonthText( maCalendarWrapper.getDisplayName( i18n::CalendarDisplayIndex::MONTH, nMonth-1, 1)); aMonthText += ' '; - aMonthText += String::CreateFromInt64( nYear ); + aMonthText += rtl::OUString::valueOf(static_cast<sal_Int64>(nYear)); long nMonthTextWidth = GetTextWidth( aMonthText ); long nMonthOffX1 = 0; long nMonthOffX2 = 0; @@ -935,7 +935,7 @@ void Calendar::ImplDraw( sal_Bool bPaint ) aMonthText = maCalendarWrapper.getDisplayName( i18n::CalendarDisplayIndex::MONTH, nMonth-1, 0); aMonthText += ' '; - aMonthText += String::CreateFromInt64( nYear ); + aMonthText += rtl::OUString::valueOf(static_cast<sal_Int64>(nYear)); nMonthTextWidth = GetTextWidth( aMonthText ); } long nTempOff = (mnMonthWidth-nMonthTextWidth+1)/2; diff --git a/svx/source/dialog/dlgunit.hxx b/svx/source/dialog/dlgunit.hxx index 3fcb099a0613..b8ebed52fe92 100644 --- a/svx/source/dialog/dlgunit.hxx +++ b/svx/source/dialog/dlgunit.hxx @@ -30,7 +30,8 @@ inline String GetUnitString( long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep ) { - String aVal = UniString::CreateFromInt64( MetricField::ConvertValue( nVal_100, 2, MAP_100TH_MM, eFieldUnit ) ); + String aVal = rtl::OUString::valueOf(static_cast<sal_Int64>( + MetricField::ConvertValue(nVal_100, 2, MAP_100TH_MM, eFieldUnit))); while( aVal.Len() < 3 ) aVal.Insert( sal_Unicode('0'), 0 ); diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 9c8a3e3bb5b9..1356572b58b2 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -84,7 +84,7 @@ String SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal ) if ( nConvVal < 0 && ( nConvVal / 100 == 0 ) ) sMetric += '-'; - sMetric += String::CreateFromInt64( nConvVal / 100 ); + sMetric += rtl::OUString::valueOf(nConvVal / 100); if( FUNIT_NONE != eOutUnit ) { @@ -95,7 +95,7 @@ String SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal ) nFract *= -1; if ( nFract < 10 ) sMetric += '0'; - sMetric += String::CreateFromInt64( nFract ); + sMetric += rtl::OUString::valueOf(nFract); } return sMetric; diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index baa798d013a3..50aecc016d5c 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -2609,7 +2609,7 @@ namespace listfunc n += Date( Date::SYSTEM ).GetDate(); n += rand(); // #i92478# - aNewListId += String::CreateFromInt64( n ); + aNewListId += rtl::OUString::valueOf(n); return MakeListIdUnique( rDoc, aNewListId ); } diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 99e48df5a0a1..a3bc8f6c2194 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -423,7 +423,7 @@ void SwTableFormula::RelBoxNmsToPtr( const SwTable& rTbl, String& rNewStr, if( pLastBox ) { if( 0 != ( pRelBox = lcl_RelToBox( rTbl, pBox, *pLastBox )) ) - rNewStr += String::CreateFromInt64( (sal_PtrDiff)pRelBox ); + rNewStr += rtl::OUString::valueOf(static_cast<sal_Int64>((sal_PtrDiff)pRelBox)); else rNewStr += '0'; rNewStr += ':'; @@ -431,7 +431,7 @@ void SwTableFormula::RelBoxNmsToPtr( const SwTable& rTbl, String& rNewStr, } if( 0 != ( pRelBox = lcl_RelToBox( rTbl, pBox, rFirstBox )) ) - rNewStr += String::CreateFromInt64( (sal_PtrDiff)pRelBox ); + rNewStr += rtl::OUString::valueOf(static_cast<sal_Int64>((sal_PtrDiff)pRelBox)); else rNewStr += '0'; @@ -518,13 +518,13 @@ void SwTableFormula::BoxNmsToPtr( const SwTable& rTbl, String& rNewStr, if( pLastBox ) { pBox = rTbl.GetTblBox( *pLastBox ); - rNewStr += String::CreateFromInt64( (sal_PtrDiff)pBox ); + rNewStr += rtl::OUString::valueOf(static_cast<sal_Int64>((sal_PtrDiff)pBox)); rNewStr += ':'; rFirstBox.Erase( 0, pLastBox->Len()+1 ); } pBox = rTbl.GetTblBox( rFirstBox ); - rNewStr += String::CreateFromInt64( (sal_PtrDiff)pBox ); + rNewStr += rtl::OUString::valueOf(static_cast<sal_Int64>((sal_PtrDiff)pBox)); // Kennung fuer Box erhalten rNewStr += rFirstBox.GetChar( rFirstBox.Len() - 1 ); @@ -1194,8 +1194,8 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr, } if( pLastBox ) - ( rNewStr += String::CreateFromInt64((sal_PtrDiff)pEndBox)) += ':'; - ( rNewStr += String::CreateFromInt64((sal_PtrDiff)pSttBox)) + ( rNewStr += rtl::OUString::valueOf(static_cast<sal_Int64>((sal_PtrDiff)pEndBox)) ) += ':'; + ( rNewStr += rtl::OUString::valueOf(static_cast<sal_Int64>((sal_PtrDiff)pSttBox)) ) += rFirstBox.GetChar( rFirstBox.Len() - 1 ); } diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index cfff8720bb24..2f6ee4d47e64 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1175,39 +1175,38 @@ void SwRTFParser::ReadShpRslt() void SwRTFParser::ReadShpTxt(String& s) { - int nToken; - int level=1; - s.AppendAscii("{\\rtf"); - while (level>0 && IsParserWorking()) - { - nToken = GetNextToken(); - switch(nToken) + int nToken; + int level=1; + s.AppendAscii("{\\rtf"); + while (level>0 && IsParserWorking()) { - case RTF_SN: - case RTF_SV: - SkipGroup(); - break; - case RTF_TEXTTOKEN: - s.Append(aToken); - break; - case '{': - level++; - s.Append(String::CreateFromAscii("{")); - break; - case '}': - level--; - s.Append(String::CreateFromAscii("}")); - break; - default: - s.Append(aToken); - if (bTokenHasValue) { - s.Append(String::CreateFromInt64(nTokenValue)); - } - s.Append(String::CreateFromAscii(" ")); - break; - } + nToken = GetNextToken(); + switch(nToken) + { + case RTF_SN: + case RTF_SV: + SkipGroup(); + break; + case RTF_TEXTTOKEN: + s.Append(aToken); + break; + case '{': + level++; + s.Append(String::CreateFromAscii("{")); + break; + case '}': + level--; + s.Append(String::CreateFromAscii("}")); + break; + default: + s.Append(aToken); + if (bTokenHasValue) + s.Append(rtl::OUString::valueOf(static_cast<sal_Int64>(nTokenValue))); + s.Append(String::CreateFromAscii(" ")); + break; + } } - SkipToken(-1); + SkipToken(-1); } /* diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index a4b3e46d2944..1cd1c9a35583 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -184,7 +184,6 @@ public: static UniString CreateFromAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ); static UniString CreateFromInt32( sal_Int32 n, sal_Int16 nRadix = 10 ); - static UniString CreateFromInt64( sal_Int64 n, sal_Int16 nRadix = 10 ); static const UniString& EmptyString(); sal_Int32 ToInt32() const; sal_Int64 ToInt64() const; diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index 4bb515e30ad8..53f5473eb29a 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -79,17 +79,6 @@ UniString UniString::CreateFromInt32( sal_Int32 n, sal_Int16 nRadix ) // ----------------------------------------------------------------------- -UniString UniString::CreateFromInt64( sal_Int64 n, sal_Int16 nRadix ) -{ - sal_Unicode aBuf[RTL_USTR_MAX_VALUEOFINT64]; - BOOST_STATIC_ASSERT(RTL_USTR_MAX_VALUEOFINT64 <= STRING_MAXLEN); - return UniString( - aBuf, - static_cast< xub_StrLen >(rtl_ustr_valueOfInt64( aBuf, n, nRadix )) ); -} - -// ----------------------------------------------------------------------- - namespace { struct Empty : public rtl::Static< const UniString, Empty> {}; } const UniString& UniString::EmptyString() { diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index 0a61f75fabda..4e71592958a6 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.cxx @@ -1197,7 +1197,7 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, UniString aText( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Operation took " ) ) ); - aText += UniString::CreateFromInt64( nTime ); + aText += rtl::OUString::valueOf(static_cast<sal_Int64>(nTime)); aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ms." ) ); print( aText ); } @@ -1225,7 +1225,7 @@ void UcbContent::openAll( Ucb& rUCB, bool bPrint, bool bTiming, bool bSort, for ( sal_uInt32 i = aEntry.m_nLevel; i != 0; --i ) aText += '='; aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "LEVEL " ) ); - aText += UniString::CreateFromInt64( aEntry.m_nLevel ); + aText += rtl::OUString::valueOf(static_cast<sal_Int64>(aEntry.m_nLevel)); uno::Reference< ucb::XContentIdentifier > xID; if ( aEntry.m_bUseIdentifier ) @@ -1279,7 +1279,7 @@ void UcbContent::openAll( Ucb& rUCB, bool bPrint, bool bTiming, bool bSort, UniString aText( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Operation took " ) ) ); - aText += UniString::CreateFromInt64( nTime ); + aText += rtl::OUString::valueOf(static_cast<sal_Int64>(nTime)); aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ms." ) ); print( aText ); } diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 449355687825..cf16a4b74186 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -209,7 +209,7 @@ void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_Tru { u %= nMax; String aTmp( aName ); - aTmp += String::CreateFromInt64( static_cast<sal_Int64>(u), nRadix ); + aTmp += rtl::OUString::valueOf(static_cast<sal_Int64>(u), nRadix); aTmp += String::CreateFromAscii( ".tmp" ); if ( bDir ) |