summaryrefslogtreecommitdiff
path: root/idl/inc/basobj.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-28 11:53:11 +0200
committerNoel Grandin <noel@peralex.com>2015-09-08 11:35:59 +0200
commitd4c6a3883a38187effdd7414a0a07a9a2d3d026d (patch)
treea0691e9c4d84189a96cf0751afdc44f94d4e49b4 /idl/inc/basobj.hxx
parent42b0440d55a522806cbb36ea448b61749188ae6b (diff)
loplugin:mergeclasses merge SvMetaObject with SvMetaName
Change-Id: I8c65ad9a5e2141b6fdf578e1361f8685d2f8517e
Diffstat (limited to 'idl/inc/basobj.hxx')
-rw-r--r--idl/inc/basobj.hxx78
1 files changed, 33 insertions, 45 deletions
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index 89ca0a61b56b..71dc13675b46 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -32,8 +32,23 @@ typedef SvMetaObject * (*CreateMetaObjectType)();
#define C_PREF "C_"
+class SvMetaObjectMemberList : public SvRefMemberList<SvMetaObject *> {};
+
class SvMetaObject : public SvRttiBase
{
+protected:
+ SvString aName;
+ SvHelpContext aHelpContext;
+ SvHelpText aHelpText;
+ SvString aConfigName;
+ SvString aDescription;
+
+ bool ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm,
+ char c = '\0' );
+ virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
+ SvTokenStream & rInStm );
public:
TYPEINFO_OVERRIDE();
SvMetaObject();
@@ -42,14 +57,17 @@ public:
static void Back2Delemitter( SvStream & );
static void WriteStars( SvStream & );
- virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL );
+ const SvHelpContext& GetHelpContext() const { return aHelpContext; }
+ virtual const SvString & GetName() const { return aName; }
+ virtual const SvString & GetHelpText() const { return aHelpText; }
+ virtual const SvString & GetConfigName() const{ return aConfigName; }
+ virtual const SvString& GetDescription() const{ return aDescription; }
-protected:
- virtual ~SvMetaObject() {}
+ virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm );
+ virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
};
-class SvMetaObjectMemberList : public SvRefMemberList<SvMetaObject *> {};
-
class SvMetaObjectMemberStack
{
SvMetaObjectMemberList aList;
@@ -68,39 +86,9 @@ public:
}
};
-class SvMetaName : public SvMetaObject
-{
- SvString aName;
- SvHelpContext aHelpContext;
- SvHelpText aHelpText;
- SvString aConfigName;
- SvString aDescription;
-
-protected:
- bool ReadNameSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
- void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm,
- char c = '\0' );
- virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
- virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
- SvTokenStream & rInStm );
-public:
- TYPEINFO_OVERRIDE();
- SvMetaName();
-
- virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL );
- const SvHelpContext& GetHelpContext() const { return aHelpContext; }
- virtual const SvString & GetName() const { return aName; }
- virtual const SvString & GetHelpText() const { return aHelpText; }
- virtual const SvString & GetConfigName() const{ return aConfigName; }
- virtual const SvString& GetDescription() const{ return aDescription; }
-
- virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm );
- virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
-};
-
-class SvMetaNameMemberList : public SvRefMemberList<SvMetaName *> {};
+class SvMetaNameMemberList : public SvRefMemberList<SvMetaObject *> {};
-class SvMetaReference : public SvMetaName
+class SvMetaReference : public SvMetaObject
{
protected:
tools::SvRef<SvMetaReference> aRef;
@@ -111,32 +99,32 @@ public:
const SvString & GetName() const SAL_OVERRIDE
{
return ( !aRef.Is()
- || !SvMetaName::GetName().getString().isEmpty() )
- ? SvMetaName::GetName()
+ || !SvMetaObject::GetName().getString().isEmpty() )
+ ? SvMetaObject::GetName()
: aRef->GetName();
}
const SvString & GetHelpText() const SAL_OVERRIDE
{
return ( !aRef.Is()
- || !SvMetaName::GetHelpText().getString().isEmpty() )
- ? SvMetaName::GetHelpText()
+ || !SvMetaObject::GetHelpText().getString().isEmpty() )
+ ? SvMetaObject::GetHelpText()
: aRef->GetHelpText();
}
const SvString & GetConfigName() const SAL_OVERRIDE
{
return ( !aRef.Is()
- || !SvMetaName::GetConfigName().getString().isEmpty() )
- ? SvMetaName::GetConfigName()
+ || !SvMetaObject::GetConfigName().getString().isEmpty() )
+ ? SvMetaObject::GetConfigName()
: aRef->GetConfigName();
}
const SvString & GetDescription() const SAL_OVERRIDE
{
return ( !aRef.Is()
- || !SvMetaName::GetDescription().getString().isEmpty() )
- ? SvMetaName::GetDescription()
+ || !SvMetaObject::GetDescription().getString().isEmpty() )
+ ? SvMetaObject::GetDescription()
: aRef->GetDescription();
}
SvMetaReference * GetRef() const { return aRef; }