diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-30 22:53:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-01 09:08:07 +0100 |
commit | 1e56be5daadf666870974a734b968e13d5938ccb (patch) | |
tree | e3b7cae0d16073501150981d112a2314bf367df0 /idl/source/objects | |
parent | dde72ab2a22fc23b8524a3eeb88f17b9426d1713 (diff) |
ByteString::CreateFromInt32 -> OString::valueOf
Diffstat (limited to 'idl/source/objects')
-rw-r--r-- | idl/source/objects/basobj.cxx | 7 | ||||
-rw-r--r-- | idl/source/objects/bastype.cxx | 6 | ||||
-rw-r--r-- | idl/source/objects/object.cxx | 19 | ||||
-rw-r--r-- | idl/source/objects/slot.cxx | 52 | ||||
-rw-r--r-- | idl/source/objects/types.cxx | 9 |
5 files changed, 62 insertions, 31 deletions
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index 177ace6d4749..97822791533e 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -587,8 +587,11 @@ void SvMetaExtern::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, WriteTab( rOutStm, nTab ); rOutStm << "uuid(" << ByteString( GetUUId().GetHexName(), RTL_TEXTENCODING_UTF8 ).GetBuffer() << ")," << endl; WriteTab( rOutStm, nTab ); - rOutStm << "version(" << ByteString::CreateFromInt32( aVersion.GetMajorVersion() ).GetBuffer() << '.' - << ByteString::CreateFromInt32( aVersion.GetMinorVersion() ).GetBuffer() << ")," << endl; + rOutStm << "version(" + << rtl::OString::valueOf(static_cast<sal_Int32>(aVersion.GetMajorVersion())).getStr() + << '.' + << rtl::OString::valueOf(static_cast<sal_Int32>(aVersion.GetMinorVersion())).getStr() + << ")," << endl; } #endif // IDL_COMPILER diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index 5556da3ad4b5..01faea8c6d3f 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -432,8 +432,10 @@ sal_Bool SvVersion::ReadSvIdl( SvTokenStream & rInStm ) sal_Bool SvVersion::WriteSvIdl( SvStream & rOutStm ) { rOutStm << SvHash_Version()->GetName().GetBuffer() << '(' - << ByteString::CreateFromInt32( nMajorVersion ).GetBuffer() << '.' - << ByteString::CreateFromInt32( nMinorVersion ).GetBuffer() << ')'; + << rtl::OString::valueOf(static_cast<sal_Int32>(nMajorVersion)).getStr() + << '.' + << rtl::OString::valueOf(static_cast<sal_Int32>(nMinorVersion)).getStr() + << ')'; return sal_True; } #endif //IDL_COMPILER diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index 7344eba7fd64..8308d50625ec 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -356,7 +356,8 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS if( nId1 == nId2 && nId1 != 0 ) { OSL_FAIL( "Gleiche Id in MetaClass : " ); - OSL_FAIL( ByteString::CreateFromInt32( pS->GetSlotId().GetValue() ).GetBuffer() ); + OSL_FAIL(rtl::OString::valueOf(static_cast<sal_Int32>( + pS->GetSlotId().GetValue())).getStr()); OSL_FAIL( pS->GetSlotId().GetBuffer() ); OSL_FAIL( rAttr.GetSlotId().GetBuffer() ); @@ -719,8 +720,12 @@ void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) << '{' << endl << "\tSvGlobalName aN( " << ByteString( pMod->GetUUId().GetctorName(), RTL_TEXTENCODING_UTF8 ).GetBuffer() << " );" << endl; rOutStm << "\t*pGN = aN;" << endl - << "\t*pMajor = " << ByteString::CreateFromInt32(pMod->GetVersion().GetMajorVersion()).GetBuffer() << ';' << endl - << "\t*pMinor = " << ByteString::CreateFromInt32(pMod->GetVersion().GetMinorVersion()).GetBuffer() << ';' << endl + << "\t*pMajor = " + << rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMajorVersion())).getStr() + << ';' << endl + << "\t*pMinor = " + << rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMinorVersion())).getStr() + << ';' << endl << "\treturn sal_True;" << endl << '}' << endl; @@ -730,8 +735,12 @@ void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) << "\t sal_uInt16 * pMinor ) const" << endl; rOutStm << '{' << endl << "\t*pName = \"" << pMod->GetTypeLibFileName().GetBuffer() << "\";" << endl - << "\t*pMajor = " << ByteString::CreateFromInt32(pMod->GetVersion().GetMajorVersion()).GetBuffer() << ';' << endl - << "\t*pMinor = " << ByteString::CreateFromInt32(pMod->GetVersion().GetMinorVersion()).GetBuffer() << ';' << endl + << "\t*pMajor = " + << rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMajorVersion())).getStr() + << ';' << endl + << "\t*pMinor = " + << rtl::OString::valueOf(static_cast<sal_Int32>(pMod->GetVersion().GetMinorVersion())).getStr() + << ';' << endl << "\treturn sal_True;" << endl << '}' << endl; diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 746fa741af25..e56d95776960 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -1154,8 +1154,11 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount, sal_Bool bIsEnumSlot = 0 != pEnumValue; - rOutStm << "// Slot Nr. " << ByteString::CreateFromInt32(nListPos).GetBuffer() << " : "; - ByteString aSlotIdValue( ByteString::CreateFromInt32( GetSlotId().GetValue() ) ); + rOutStm << "// Slot Nr. " + << rtl::OString::valueOf(static_cast<sal_Int32>(nListPos)).getStr() + << " : "; + ByteString aSlotIdValue(rtl::OString::valueOf(static_cast<sal_Int32>( + GetSlotId().GetValue()))); rOutStm << aSlotIdValue.GetBuffer() << endl; WriteTab( rOutStm, 1 ); if( bIsEnumSlot ) @@ -1181,12 +1184,12 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount, if( bIsEnumSlot ) { rOutStm << "&a" << rShellName.GetBuffer() << "Slots_Impl[" - << ByteString::CreateFromInt32(pLinkedSlot->GetListPos()).GetBuffer() - << "] /*Offset Master*/, " << endl; + << rtl::OString::valueOf(static_cast<sal_Int32>(pLinkedSlot->GetListPos())).getStr() + << "] /*Offset Master*/, " << endl; WriteTab( rOutStm, 4 ); rOutStm << "&a" << rShellName.GetBuffer() << "Slots_Impl[" - << ByteString::CreateFromInt32(pNextSlot->GetListPos()).GetBuffer() - << "] /*Offset Next*/, " << endl; + << rtl::OString::valueOf(static_cast<sal_Int32>(pNextSlot->GetListPos())).getStr() + << "] /*Offset Next*/, " << endl; WriteTab( rOutStm, 4 ); @@ -1240,14 +1243,14 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount, else { rOutStm << "&a" << rShellName.GetBuffer() << "Slots_Impl[" - << ByteString::CreateFromInt32(pLinkedSlot->GetListPos()).GetBuffer() + << rtl::OString::valueOf(static_cast<sal_Int32>(pLinkedSlot->GetListPos())).getStr() << "] /*Offset Linked*/, " << endl; WriteTab( rOutStm, 4 ); } rOutStm << "&a" << rShellName.GetBuffer() << "Slots_Impl[" - << ByteString::CreateFromInt32(pNextSlot->GetListPos()).GetBuffer() - << "] /*Offset Next*/, " << endl; + << rtl::OString::valueOf(static_cast<sal_Int32>(pNextSlot->GetListPos())).getStr() + << "] /*Offset Next*/, " << endl; WriteTab( rOutStm, 4 ); @@ -1357,7 +1360,9 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount, { rOutStm << ',' << endl; WriteTab( rOutStm, 4 ); - rOutStm << ByteString::CreateFromInt32( nCount ).GetBuffer() << "/*Offset*/, "; + rOutStm + << rtl::OString::valueOf(static_cast<sal_Int32>(nCount)).getStr() + << "/*Offset*/, "; if( IsMethod() ) { @@ -1368,7 +1373,10 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount, else pType = GetType(); sal_uLong nSCount = pType->GetAttrCount(); - rOutStm << ByteString::CreateFromInt32( nSCount ).GetBuffer() << "/*Count*/"; + rOutStm + << rtl::OString::valueOf(static_cast<sal_Int32>( + nSCount)).getStr() + << "/*Count*/"; } else rOutStm << '0'; @@ -1485,8 +1493,9 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, if( !pTable->IsKeyValid( nSId ) ) { pTable->Insert( nSId, this ); - rOutStm << "SfxSlotInfo " << ByteString::CreateFromInt32( nSId ).GetBuffer() - << endl << '{' << endl; + rOutStm << "SfxSlotInfo " + << rtl::OString::valueOf(static_cast<sal_Int32>(nSId)).getStr() + << endl << '{' << endl; WriteTab( rOutStm, 1 ); ByteString aStr = GetConfigName(); @@ -1521,7 +1530,7 @@ void SvMetaSlot::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, sal_Bool bIdOk = sal_False; if( rBase.FindId( aSId, &nSId2 ) ) { - aSId = ByteString::CreateFromInt32( nSId2 ); + aSId = rtl::OString::valueOf(static_cast<sal_Int32>(nSId2)); bIdOk = sal_True; } @@ -1554,7 +1563,9 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, if( !pTable->IsKeyValid( nSId ) ) { pTable->Insert( nSId, this ); - rOutStm << "#define " << GetSlotId().GetBuffer() << '\t' << ByteString::CreateFromInt32( nSId ).GetBuffer() << endl; + rOutStm << "#define " << GetSlotId().GetBuffer() << '\t' + << rtl::OString::valueOf(static_cast<sal_Int32>(nSId)).getStr() + << endl; } SvMetaTypeEnum * pEnum = PTR_CAST( SvMetaTypeEnum, GetType() ); @@ -1573,7 +1584,7 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, sal_Bool bIdOk = sal_False; if( rBase.FindId( aSId, &nSId2 ) ) { - aSId = ByteString::CreateFromInt32( nSId2 ); + aSId = rtl::OString::valueOf(static_cast<sal_Int32>(nSId2)); bIdOk = sal_True; } @@ -1583,7 +1594,9 @@ void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm, pTable->Insert( nSId2, this ); rOutStm << "#define " << aSId.GetBuffer() << '\t' - << ByteString::CreateFromInt32( nSId2 ).GetBuffer() << endl; + << rtl::OString::valueOf( + static_cast<sal_Int32>(nSId2)).getStr() + << endl; } } } @@ -1601,7 +1614,10 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm ) { rStrm << "PROJECT,"; rStrm << GetSlotId().GetBuffer() << ','; - rStrm << ByteString::CreateFromInt32( GetSlotId().GetValue() ).GetBuffer() << ','; + rStrm + << rtl::OString::valueOf( + static_cast<sal_Int32>(GetSlotId().GetValue())).getStr() + << ','; if ( GetPseudoPrefix().Len() ) rStrm << GetPseudoPrefix().GetBuffer() << ','; diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 7a006f2f8428..d57d3cb0e33f 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -425,8 +425,8 @@ void SvMetaAttribute::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm { WriteTab( rOutStm, nTab ); rOutStm << "id(" - << ByteString::CreateFromInt32(MakeSlotValue( rBase, bVar )).GetBuffer() - << ")," << endl; + << rtl::OString::valueOf(static_cast<sal_Int32>(MakeSlotValue(rBase,bVar))).getStr() + << ")," << endl; } if( bVar && (bReadonly || IsMethod()) ) { @@ -467,7 +467,7 @@ void SvMetaAttribute::WriteCSource( SvIdlDataBase & rBase, SvStream & rOutStm, } } rOutStm << "pODKCallFunction( " - << ByteString::CreateFromInt32(MakeSlotValue( rBase, IsVariable() )).GetBuffer(); + << rtl::OString::valueOf(static_cast<sal_Int32>(MakeSlotValue(rBase, IsVariable()))).getStr(); rOutStm << ',' << endl; WriteTab( rOutStm, 3 ); rOutStm << " h" << rBase.aIFaceName.GetBuffer() << " , "; @@ -1428,7 +1428,8 @@ void SvMetaType::WriteSfxItem( ByteString aTypeName = "SfxType"; ByteString aAttrArray; sal_uLong nAttrCount = MakeSfx( &aAttrArray ); - ByteString aAttrCount( ByteString::CreateFromInt32( nAttrCount ) ); + ByteString aAttrCount( + rtl::OString::valueOf(static_cast<sal_Int32>(nAttrCount))); aTypeName += aAttrCount; rOutStm << "extern " << aTypeName.GetBuffer() |