summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-09 08:48:34 +0200
committerNoel Grandin <noel@peralex.com>2016-02-09 09:43:52 +0200
commit8d6e4896d9485aec0def2d23b90d02c750ffce01 (patch)
tree74b1d9f44119956aaa65eaff2783243137c199a1
parente6693def6456878b1bb80678204835d3135f107b (diff)
simplify SvClassElement
no need for it to be ref-counted Change-Id: I663266c9f59930b1f5bc53f1f27b594dbbc08b46
-rw-r--r--idl/inc/object.hxx4
-rw-r--r--idl/source/objects/object.cxx24
2 files changed, 14 insertions, 14 deletions
diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index c4c45f02b07d..9859a3ac444e 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -34,7 +34,7 @@ typedef std::vector< SvSlotElement* > SvSlotElementList;
class SvMetaClass;
typedef ::std::vector< SvMetaClass* > SvMetaClassList;
-class SvClassElement : public SvRttiBase
+class SvClassElement
{
OString aPrefix;
tools::SvRef<SvMetaClass> xClass;
@@ -56,7 +56,7 @@ public:
class SvMetaClass : public SvMetaType
{
SvRefMemberList<SvMetaAttribute *> aAttrList;
- SvRefMemberList<SvClassElement *> aClassList;
+ std::vector<SvClassElement> aClassElementList;
tools::SvRef<SvMetaClass> aSuperClass;
bool TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index bb39019bbcd1..eedc6ebbe07a 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -50,14 +50,14 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
SvMetaClass * pClass = rBase.ReadKnownClass( rInStm );
if( pClass )
{
- tools::SvRef<SvClassElement> xEle = new SvClassElement();
- xEle->SetClass( pClass );
- aClassList.push_back( xEle );
+ SvClassElement xEle;
+ xEle.SetClass( pClass );
+ aClassElementList.push_back( xEle );
pTok = &rInStm.GetToken();
if( pTok->IsString() )
{
- xEle->SetPrefix( pTok->GetString() );
+ xEle.SetPrefix( pTok->GetString() );
rInStm.GetToken_Next();
}
return;
@@ -267,14 +267,14 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>&
// Write all attributes of the imported classes, as long as they have
// not already been imported by the superclass.
- for( n = 0; n < aClassList.size(); n++ )
+ for( n = 0; n < aClassElementList.size(); n++ )
{
- SvClassElement * pEle = aClassList[n];
- SvMetaClass * pCl = pEle->GetClass();
+ SvClassElement& rElement = aClassElementList[n];
+ SvMetaClass * pCl = rElement.GetClass();
OStringBuffer rPre(rPrefix);
- if( !rPre.isEmpty() && !pEle->GetPrefix().isEmpty() )
+ if( !rPre.isEmpty() && !rElement.GetPrefix().isEmpty() )
rPre.append('.');
- rPre.append(pEle->GetPrefix());
+ rPre.append(rElement.GetPrefix());
// first of all write direct imported interfaces
pCl->InsertSlots( rList, rSuperList, rClassList,
@@ -298,10 +298,10 @@ void SvMetaClass::FillClasses( SvMetaClassList & rList )
rList.push_back( this );
// my imports
- for( size_t n = 0; n < aClassList.size(); n++ )
+ for( size_t n = 0; n < aClassElementList.size(); n++ )
{
- SvClassElement * pEle = aClassList[n];
- SvMetaClass * pCl = pEle->GetClass();
+ SvClassElement& rElement = aClassElementList[n];
+ SvMetaClass * pCl = rElement.GetClass();
pCl->FillClasses( rList );
}