summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-08 14:41:57 +0200
committerNoel Grandin <noel@peralex.com>2016-02-09 08:16:26 +0200
commit7a6c044e97d02f6168d13cd7528d89e3b3a1dd3f (patch)
tree065287c4faa49126a0f07c6832ebf457d3becd49 /idl
parent153bf01280f32c7216bd872665ca81a90fb301fe (diff)
split MetaTypeType::Class into Interface and Shell
Change-Id: Id405be797d516e3e608044a375c40b2138c89aa3
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/types.hxx4
-rw-r--r--idl/source/objects/object.cxx9
-rw-r--r--idl/source/objects/types.cxx19
3 files changed, 13 insertions, 19 deletions
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 48d3331360d2..ae229afd5729 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -53,14 +53,13 @@ public:
SvIdlDataBase& );
};
-enum MetaTypeType { Method, Struct, Base, Enum, Class };
+enum MetaTypeType { Method, Struct, Base, Enum, Interface, Shell };
class SvMetaType : public SvMetaReference
{
SvRefMemberList<SvMetaAttribute *> aAttrList;
MetaTypeType nType;
bool bIsItem;
- bool bIsShell;
void WriteSfxItem( const OString& rItemName, SvIdlDataBase & rBase,
SvStream & rOutStm );
@@ -84,7 +83,6 @@ public:
SvMetaType * GetBaseType() const;
SvMetaType * GetReturnType() const;
bool IsItem() const { return bIsItem; }
- bool IsShell() const { return bIsShell; }
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index f95ea36f2a58..bb39019bbcd1 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -109,7 +109,8 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
bool SvMetaClass::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
{
sal_uLong nTokPos = rInStm.Tell();
- if( SvMetaType::ReadHeaderSvIdl( rBase, rInStm ) && GetMetaTypeType() == MetaTypeType::Class )
+ if( SvMetaType::ReadHeaderSvIdl( rBase, rInStm ) &&
+ (GetMetaTypeType() == MetaTypeType::Interface || GetMetaTypeType() == MetaTypeType::Shell) )
{
bool bOk = true;
if( rInStm.Read( ':' ) )
@@ -261,7 +262,7 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>&
// written any more.
// It is prohibited that Shell and SuperShell directly import the same
//class.
- if( IsShell() && aSuperClass.Is() )
+ if( GetMetaTypeType() == MetaTypeType::Shell && aSuperClass.Is() )
aSuperClass->FillClasses( rClassList );
// Write all attributes of the imported classes, as long as they have
@@ -281,7 +282,7 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>&
}
// only write superclass if no shell and not in the list
- if( !IsShell() && aSuperClass.Is() )
+ if( GetMetaTypeType() != MetaTypeType::Shell && aSuperClass.Is() )
{
aSuperClass->InsertSlots( rList, rSuperList, rClassList, rPrefix, rBase );
}
@@ -334,7 +335,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
rOutStm.WriteCharPtr( "#define ShellClass " ).WriteCharPtr( GetName().getStr() ) << endl;
// no slotmaps get written for interfaces
- if( !IsShell() )
+ if( GetMetaTypeType() != MetaTypeType::Shell )
{
rOutStm.WriteCharPtr( "#endif" ) << endl << endl;
return;
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 392b0b0325f9..19726d1d0c99 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -134,7 +134,6 @@ void SvMetaAttribute::Insert (SvSlotElementList&, const OString&, SvIdlDataBase&
#define CTOR \
: nType( MetaTypeType::Base ) \
, bIsItem( false ) \
- , bIsShell( false ) \
SvMetaType::SvMetaType()
CTOR
@@ -153,11 +152,6 @@ SvMetaType::~SvMetaType()
void SvMetaType::SetType( MetaTypeType nT )
{
nType = nT;
- if( nType == MetaTypeType::Class )
- {
- OStringBuffer aTmp("C_");
- aTmp.append("Object *");
- }
}
SvMetaType * SvMetaType::GetBaseType() const
@@ -181,14 +175,15 @@ bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase,
sal_uInt32 nTokPos = rInStm.Tell();
SvToken * pTok = rInStm.GetToken_Next();
- if( pTok->Is( SvHash_interface() )
- || pTok->Is( SvHash_shell() ) )
+ if( pTok->Is( SvHash_interface() ) )
{
- if( pTok->Is( SvHash_shell() ) )
- bIsShell = true;
- SetType( MetaTypeType::Class );
+ SetType( MetaTypeType::Interface );
+ bOk = ReadNamesSvIdl( rInStm );
+ }
+ else if( pTok->Is( SvHash_shell() ) )
+ {
+ SetType( MetaTypeType::Shell );
bOk = ReadNamesSvIdl( rInStm );
-
}
else if( pTok->Is( SvHash_struct() ) )
{