diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-29 22:49:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-05 09:18:18 +0000 |
commit | 164b4ba0c713d09684e1381590179cd3dadce2b7 (patch) | |
tree | caac9783aa9ac3e2c7a3574e426b1180ca62b4c4 /idl | |
parent | f731dc1e3506c78918b0965d77c3f51eaaf752ad (diff) |
ByteString->rtl::OString[Buffer]
Diffstat (limited to 'idl')
-rw-r--r-- | idl/source/objects/bastype.cxx | 16 | ||||
-rw-r--r-- | idl/source/objects/object.cxx | 8 | ||||
-rw-r--r-- | idl/source/objects/types.cxx | 46 |
3 files changed, 34 insertions, 36 deletions
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index 19e3a1170fd6..e084a4434a9d 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -253,10 +253,10 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, } else { - ByteString aStr ("no value for identifier <"); - aStr += getString(); - aStr += "> "; - rBase.SetError( aStr, rInStm.GetToken() ); + rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( + "no value for identifier <")); + aStr.append(getString()).append(RTL_CONSTASCII_STRINGPARAM("> ")); + rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); } } @@ -280,10 +280,10 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, } else { - ByteString aStr ("no value for identifier <"); - aStr += getString(); - aStr += "> "; - rBase.SetError( aStr, rInStm.GetToken() ); + rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( + "no value for identifier <")); + aStr.append(getString()).append(RTL_CONSTASCII_STRINGPARAM("> ")); + rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); } } diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index 92da00e6aaca..2e3dba877dec 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -675,10 +675,10 @@ void SvMetaClass::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) { - ByteString aSuperName( "SvDispatch" ); + rtl::OString aSuperName(RTL_CONSTASCII_STRINGPARAM("SvDispatch")); if( GetSuperClass() ) aSuperName = GetSuperClass()->GetName().getString(); - const char * pSup = aSuperName.GetBuffer(); + const char * pSup = aSuperName.getStr(); rOutStm << "class " << GetSvName().GetBuffer() @@ -700,10 +700,10 @@ void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) { - ByteString aSuperName( "SvDispatch" ); + rtl::OString aSuperName(RTL_CONSTASCII_STRINGPARAM("SvDispatch")); if( GetSuperClass() ) aSuperName = GetSuperClass()->GetName().getString(); - const char * pSup = aSuperName.GetBuffer(); + const char * pSup = aSuperName.getStr(); ByteString name = GetSvName(); // GetTypeName diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index a37ba18c593e..06cdcd93ad39 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -875,13 +875,13 @@ void SvMetaType::SetType( int nT ) nType = nT; if( nType == TYPE_ENUM ) { - aOdlName.setString("short"); + aOdlName.setString(rtl::OString(RTL_CONSTASCII_STRINGPARAM("short"))); } else if( nType == TYPE_CLASS ) { - ByteString aTmp(C_PREF); - aTmp += "Object *"; - aCName.setString(aTmp); + rtl::OStringBuffer aTmp(C_PREF); + aTmp.append(RTL_CONSTASCII_STRINGPARAM("Object *")); + aCName.setString(aTmp.makeStringAndClear()); } } @@ -1103,7 +1103,7 @@ sal_Bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, } else { - ByteString aStr = "wrong typedef: "; + rtl::OString aStr(RTL_CONSTASCII_STRINGPARAM("wrong typedef: ")); rBase.SetError( aStr, rInStm.GetToken() ); rBase.WriteError( rInStm ); } @@ -1173,7 +1173,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, // write only enum return; - ByteString name = GetName().getString(); + rtl::OString name = GetName().getString(); if( nT == WRITE_ODL || nT == WRITE_C_HEADER || nT == WRITE_CXX_HEADER ) { switch( nType ) @@ -1194,10 +1194,9 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, { if ( nT == WRITE_C_HEADER ) { - ByteString aStr = name; - aStr.ToUpperAscii(); - rOutStm << "#ifndef " << C_PREF << aStr.GetBuffer() << "_DEF " << endl; - rOutStm << "#define " << C_PREF << aStr.GetBuffer() << "_DEF " << endl; + rtl::OString aStr = name.toAsciiUpperCase(); + rOutStm << "#ifndef " << C_PREF << aStr.getStr() << "_DEF " << endl; + rOutStm << "#define " << C_PREF << aStr.getStr() << "_DEF " << endl; } WriteTab( rOutStm, nTab ); @@ -1213,7 +1212,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, else rOutStm << "enum"; if( nT != WRITE_ODL && nT != WRITE_C_HEADER) - rOutStm << ' ' << name.GetBuffer(); + rOutStm << ' ' << name.getStr(); rOutStm << endl; WriteTab( rOutStm, nTab ); @@ -1223,7 +1222,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, rOutStm << '}'; if( nT == WRITE_ODL || nT == WRITE_C_HEADER ) { - rOutStm << ' ' << C_PREF << name.GetBuffer(); + rOutStm << ' ' << C_PREF << name.getStr(); } rOutStm << ';' << endl; @@ -1416,27 +1415,26 @@ void SvMetaType::WriteSfxItem( const ByteString & rItemName, SvIdlDataBase &, SvStream & rOutStm ) { WriteStars( rOutStm ); - ByteString aVarName = " a"; - aVarName += rItemName; - aVarName += "_Impl"; + rtl::OStringBuffer aVarName(RTL_CONSTASCII_STRINGPARAM(" a")); + aVarName.append(rItemName).append(RTL_CONSTASCII_STRINGPARAM("_Impl")); - ByteString aTypeName = "SfxType"; + rtl::OStringBuffer aTypeName(RTL_CONSTASCII_STRINGPARAM("SfxType")); rtl::OStringBuffer aAttrArray; sal_uLong nAttrCount = MakeSfx( aAttrArray ); - ByteString aAttrCount( + rtl::OString aAttrCount( rtl::OString::valueOf(static_cast<sal_Int32>(nAttrCount))); - aTypeName += aAttrCount; + aTypeName.append(aAttrCount); - rOutStm << "extern " << aTypeName.GetBuffer() - << aVarName.GetBuffer() << ';' << endl; + rOutStm << "extern " << aTypeName.getStr() + << aVarName.getStr() << ';' << endl; // write the implementation part rOutStm << "#ifdef SFX_TYPEMAP" << endl - << aTypeName.GetBuffer() << aVarName.GetBuffer() + << aTypeName.getStr() << aVarName.getStr() << " = " << endl; rOutStm << '{' << endl << "\tTYPE(" << rItemName.GetBuffer() << "), " - << aAttrCount.GetBuffer(); + << aAttrCount.getStr(); if( nAttrCount ) { rOutStm << ", { "; @@ -1737,7 +1735,7 @@ void SvMetaType::WriteParamNames( SvIdlDataBase & rBase, for( sal_uLong n = 0; n < nAttrCount; n++ ) { SvMetaAttribute * pA = pAttrList->GetObject( n ); - ByteString aStr = pA->GetName().getString(); + rtl::OString aStr = pA->GetName().getString(); pA->GetType()->WriteParamNames( rBase, rOutStm, aStr ); if( n +1 < nAttrCount ) rOutStm << ", "; @@ -1822,7 +1820,7 @@ void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16, SV_IMPL_META_FACTORY1( SvMetaTypeEnum, SvMetaType ); SvMetaTypeEnum::SvMetaTypeEnum() { - SetBasicName( "Integer" ); + SetBasicName(rtl::OString(RTL_CONSTASCII_STRINGPARAM("Integer"))); } void SvMetaTypeEnum::Load( SvPersistStream & rStm ) |