diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-08 13:25:26 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-08 14:00:38 +0200 |
commit | d61b45016ee4048068b8410c5e2635e8d84f9849 (patch) | |
tree | 16596fe4ec1c98ef4f664decd8103bfa1b20201a /idl/source/objects | |
parent | 04e22bee0a79008a39dc9d78a460941f738020a6 (diff) |
SvString is a just thin wrapper around OString
eliminate it
Change-Id: Icb91d25cc7bffb3060b9392f71d37e5a95844aa3
Diffstat (limited to 'idl/source/objects')
-rw-r--r-- | idl/source/objects/basobj.cxx | 2 | ||||
-rw-r--r-- | idl/source/objects/bastype.cxx | 4 | ||||
-rw-r--r-- | idl/source/objects/module.cxx | 6 | ||||
-rw-r--r-- | idl/source/objects/object.cxx | 26 | ||||
-rw-r--r-- | idl/source/objects/slot.cxx | 28 | ||||
-rw-r--r-- | idl/source/objects/types.cxx | 12 |
6 files changed, 39 insertions, 39 deletions
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index 3ccbb36ae7d5..272b526de1ab 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -68,7 +68,7 @@ SvMetaObject::SvMetaObject() void SvMetaObject::SetName( const OString& rName ) { - aName.setString(rName); + aName = rName; } bool SvMetaObject::ReadNameSvIdl( SvTokenStream & rInStm ) diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index a7b6c3dfe89b..ae60b5551e05 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -111,7 +111,7 @@ void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase, rInStm.Seek( nTokPos ); } -bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) +bool ReadStringSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm, OString& aRetString ) { sal_uInt32 nTokPos = rInStm.Tell(); SvToken * pTok = rInStm.GetToken_Next(); @@ -125,7 +125,7 @@ bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) pTok = &rInStm.GetToken(); if( pTok->IsString() ) { - setString(pTok->GetString()); + aRetString = pTok->GetString(); rInStm.GetToken_Next(); } if( bOk && bBraket ) diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 1a2971e6cfbc..432421556f65 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -38,13 +38,13 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase, { SvMetaReference::ReadAttributesSvIdl( rBase, rInStm ); - if( aSlotIdFile.ReadSvIdl( SvHash_SlotIdFile(), rInStm ) ) + if( ReadStringSvIdl( SvHash_SlotIdFile(), rInStm, aSlotIdFile ) ) { sal_uInt32 nTokPos = rInStm.Tell(); - if( !rBase.ReadIdFile( OStringToOUString(aSlotIdFile.getString(), RTL_TEXTENCODING_ASCII_US)) ) + if( !rBase.ReadIdFile( OStringToOUString(aSlotIdFile, RTL_TEXTENCODING_ASCII_US)) ) { OStringBuffer aStr("cannot read file: "); - aStr.append(aSlotIdFile.getString()); + aStr.append(aSlotIdFile); rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index eba6cb5b6a26..ecc2691bcaa9 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -147,18 +147,18 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, for( sal_uLong n = 0; n < aAttrList.size(); n++ ) { SvMetaAttribute * pS = aAttrList[n]; - if( pS->GetName().getString() == rAttr.GetName().getString() ) + if( pS->GetName() == rAttr.GetName() ) { // values have to match if( pS->GetSlotId().GetValue() != rAttr.GetSlotId().GetValue() ) { OSL_FAIL( "Same Name in MetaClass : " ); - OSL_FAIL( pS->GetName().getString().getStr() ); + OSL_FAIL( pS->GetName().getStr() ); OSL_FAIL( pS->GetSlotId().getString().getStr() ); OSL_FAIL( rAttr.GetSlotId().getString().getStr() ); OStringBuffer aStr("Attribute's "); - aStr.append(pS->GetName().getString()); + aStr.append(pS->GetName()); aStr.append(" with different id's"); rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken()); rBase.WriteError( rInStm ); @@ -177,9 +177,9 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, OSL_FAIL( rAttr.GetSlotId().getString().getStr() ); OStringBuffer aStr("Attribute "); - aStr.append(pS->GetName().getString()); + aStr.append(pS->GetName()); aStr.append(" and Attribute "); - aStr.append(rAttr.GetName().getString()); + aStr.append(rAttr.GetName()); aStr.append(" with equal id's"); rBase.SetError(aStr.makeStringAndClear(), rInStm.GetToken()); rBase.WriteError( rInStm ); @@ -328,10 +328,10 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) { WriteStars( rOutStm ); // define class - rOutStm.WriteCharPtr( "#ifdef " ).WriteCharPtr( GetName().getString().getStr() ) << endl; + rOutStm.WriteCharPtr( "#ifdef " ).WriteCharPtr( GetName().getStr() ) << endl; rOutStm.WriteCharPtr( "#undef ShellClass" ) << endl; - rOutStm.WriteCharPtr( "#undef " ).WriteCharPtr( GetName().getString().getStr() ) << endl; - rOutStm.WriteCharPtr( "#define ShellClass " ).WriteCharPtr( GetName().getString().getStr() ) << endl; + rOutStm.WriteCharPtr( "#undef " ).WriteCharPtr( GetName().getStr() ) << endl; + rOutStm.WriteCharPtr( "#define ShellClass " ).WriteCharPtr( GetName().getStr() ) << endl; // no slotmaps get written for interfaces if( !IsShell() ) @@ -340,7 +340,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) return; } // write parameter array - rOutStm.WriteCharPtr("static SfxFormalArgument a").WriteCharPtr(GetName().getString().getStr()).WriteCharPtr("Args_Impl[] =") << endl; + rOutStm.WriteCharPtr("static SfxFormalArgument a").WriteCharPtr(GetName().getStr()).WriteCharPtr("Args_Impl[] =") << endl; rOutStm.WriteChar('{') << endl; std::vector<sal_uLong> aSuperList; @@ -370,7 +370,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) rOutStm.WriteCharPtr( "};" ) << endl << endl; ByteStringList aStringList; - WriteSlotStubs( GetName().getString(), aSlotList, aStringList, rOutStm ); + WriteSlotStubs( GetName(), aSlotList, aStringList, rOutStm ); for ( size_t i = 0, n = aStringList.size(); i < n; ++i ) delete aStringList[ i ]; aStringList.clear(); @@ -378,18 +378,18 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) rOutStm << endl; // write slotmap - rOutStm.WriteCharPtr("static SfxSlot a").WriteCharPtr(GetName().getString().getStr()).WriteCharPtr("Slots_Impl[] =") << endl; + rOutStm.WriteCharPtr("static SfxSlot a").WriteCharPtr(GetName().getStr()).WriteCharPtr("Slots_Impl[] =") << endl; rOutStm.WriteChar( '{' ) << endl; // write all attributes - WriteSlots( GetName().getString(), 0, aSlotList, rBase, rOutStm ); + WriteSlots( GetName(), 0, aSlotList, rBase, rOutStm ); if( nSlotCount ) Back2Delemitter( rOutStm ); else { // at least one dummy WriteTab( rOutStm, 1 ); - rOutStm.WriteCharPtr( "SFX_SLOT_ARG(" ).WriteCharPtr( GetName().getString().getStr() ) + rOutStm.WriteCharPtr( "SFX_SLOT_ARG(" ).WriteCharPtr( GetName().getStr() ) .WriteCharPtr( ", 0, 0, " ) .WriteCharPtr( "SFX_STUB_PTR_EXEC_NONE," ) .WriteCharPtr( "SFX_STUB_PTR_STATE_NONE," ) diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index f94ad2c4877b..500715c06b0f 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -99,9 +99,9 @@ OString SvMetaSlot::GetMangleName( bool bVariable ) const { SvMetaAttribute * pMeth = GetMethod(); if( pMeth ) - return pMeth->GetName().getString(); + return pMeth->GetName(); } - return GetName().getString(); + return GetName(); } /************************************************************************* @@ -128,7 +128,7 @@ const OString& SvMetaSlot::GetGroupId() const } const OString& SvMetaSlot::GetDisableFlags() const { - if( !aDisableFlags.getString().isEmpty() || !GetRef() ) return aDisableFlags.getString(); + if( !aDisableFlags.isEmpty() || !GetRef() ) return aDisableFlags; return static_cast<SvMetaSlot *>(GetRef())->GetDisableFlags(); } const OString& SvMetaSlot::GetExecMethod() const @@ -246,7 +246,7 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase, bOk |= aGroupId.ReadSvIdl( SvHash_GroupId(), rInStm ); bOk |= aExecMethod.ReadSvIdl( SvHash_ExecMethod(), rInStm ); bOk |= aStateMethod.ReadSvIdl( SvHash_StateMethod(), rInStm ); - bOk |= aDisableFlags.ReadSvIdl( SvHash_DisableFlags(), rInStm ); + bOk |= ReadStringSvIdl( SvHash_DisableFlags(), rInStm, aDisableFlags ); bOk |= aReadOnlyDoc.ReadSvIdl( SvHash_ReadOnlyDoc(), rInStm ); bOk |= aExport.ReadSvIdl( SvHash_Export(), rInStm ); @@ -366,13 +366,13 @@ bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) if( pKnownSlot ) { SetRef( pKnownSlot ); - SetName( pKnownSlot->GetName().getString() ); + SetName( pKnownSlot->GetName() ); bOk = SvMetaObject::ReadSvIdl( rBase, rInStm ); } else { OStringBuffer aStr( "attribute " ); - aStr.append(pAttr->GetName().getString()); + aStr.append(pAttr->GetName()); aStr.append(" is method or variable but not a slot"); rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); @@ -393,19 +393,19 @@ bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) SetRef( pKnownSlot ); // names may differ, because explicitly given - if ( pKnownSlot->GetName().getString() != GetName().getString() ) + if ( pKnownSlot->GetName() != GetName() ) { OSL_FAIL("Illegal definition!"); rInStm.Seek( nTokPos ); return false; } - SetName( pKnownSlot->GetName().getString() ); + SetName( pKnownSlot->GetName() ); } else { OStringBuffer aStr("attribute "); - aStr.append(pAttr2->GetName().getString()); + aStr.append(pAttr2->GetName()); aStr.append(" is method or variable but not a slot"); rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); @@ -499,7 +499,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix, { // create SlotId SvMetaEnumValue *enumValue = pEnum->GetObject(n); - OString aValName = enumValue->GetName().getString(); + OString aValName = enumValue->GetName(); OStringBuffer aBuf; if( !GetPseudoPrefix().isEmpty() ) aBuf.append(GetPseudoPrefix()); @@ -687,7 +687,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, else rOutStm.WriteChar( '0' ); rOutStm.WriteChar( ',' ); - rOutStm.WriteCharPtr( pEnumValue->GetName().getString().getStr() ); + rOutStm.WriteCharPtr( pEnumValue->GetName().getStr() ); } else { @@ -822,7 +822,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount, } if( pT ) { - rOutStm.WriteCharPtr( pT->GetName().getString().getStr() ); + rOutStm.WriteCharPtr( pT->GetName().getStr() ); if( !SvIdlDataBase::FindType( pT, rBase.aUsedTypes ) ) rBase.aUsedTypes.push_back( pT ); } @@ -904,9 +904,9 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO WriteTab( rOutStm, 1 ); rOutStm.WriteCharPtr("{ (const SfxType*) &a") // item type - .WriteCharPtr(pPType->GetName().getString().getStr()).WriteCharPtr("_Impl, ") + .WriteCharPtr(pPType->GetName().getStr()).WriteCharPtr("_Impl, ") // parameter name - .WriteCharPtr("\"").WriteCharPtr(pPar->GetName().getString().getStr()).WriteCharPtr("\", ") + .WriteCharPtr("\"").WriteCharPtr(pPar->GetName().getStr()).WriteCharPtr("\", ") // slot id .WriteCharPtr(pPar->GetSlotId().getString().getStr()).WriteCharPtr(" },") << endl; if( !SvIdlDataBase::FindType( pPType, rBase.aUsedTypes ) ) diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 07f7260790cf..4707344347d9 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -65,7 +65,7 @@ bool SvMetaAttribute::IsVariable() const OString SvMetaAttribute::GetMangleName( bool ) const { - return GetName().getString(); + return GetName(); } bool SvMetaAttribute::Test( SvIdlDataBase & rBase, @@ -139,7 +139,7 @@ sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) rAttrArray.append('{'); rAttrArray.append(GetSlotId().getString()); rAttrArray.append(",\""); - rAttrArray.append(GetName().getString()); + rAttrArray.append(GetName()); rAttrArray.append("\"}"); return 1; } @@ -350,9 +350,9 @@ void SvMetaType::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) if( IsItem() ) { if( GetBaseType()->GetType() == MetaTypeType::Struct ) - GetBaseType()->WriteSfxItem( GetName().getString(), rBase, rOutStm ); + GetBaseType()->WriteSfxItem( GetName(), rBase, rOutStm ); else - WriteSfxItem( GetName().getString(), rBase, rOutStm ); + WriteSfxItem( GetName(), rBase, rOutStm ); } } @@ -420,11 +420,11 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase, if( aEnumValueList.empty() ) { // the first - aPrefix = aEnumVal->GetName().getString(); + aPrefix = aEnumVal->GetName(); } else { - aPrefix = getCommonSubPrefix(aPrefix, aEnumVal->GetName().getString()); + aPrefix = getCommonSubPrefix(aPrefix, aEnumVal->GetName()); } aEnumValueList.push_back( aEnumVal ); } |