UniString::CreateFromInt32 -> rtl::OUString::valueOf
This commit is contained in:
parent
dd20a8c6e2
commit
5688b51bcb
@ -133,17 +133,17 @@ namespace accessibility
|
||||
SolarMethodGuard aGuard( *this );
|
||||
|
||||
// TODO: localize this!
|
||||
String sName = mpBrowseBox->GetColumnDescription( ::sal::static_int_cast< sal_uInt16 >( getColumnPos() ) );
|
||||
if ( 0 == sName.Len() )
|
||||
rtl::OUStringBuffer sName(mpBrowseBox->GetColumnDescription( ::sal::static_int_cast< sal_uInt16 >( getColumnPos() ) ));
|
||||
if ( 0 == sName.getLength() )
|
||||
{
|
||||
sName = String::CreateFromAscii( "Column " );
|
||||
sName += String::CreateFromInt32( getColumnPos( ) );
|
||||
sName.appendAscii(RTL_CONSTASCII_STRINGPARAM("Column "));
|
||||
sName.append(getColumnPos());
|
||||
}
|
||||
|
||||
sName += String::CreateFromAscii( ", Row " );
|
||||
sName += String::CreateFromInt32( getRowPos( ) );
|
||||
sName.appendAscii(RTL_CONSTASCII_STRINGPARAM(", Row "));
|
||||
sName.append(getRowPos());
|
||||
|
||||
return ::rtl::OUString( sName );
|
||||
return sName.makeStringAndClear();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -257,13 +257,13 @@ namespace cairocanvas
|
||||
|
||||
void DeviceHelper::dumpScreenContent() const
|
||||
{
|
||||
static sal_uInt32 nFilePostfixCount(0);
|
||||
static sal_Int32 nFilePostfixCount(0);
|
||||
|
||||
if( mpRefDevice )
|
||||
{
|
||||
String aFilename( String::CreateFromAscii("dbg_frontbuffer") );
|
||||
aFilename += String::CreateFromInt32(nFilePostfixCount);
|
||||
aFilename += String::CreateFromAscii(".bmp");
|
||||
rtl::OUString aFilename("dbg_frontbuffer");
|
||||
aFilename += rtl::OUString::valueOf(nFilePostfixCount);
|
||||
aFilename += rtl::OUString(".bmp");
|
||||
|
||||
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
|
||||
|
||||
|
@ -216,13 +216,13 @@ namespace vclcanvas
|
||||
|
||||
void DeviceHelper::dumpScreenContent() const
|
||||
{
|
||||
static sal_uInt32 nFilePostfixCount(0);
|
||||
static sal_Int32 nFilePostfixCount(0);
|
||||
|
||||
if( mpOutDev )
|
||||
{
|
||||
String aFilename( String::CreateFromAscii("dbg_frontbuffer") );
|
||||
aFilename += String::CreateFromInt32(nFilePostfixCount);
|
||||
aFilename += String::CreateFromAscii(".bmp");
|
||||
rtl::OUString aFilename("dbg_frontbuffer");
|
||||
aFilename += rtl::OUString::valueOf(nFilePostfixCount);
|
||||
aFilename += rtl::OUString(".bmp");
|
||||
|
||||
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
|
||||
|
||||
|
@ -135,13 +135,13 @@ namespace vclcanvas
|
||||
{
|
||||
DeviceHelper::dumpScreenContent();
|
||||
|
||||
static sal_uInt32 nFilePostfixCount(0);
|
||||
static sal_Int32 nFilePostfixCount(0);
|
||||
|
||||
if( mpBackBuffer )
|
||||
{
|
||||
String aFilename( String::CreateFromAscii("dbg_backbuffer") );
|
||||
aFilename += String::CreateFromInt32(nFilePostfixCount);
|
||||
aFilename += String::CreateFromAscii(".bmp");
|
||||
rtl::OUString aFilename("dbg_backbuffer");
|
||||
aFilename += rtl::OUString::valueOf(nFilePostfixCount);
|
||||
aFilename += rtl::OUString(".bmp");
|
||||
|
||||
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
|
||||
|
||||
|
@ -658,7 +658,7 @@ String DataBrowser::GetColString( sal_Int32 nColumnId ) const
|
||||
|
||||
String DataBrowser::GetRowString( sal_Int32 nRow ) const
|
||||
{
|
||||
return String::CreateFromInt32( nRow + 1 );
|
||||
return rtl::OUString::valueOf(nRow + 1);
|
||||
}
|
||||
|
||||
String DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
|
||||
|
@ -160,15 +160,15 @@ namespace
|
||||
{
|
||||
rtl::OUString lcl_makeColorName( Color rColor )
|
||||
{
|
||||
String aStr(SVX_RES(RID_SVXFLOAT3D_FIX_R));
|
||||
aStr += String::CreateFromInt32((sal_Int32)rColor.GetRed());
|
||||
aStr += sal_Unicode(' ');
|
||||
aStr += String(SVX_RES(RID_SVXFLOAT3D_FIX_G));
|
||||
aStr += String::CreateFromInt32((sal_Int32)rColor.GetGreen());
|
||||
aStr += sal_Unicode(' ');
|
||||
aStr += String(SVX_RES(RID_SVXFLOAT3D_FIX_B));
|
||||
aStr += String::CreateFromInt32((sal_Int32)rColor.GetBlue());
|
||||
return aStr;
|
||||
rtl::OUStringBuffer aStr(SVX_RESSTR(RID_SVXFLOAT3D_FIX_R));
|
||||
aStr.append((sal_Int32)rColor.GetRed());
|
||||
aStr.append(' ');
|
||||
aStr.append(SVX_RESSTR(RID_SVXFLOAT3D_FIX_G));
|
||||
aStr.append((sal_Int32)rColor.GetGreen());
|
||||
aStr.append(' ');
|
||||
aStr.append(SVX_RESSTR(RID_SVXFLOAT3D_FIX_B));
|
||||
aStr.append((sal_Int32)rColor.GetBlue());
|
||||
return aStr.makeStringAndClear();
|
||||
}
|
||||
void lcl_selectColor( ColorListBox& rListBox, const Color& rColor )
|
||||
{
|
||||
|
@ -491,7 +491,7 @@ void DataSourceTabPage::fillSeriesListBox()
|
||||
if( nIndex != -1 )
|
||||
aLabel = String( aResString.replaceAt(
|
||||
nIndex, aReplacementStr.getLength(),
|
||||
String::CreateFromInt32( nUnnamedSeriesIndex )));
|
||||
rtl::OUString::valueOf(nUnnamedSeriesIndex)));
|
||||
}
|
||||
if( aLabel.Len() == 0 )
|
||||
aLabel = String( ::chart::SchResId( STR_DATA_UNNAMED_SERIES ));
|
||||
|
@ -83,8 +83,8 @@ DragMethod_PieSegment::~DragMethod_PieSegment()
|
||||
}
|
||||
void DragMethod_PieSegment::TakeSdrDragComment(String& rStr) const
|
||||
{
|
||||
rStr = String( SchResId( STR_STATUS_PIE_SEGMENT_EXPLODED ) );
|
||||
rStr.SearchAndReplaceAscii( "%PERCENTVALUE", String::CreateFromInt32( static_cast<sal_Int32>((m_fAdditionalOffset+m_fInitialOffset)*100.0) ));
|
||||
rStr = ResId::toString(SchResId(STR_STATUS_PIE_SEGMENT_EXPLODED));
|
||||
rStr.SearchAndReplaceAscii( "%PERCENTVALUE", rtl::OUString::valueOf( static_cast<sal_Int32>((m_fAdditionalOffset+m_fInitialOffset)*100.0) ));
|
||||
}
|
||||
bool DragMethod_PieSegment::BeginSdrDrag()
|
||||
{
|
||||
|
@ -510,8 +510,8 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
|
||||
uno::Sequence<rtl::OUString> aListSource(TYPE_COUNT);
|
||||
rtl::OUString* pListSourceArr = aListSource.getArray();
|
||||
//pListSourceArr[0] = C2U("select TypeName, TypeIndex from TypeNms");
|
||||
for(sal_uInt16 i = 0; i < TYPE_COUNT; i++)
|
||||
pListSourceArr[i] = String::CreateFromInt32(i);
|
||||
for(sal_Int32 i = 0; i < TYPE_COUNT; ++i)
|
||||
pListSourceArr[i] = rtl::OUString::valueOf(i);
|
||||
aAny.setValue(&aListSource, ::getCppuType((uno::Sequence<rtl::OUString>*)0));
|
||||
|
||||
xPropSet->setPropertyValue(C2U("ListSource"), aAny);
|
||||
|
@ -273,7 +273,7 @@ namespace dbp
|
||||
for (::svt::WizardTypes::WizardState i=0; i<m_aExistingRadios.GetEntryCount(); ++i)
|
||||
{
|
||||
rSettings.aLabels.push_back(m_aExistingRadios.GetEntry(i));
|
||||
rSettings.aValues.push_back(String::CreateFromInt32((sal_Int32)(i + 1)));
|
||||
rSettings.aValues.push_back(rtl::OUString::valueOf((sal_Int32)(i + 1)));
|
||||
}
|
||||
|
||||
return sal_True;
|
||||
|
@ -76,7 +76,7 @@ namespace pcr
|
||||
sal_Int32 nPostfixNumber = 1;
|
||||
do
|
||||
{
|
||||
( sInitialName = sNameBase ) += String::CreateFromInt32( nPostfixNumber++ );
|
||||
( sInitialName = sNameBase ) += rtl::OUString::valueOf(nPostfixNumber++);
|
||||
}
|
||||
while ( m_aProhibitedNames.find( sInitialName ) != m_aProhibitedNames.end() );
|
||||
|
||||
|
@ -486,7 +486,7 @@ namespace frm
|
||||
}
|
||||
else if ( _nFeatureId == FormFeature::MoveAbsolute )
|
||||
{
|
||||
pNavBar->setFeatureText( _nFeatureId, String::CreateFromInt32( getIntegerState( _nFeatureId ) ) );
|
||||
pNavBar->setFeatureText( _nFeatureId, rtl::OUString::valueOf(getIntegerState(_nFeatureId)) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -755,7 +755,7 @@ const Reference< XIndexContainer >&
|
||||
while( xNameCont->hasByName( sName ) )
|
||||
{
|
||||
sName = sStdName;
|
||||
sName += String::CreateFromInt32( ++n );
|
||||
sName += rtl::OUString::valueOf(static_cast<sal_Int32>(++n));
|
||||
}
|
||||
|
||||
const Reference< XMultiServiceFactory > &rServiceFactory
|
||||
|
@ -1074,7 +1074,7 @@ String AddPrinterDialog::uniquePrinterName( const String& rBase )
|
||||
|
||||
PrinterInfoManager& rManager( PrinterInfoManager::get() );
|
||||
|
||||
int nVersion = 1;
|
||||
sal_Int32 nVersion = 1;
|
||||
list< OUString > aPrinterList;
|
||||
rManager.listPrinters( aPrinterList );
|
||||
boost::unordered_set< OUString, OUStringHash > aPrinters;
|
||||
@ -1084,7 +1084,7 @@ String AddPrinterDialog::uniquePrinterName( const String& rBase )
|
||||
{
|
||||
aResult = rBase;
|
||||
aResult.AppendAscii( "_" );
|
||||
aResult += String::CreateFromInt32( nVersion++ );
|
||||
aResult += rtl::OUString::valueOf(nVersion++);
|
||||
}
|
||||
|
||||
return aResult;
|
||||
|
@ -395,27 +395,21 @@ const String SmFontFormatList::GetFontFormatId( size_t nPos ) const
|
||||
}
|
||||
|
||||
|
||||
const String SmFontFormatList::GetNewFontFormatId() const
|
||||
const rtl::OUString SmFontFormatList::GetNewFontFormatId() const
|
||||
{
|
||||
// returns first unused FormatId
|
||||
|
||||
String aRes;
|
||||
|
||||
String aPrefix( RTL_CONSTASCII_USTRINGPARAM( "Id" ) );
|
||||
rtl::OUString aPrefix("Id");
|
||||
sal_Int32 nCnt = GetCount();
|
||||
for (sal_Int32 i = 1; i <= nCnt + 1; ++i)
|
||||
{
|
||||
String aTmpId( aPrefix );
|
||||
aTmpId += String::CreateFromInt32( i );
|
||||
if (!GetFontFormat( aTmpId ))
|
||||
{
|
||||
aRes = aTmpId;
|
||||
break;
|
||||
}
|
||||
rtl::OUString aTmpId = aPrefix + rtl::OUString::valueOf(i);
|
||||
if (!GetFontFormat(aTmpId))
|
||||
return aTmpId;
|
||||
}
|
||||
OSL_ENSURE( 0 != aRes.Len(), "failed to create new FontFormatId" );
|
||||
OSL_ENSURE( !this, "failed to create new FontFormatId" );
|
||||
|
||||
return aRes;
|
||||
return rtl::OUString();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
const String GetFontFormatId( const SmFontFormat &rFntFmt ) const;
|
||||
const String GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd );
|
||||
const String GetFontFormatId( size_t nPos ) const;
|
||||
const String GetNewFontFormatId() const;
|
||||
const rtl::OUString GetNewFontFormatId() const;
|
||||
size_t GetCount() const { return aEntries.size(); }
|
||||
|
||||
bool IsModified() const { return bModified; }
|
||||
|
@ -649,12 +649,12 @@ private:
|
||||
sal_uInt16 nMinDigits = 0 ) const;
|
||||
|
||||
String ImpIntToString( sal_uInt16 nIx, sal_Int32 nVal, sal_uInt16 nMinDigits = 0 ) const
|
||||
{
|
||||
const SvNumberNatNum& rNum = NumFor[nIx].GetNatNum();
|
||||
if ( nMinDigits || rNum.IsComplete() )
|
||||
return ImpGetNatNumString( rNum, nVal, nMinDigits );
|
||||
return String::CreateFromInt32( nVal );
|
||||
}
|
||||
{
|
||||
const SvNumberNatNum& rNum = NumFor[nIx].GetNatNum();
|
||||
if ( nMinDigits || rNum.IsComplete() )
|
||||
return ImpGetNatNumString( rNum, nVal, nMinDigits );
|
||||
return rtl::OUString::valueOf(nVal);
|
||||
}
|
||||
|
||||
// transliterate according to NativeNumber
|
||||
SVL_DLLPRIVATE void ImpTransliterateImpl( String& rStr, const SvNumberNatNum& rNum ) const;
|
||||
|
@ -738,12 +738,12 @@ void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt )
|
||||
sal_uLong nPos = GetThumbPos();
|
||||
if ( nPos != _nLastPos )
|
||||
{
|
||||
String aTip( String::CreateFromInt32(nPos) );
|
||||
String aTip( rtl::OUString::valueOf(static_cast<sal_Int32>(nPos)) );
|
||||
aTip += '/';
|
||||
if ( _pDataWin->GetRealRowCount().Len() )
|
||||
aTip += _pDataWin->GetRealRowCount();
|
||||
else
|
||||
aTip += String::CreateFromInt32(GetRangeMax());
|
||||
aTip += rtl::OUString::valueOf(static_cast<sal_Int32>(GetRangeMax()));
|
||||
|
||||
Rectangle aRect( GetPointerPosPixel(), Size( GetTextHeight(), GetTextWidth( aTip ) ) );
|
||||
if ( _nTip )
|
||||
|
@ -308,7 +308,7 @@ void ShowFont::Paint( const Rectangle& )
|
||||
|
||||
if ( rFont.GetOrientation() )
|
||||
{
|
||||
aText.Append( String::CreateFromInt32( rFont.GetOrientation()/10 ) );
|
||||
aText.Append( rtl::OUString::valueOf(static_cast<sal_Int32>(rFont.GetOrientation()/10)) );
|
||||
aText.AppendAscii( " degree." );
|
||||
|
||||
x = aWindowSize.Width()/2;
|
||||
|
@ -367,8 +367,7 @@ getRand(int modulus)
|
||||
static rtl::OUString
|
||||
getRandString()
|
||||
{
|
||||
static rtl::OUString aText(RTL_CONSTASCII_USTRINGPARAM(
|
||||
"AAAAA BBBB CCC DD E \n"));
|
||||
rtl::OUString aText("AAAAA BBBB CCC DD E \n");
|
||||
int s = getRand(aText.getLength());
|
||||
int j = getRand(aText.getLength() - s);
|
||||
rtl::OUString aRet(aText.copy(s, j));
|
||||
|
@ -692,9 +692,9 @@ sal_Int16 VCLXAccessibleComponent::getAccessibleRole( ) throw (uno::RuntimeExce
|
||||
{
|
||||
aName = GetWindow()->GetAccessibleName();
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
aName += String( RTL_CONSTASCII_USTRINGPARAM( " (Type = " ) );
|
||||
aName += String::CreateFromInt32( GetWindow()->GetType() );
|
||||
aName += String( RTL_CONSTASCII_USTRINGPARAM( ")" ) );
|
||||
aName += rtl::OUString(" (Type = ");
|
||||
aName += rtl::OUString::valueOf(static_cast<sal_Int32>(GetWindow()->GetType()));
|
||||
aName += rtl::OUString( ")");
|
||||
#endif
|
||||
}
|
||||
return aName;
|
||||
|
@ -720,9 +720,7 @@ void SvtSecurityOptions_Impl::Commit()
|
||||
Sequence< Sequence< com::sun::star::beans::PropertyValue > > lPropertyValuesSeq( nCnt );
|
||||
for( sal_Int32 i = 0 ; i < nCnt ; ++i )
|
||||
{
|
||||
String aPrefix( s );
|
||||
aPrefix += String::CreateFromInt32( i );
|
||||
aPrefix.AppendAscii( "/" );
|
||||
rtl::OUString aPrefix = rtl::OUStringBuffer(s).append(i).append('/').makeStringAndClear();
|
||||
Sequence< com::sun::star::beans::PropertyValue > lPropertyValues( 3 );
|
||||
lPropertyValues[ 0 ].Name = aPrefix + PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME;
|
||||
lPropertyValues[ 0 ].Value <<= m_seqTrustedAuthors[ i ][0];
|
||||
|
@ -342,19 +342,20 @@ void LocaleDataWrapper::invalidateData()
|
||||
// && !aDebugLocale.EqualsAscii( "es_BR" ) // ?!? Brazil/es
|
||||
)
|
||||
{
|
||||
String aMsg( RTL_CONSTASCII_USTRINGPARAM(
|
||||
rtl::OUStringBuffer aMsg;
|
||||
aMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM(
|
||||
"ConvertIsoNamesToLanguage/ConvertLanguageToIsoNames: ambiguous locale (MS-LCID?)\n"));
|
||||
aMsg += aDebugLocale;
|
||||
aMsg.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " -> 0x" ) );
|
||||
aMsg += String::CreateFromInt32( eLang, 16 );
|
||||
aMsg.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " -> " ) );
|
||||
aMsg += String( aLanguage);
|
||||
aMsg.append(aDebugLocale);
|
||||
aMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM( " -> 0x"));
|
||||
aMsg.append(static_cast<sal_Int32>(eLang), 16);
|
||||
aMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM( " -> "));
|
||||
aMsg.append(aLanguage);
|
||||
if ( !aCountry.isEmpty() )
|
||||
{
|
||||
aMsg += '_';
|
||||
aMsg += String( aCountry);
|
||||
aMsg.append('_');
|
||||
aMsg.append(aCountry);
|
||||
}
|
||||
outputCheckMessage( aMsg );
|
||||
outputCheckMessage( aMsg.makeStringAndClear() );
|
||||
}
|
||||
eLang = LANGUAGE_DONTKNOW;
|
||||
}
|
||||
|
@ -632,7 +632,7 @@ UUIInteractionHelper::handleRequest_impl(
|
||||
sal_Int32 nMedium = 0;
|
||||
aWrongMediumException.Medium >>= nMedium;
|
||||
std::vector< rtl::OUString > aArguments;
|
||||
aArguments.push_back(UniString::CreateFromInt32(nMedium + 1));
|
||||
aArguments.push_back(rtl::OUString::valueOf(nMedium + 1));
|
||||
handleErrorHandlerRequest(aWrongMediumException.Classification,
|
||||
ERRCODE_UUI_WRONGMEDIUM,
|
||||
aArguments,
|
||||
|
@ -1380,7 +1380,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
|
||||
{
|
||||
aFormatCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( "][$-" ) );
|
||||
// language code in upper hex:
|
||||
aFormatCode.append( String::CreateFromInt32( sal_Int32( eLang ), 16 ).ToUpperAscii() );
|
||||
aFormatCode.append(rtl::OUString::valueOf(sal_Int32(eLang), 16).toAsciiUpperCase());
|
||||
}
|
||||
aFormatCode.append( sal_Unicode(']') );
|
||||
}
|
||||
@ -1905,7 +1905,7 @@ void SvXMLNumFormatContext::AddCurrency( const rtl::OUString& rContent, Language
|
||||
{
|
||||
// '-' sign and language code in hex:
|
||||
aFormatCode.append( (sal_Unicode) '-' );
|
||||
aFormatCode.append( String::CreateFromInt32( sal_Int32( nLang ), 16 ).ToUpperAscii() );
|
||||
aFormatCode.append(rtl::OUString::valueOf(sal_Int32(nLang), 16).toAsciiUpperCase());
|
||||
}
|
||||
|
||||
aFormatCode.append( (sal_Unicode) ']' ); // end of "new" currency symbol
|
||||
|
Loading…
x
Reference in New Issue
Block a user