summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-16 08:12:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-16 08:13:33 +0200
commitaef6ab2098f065f1cee102538776dd99d9db3b0f (patch)
treea7521309cb9263e07e3f62c498b2cca4432d052a /idl
parentd2ed493a4c0285ff711fcbb86abe6f7025cfd072 (diff)
Strip svidl down to what is still used
...the generated .ilb, .lst, and .sid outputs requested by SdiTarget were apparently unused. Change-Id: I1abb2abc7945070451fce4a98a11d955515e3f63
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/basobj.hxx39
-rw-r--r--idl/inc/bastype.hxx9
-rw-r--r--idl/inc/command.hxx7
-rw-r--r--idl/inc/database.hxx10
-rw-r--r--idl/inc/globals.hxx1
-rw-r--r--idl/inc/module.hxx9
-rw-r--r--idl/inc/object.hxx17
-rw-r--r--idl/inc/slot.hxx11
-rw-r--r--idl/inc/types.hxx45
-rw-r--r--idl/source/objects/basobj.cxx229
-rw-r--r--idl/source/objects/bastype.cxx50
-rw-r--r--idl/source/objects/module.cxx213
-rw-r--r--idl/source/objects/object.cxx193
-rw-r--r--idl/source/objects/slot.cxx582
-rw-r--r--idl/source/objects/types.cxx803
-rw-r--r--idl/source/prj/command.cxx81
-rw-r--r--idl/source/prj/database.cxx183
-rw-r--r--idl/source/prj/globals.cxx25
-rw-r--r--idl/source/prj/svidl.cxx142
19 files changed, 103 insertions, 2546 deletions
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index 34d0b100e069..5c0ac112565e 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -38,8 +38,7 @@ typedef SvMetaObject * (*CreateMetaObjectType)();
enum WriteType
{
- WRITE_IDL, WRITE_ODL, WRITE_SLOTMAP, WRITE_C_HEADER, WRITE_C_SOURCE,
- WRITE_CXX_HEADER, WRITE_CXX_SOURCE, WRITE_DOCU
+ WRITE_C_HEADER, WRITE_C_SOURCE
};
enum
@@ -49,16 +48,10 @@ enum
};
typedef int WriteAttribute;
-#define SV_DECL_META_FACTORY1( Class, Super1, CLASS_ID ) \
- SV_DECL_PERSIST1( Class, Super1, CLASS_ID )
-
-#define SV_IMPL_META_FACTORY1( Class, Super1 ) \
- SV_IMPL_PERSIST1( Class, Super1 )
-
-class SvMetaObject : public SvPersistBase
+class SvMetaObject : public SvRttiBase
{
public:
- SV_DECL_META_FACTORY1( SvMetaObject, SvPersistBase, 14 )
+ TYPEINFO_OVERRIDE();
SvMetaObject();
static void WriteTab( SvStream & rOutStm, sal_uInt16 nTab );
@@ -67,14 +60,16 @@ public:
static void WriteStars( SvStream & );
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
- virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0 );
+
+protected:
+ virtual ~SvMetaObject() {}
};
typedef tools::SvRef<SvMetaObject> SvMetaObjectRef;
-class SvMetaObjectMemberList : public SvDeclPersistList<SvMetaObject *> {};
+class SvMetaObjectMemberList : public SvRefMemberList<SvMetaObject *> {};
class SvMetaObjectMemberStack
{
@@ -111,18 +106,14 @@ protected:
void DoReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm,
char c = '\0' );
virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
- virtual void WriteContextSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab );
virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm );
- virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab );
virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0);
virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0);
public:
- SV_DECL_META_FACTORY1( SvMetaName, SvMetaObject, 15 )
+ TYPEINFO_OVERRIDE();
SvMetaName();
virtual bool SetName( const OString& rName, SvIdlDataBase * = NULL );
@@ -136,14 +127,13 @@ public:
virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm );
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0) SAL_OVERRIDE;
void WriteDescription( SvStream& rOutStm );
};
typedef tools::SvRef<SvMetaName> SvMetaNameRef;
-class SvMetaNameMemberList : public SvDeclPersistList<SvMetaName *> {};
+class SvMetaNameMemberList : public SvRefMemberList<SvMetaName *> {};
class SvMetaReference;
typedef tools::SvRef<SvMetaReference> SvMetaReferenceRef;
@@ -152,7 +142,7 @@ class SvMetaReference : public SvMetaName
protected:
SvMetaReferenceRef aRef;
public:
- SV_DECL_META_FACTORY1( SvMetaReference, SvMetaName, 17 )
+ TYPEINFO_OVERRIDE();
SvMetaReference();
const SvString & GetName() const SAL_OVERRIDE
@@ -191,7 +181,7 @@ public:
{ aRef = pRef; }
};
-class SvMetaReferenceMemberList : public SvDeclPersistList<SvMetaReference *> {};
+class SvMetaReferenceMemberList : public SvRefMemberList<SvMetaReference *> {};
class SvMetaModule;
@@ -204,7 +194,7 @@ class SvMetaExtern : public SvMetaReference
bool bReadUUId;
bool bReadVersion;
public:
- SV_DECL_META_FACTORY1( SvMetaExtern, SvMetaName, 16 )
+ TYPEINFO_OVERRIDE();
SvMetaExtern();
SvMetaModule * GetModule() const;
@@ -213,20 +203,17 @@ public:
const SvVersion & GetVersion() const { return aVersion; }
void SetModule( SvIdlDataBase & rBase );
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0) SAL_OVERRIDE;
protected:
virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0) SAL_OVERRIDE;
};
typedef tools::SvRef<SvMetaExtern> SvMetaExternRef;
-class SvMetaExternMemberList : public SvDeclPersistList<SvMetaExtern *> {};
+class SvMetaExternMemberList : public SvRefMemberList<SvMetaExtern *> {};
#endif // INCLUDED_IDL_INC_BASOBJ_HXX
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
index 588f091ef532..1d862843944c 100644
--- a/idl/inc/bastype.hxx
+++ b/idl/inc/bastype.hxx
@@ -90,7 +90,6 @@ public:
friend SvStream& operator >> (SvStream &, SvBOOL &);
bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
- bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm );
OString GetSvIdlString( SvStringHashEntry * pName );
};
@@ -119,8 +118,6 @@ public:
return !m_aStr.isEmpty();
}
bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
- bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
- sal_uInt16 nTab );
};
@@ -168,8 +165,6 @@ public:
friend SvStream& operator >> (SvStream &, SvString &);
bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
- bool WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
- sal_uInt16 nTab );
};
@@ -178,8 +173,6 @@ class SvHelpText : public SvString
public:
SvHelpText() {}
bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
- bool WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab );
};
@@ -192,7 +185,6 @@ class SvUUId : public SvGlobalName
public:
SvUUId() {}
bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
- bool WriteSvIdl( SvStream & rOutStm );
};
@@ -218,7 +210,6 @@ public:
friend SvStream& WriteSvVersion(SvStream &, const SvVersion &);
friend SvStream& operator >> (SvStream &, SvVersion &);
bool ReadSvIdl( SvTokenStream & rInStm );
- bool WriteSvIdl( SvStream & rOutStm );
};
diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx
index 3f47ad87bcb7..04c5ea08d613 100644
--- a/idl/inc/command.hxx
+++ b/idl/inc/command.hxx
@@ -29,20 +29,13 @@ typedef ::std::vector< OString* > ByteStringList;
class SvCommand
{
public:
- OUString aDataBaseFile;
StringList aInFileList;
- OUString aListFile;
OUString aSlotMapFile;
- OUString aSfxItemFile;
OUString aPath;
OUString aTargetFile;
- OUString aHelpIdFile;
- OUString aCSVFile;
OUString aExportFile;
- OUString aDocuFile;
OUString m_DepFile;
sal_uInt32 nVerbosity;
- sal_uInt32 nFlags;
SvCommand( int argc, char ** argv );
~SvCommand();
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 07de1c20ea7a..95a271c4dcbf 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -59,7 +59,6 @@ class SvIdlDataBase
OUString aExportFile;
sal_uInt32 nUniqueId;
sal_uInt32 nVerbosity;
- SvPersistStream aPersStream;
StringList aIdFileList;
SvStringHashTable * pIdTable;
@@ -84,10 +83,6 @@ public:
explicit SvIdlDataBase( const SvCommand& rCmd );
~SvIdlDataBase();
- static bool IsBinaryFormat( SvStream & rInStm );
-
- void Load( SvStream & rInStm );
- void Save( SvStream & rInStm, sal_uInt32 nContextFlags );
SvMetaAttributeMemberList& GetAttrList() { return aAttrList; }
SvStringHashTable * GetIdTable() { return pIdTable; }
@@ -152,13 +147,8 @@ public:
explicit SvIdlWorkingBase( const SvCommand& rCmd );
bool ReadSvIdl( SvTokenStream &, bool bImported, const OUString & rPath );
- bool WriteSvIdl( SvStream & );
bool WriteSfx( SvStream & );
- bool WriteHelpIds( SvStream & );
- bool WriteSfxItem( SvStream & );
- bool WriteCSV( SvStream& );
- bool WriteDocumentation( SvStream& );
};
#endif // INCLUDED_IDL_INC_DATABASE_HXX
diff --git a/idl/inc/globals.hxx b/idl/inc/globals.hxx
index 7143f2a605e5..3569d975018f 100644
--- a/idl/inc/globals.hxx
+++ b/idl/inc/globals.hxx
@@ -119,7 +119,6 @@ class IdlDll
{
public:
SvStringHashTable * pHashTable;
- SvClassManager * pClassMgr;
SvGlobalHashNames * pGlobalNames;
IdlDll();
diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx
index 848fe590470c..d37a86fb2183 100644
--- a/idl/inc/module.hxx
+++ b/idl/inc/module.hxx
@@ -51,11 +51,9 @@ class SvMetaModule : public SvMetaExtern
SvGlobalName aNextName;
protected:
virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteContextSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
public:
- SV_DECL_META_FACTORY1( SvMetaModule, SvMetaExtern, 13 )
+ TYPEINFO_OVERRIDE();
SvMetaModule();
const OUString & GetIdlFileName() const { return aIdlFileName; }
@@ -78,7 +76,6 @@ public:
bool IsModified() const { return bIsModified; }
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void WriteAttributes( SvIdlDataBase & rBase,
SvStream & rOutStm, sal_uInt16 nTab,
@@ -86,12 +83,10 @@ public:
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0 ) SAL_OVERRIDE;
virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
- virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
- HelpIdTable& rTable );
};
typedef tools::SvRef<SvMetaModule> SvMetaModuleRef;
-class SvMetaModuleMemberList : public SvDeclPersistList<SvMetaModule *> {};
+class SvMetaModuleMemberList : public SvRefMemberList<SvMetaModule *> {};
#endif // INCLUDED_IDL_INC_MODULE_HXX
diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index 1e1037c29281..01ac607b2e4c 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -40,13 +40,13 @@ class SvMetaClass;
typedef ::std::vector< SvMetaClass* > SvMetaClassList;
typedef tools::SvRef<SvMetaClass> SvMetaClassRef;
-class SvClassElement : public SvPersistBase
+class SvClassElement : public SvRttiBase
{
SvBOOL aAutomation;
OString aPrefix;
SvMetaClassRef xClass;
public:
- SV_DECL_PERSIST1( SvClassElement, SvPersistBase, 1 )
+ TYPEINFO_OVERRIDE();
SvClassElement();
void SetPrefix( const OString& rPrefix )
@@ -67,9 +67,9 @@ public:
typedef tools::SvRef<SvClassElement> SvClassElementRef;
-class SvClassElementMemberList : public SvDeclPersistList<SvClassElement *> {};
+class SvClassElementMemberList : public SvRefMemberList<SvClassElement *> {};
-class SvMetaClassMemberList : public SvDeclPersistList<SvMetaClass *> {};
+class SvMetaClassMemberList : public SvRefMemberList<SvMetaClass *> {};
class SvMetaClass : public SvMetaType
{
@@ -100,18 +100,14 @@ class SvMetaClass : public SvMetaType
protected:
virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void ReadContextSvIdl( SvIdlDataBase &,
SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteContextSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
void WriteOdlMembers( ByteStringList & rSuperList,
bool bVariable, bool bWriteTab,
SvIdlDataBase & rBase,
SvStream & rOutStm, sal_uInt16 nTab );
public:
- SV_DECL_META_FACTORY1( SvMetaClass, SvMetaType, 6 )
+ TYPEINFO_OVERRIDE();
SvMetaClass();
bool GetAutomation() const
@@ -126,13 +122,10 @@ public:
{ return aClassList; }
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
WriteType, WriteAttribute = 0 ) SAL_OVERRIDE;
virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) SAL_OVERRIDE;
- virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
- HelpIdTable& rTable );
};
#endif // INCLUDED_IDL_INC_OBJECT_HXX
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index db16bfd96062..01ba419f7292 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -167,7 +167,7 @@ protected:
{ aImageReflection = bSet; }
public:
- SV_DECL_META_FACTORY1( SvMetaSlot, SvMetaReference, 11 )
+ TYPEINFO_OVERRIDE();
SvMetaObject * MakeClone() const;
SvMetaSlot *Clone() const { return static_cast<SvMetaSlot *>(MakeClone()); }
@@ -229,11 +229,7 @@ public:
virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void Insert( SvSlotElementList&, const OString& rPrefix,
SvIdlDataBase& ) SAL_OVERRIDE;
void WriteSlotStubs( const OString& rShellName,
@@ -247,13 +243,10 @@ public:
SvStream & rOutStm );
sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
SvStream & rOutStm );
- virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
- HelpIdTable& rIdTable ) SAL_OVERRIDE;
- virtual void WriteCSV( SvIdlDataBase&, SvStream& ) SAL_OVERRIDE;
};
typedef tools::SvRef<SvMetaSlot> SvMetaSlotRef;
-class SvMetaSlotMemberList : public SvDeclPersistList<SvMetaSlot *> {};
+class SvMetaSlotMemberList : public SvRefMemberList<SvMetaSlot *> {};
#endif // INCLUDED_IDL_INC_SLOT_HXX
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 54f2c1a88686..a73964bb4619 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -23,13 +23,11 @@
#include <rtl/strbuf.hxx>
#include <tools/ref.hxx>
#include <basobj.hxx>
-#include <map>
struct SvSlotElement;
typedef std::vector< SvSlotElement* > SvSlotElementList;
class SvMetaSlot;
-typedef std::map<sal_uLong, SvMetaSlot*> HelpIdTable;
class SvMetaType;
typedef tools::SvRef<SvMetaType> SvMetaTypeRef;
@@ -55,10 +53,8 @@ protected:
WriteType, WriteAttribute = 0 ) SAL_OVERRIDE;
virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
public:
- SV_DECL_META_FACTORY1( SvMetaAttribute, SvMetaReference, 2 )
+ TYPEINFO_OVERRIDE();
SvMetaAttribute();
SvMetaAttribute( SvMetaType * );
@@ -101,7 +97,6 @@ public:
virtual bool Test( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void WriteParam( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType );
void WriteRecursiv_Impl( SvIdlDataBase & rBase,
@@ -112,16 +107,12 @@ public:
sal_uLong MakeSfx( OStringBuffer& rAtrrArray );
virtual void Insert( SvSlotElementList&, const OString& rPrefix,
SvIdlDataBase& );
- virtual void WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
- HelpIdTable& rIdTable );
- virtual void WriteCSV( SvIdlDataBase&, SvStream& );
- void FillIDTable(HelpIdTable& rIDTable);
OString Compare( SvMetaAttribute *pAttr );
};
typedef tools::SvRef<SvMetaAttribute> SvMetaAttributeRef;
-class SvMetaAttributeMemberList : public SvDeclPersistList<SvMetaAttribute *> {};
+class SvMetaAttributeMemberList : public SvRefMemberList<SvMetaAttribute *> {};
enum { CALL_VALUE, CALL_POINTER, CALL_REFERENCE };
enum { TYPE_METHOD, TYPE_STRUCT, TYPE_BASE, TYPE_ENUM, TYPE_UNION,
@@ -150,10 +141,7 @@ protected:
bool ReadNamesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm );
virtual void ReadAttributesSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteAttributesSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteContextSvIdl( SvIdlDataBase &, SvStream & rOutStm,
- sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
@@ -161,10 +149,8 @@ protected:
virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0 ) SAL_OVERRIDE;
bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
- void WriteHeaderSvIdl( SvIdlDataBase &, SvStream & rOutStm,
- sal_uInt16 nTab );
public:
- SV_DECL_META_FACTORY1( SvMetaType, SvMetaExtern, 18 )
+ TYPEINFO_OVERRIDE();
SvMetaType();
SvMetaType( const OString& rTypeName, char cParserChar,
const OString& rCName );
@@ -219,8 +205,6 @@ public:
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0 ) SAL_OVERRIDE;
OString GetCString() const;
@@ -239,33 +223,31 @@ public:
const OString& rChief );
};
-class SvMetaTypeMemberList : public SvDeclPersistList<SvMetaType *> {};
+class SvMetaTypeMemberList : public SvRefMemberList<SvMetaType *> {};
class SvMetaTypeString : public SvMetaType
{
public:
- SV_DECL_META_FACTORY1( SvMetaTypeString, SvMetaType, 19 )
+ TYPEINFO_OVERRIDE();
SvMetaTypeString();
};
typedef tools::SvRef<SvMetaTypeString> SvMetaTypeStringRef;
-class SvMetaTypeStringMemberList : public SvDeclPersistList<SvMetaTypeString *> {};
+class SvMetaTypeStringMemberList : public SvRefMemberList<SvMetaTypeString *> {};
class SvMetaEnumValue : public SvMetaName
{
- OString aEnumValue;
public:
- SV_DECL_META_FACTORY1( SvMetaEnumValue, SvMetaName, 20 )
+ TYPEINFO_OVERRIDE();
SvMetaEnumValue();
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0 ) SAL_OVERRIDE;
};
typedef tools::SvRef<SvMetaEnumValue> SvMetaEnumValueRef;
-class SvMetaEnumValueMemberList : public SvDeclPersistList<SvMetaEnumValue *> {};
+class SvMetaEnumValueMemberList : public SvRefMemberList<SvMetaEnumValue *> {};
class SvMetaTypeEnum : public SvMetaType
{
@@ -273,12 +255,10 @@ class SvMetaTypeEnum : public SvMetaType
OString aPrefix;
protected:
virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteContextSvIdl( SvIdlDataBase &, SvStream & rOutStm,
- sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab,
WriteType, WriteAttribute = 0 ) SAL_OVERRIDE;
public:
- SV_DECL_META_FACTORY1( SvMetaTypeEnum, SvMetaType, 21 )
+ TYPEINFO_OVERRIDE();
SvMetaTypeEnum();
sal_uInt16 GetMaxValue() const;
@@ -288,7 +268,6 @@ public:
{ return aEnumValueList[n]; }
virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE;
- virtual void WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab ) SAL_OVERRIDE;
virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
@@ -296,16 +275,16 @@ public:
};
typedef tools::SvRef<SvMetaTypeEnum> SvMetaTypeEnumRef;
-class SvMetaTypeEnumMemberList : public SvDeclPersistList<SvMetaTypeEnum *> {};
+class SvMetaTypeEnumMemberList : public SvRefMemberList<SvMetaTypeEnum *> {};
class SvMetaTypevoid : public SvMetaType
{
public:
- SV_DECL_META_FACTORY1( SvMetaTypevoid, SvMetaName, 22 )
+ TYPEINFO_OVERRIDE();
SvMetaTypevoid();
};
typedef tools::SvRef<SvMetaTypevoid> SvMetaTypevoidRef;
-class SvMetaTypevoidMemberList : public SvDeclPersistList<SvMetaTypevoid *> {};
+class SvMetaTypevoidMemberList : public SvRefMemberList<SvMetaTypevoid *> {};
#endif // INCLUDED_IDL_INC_TYPES_HXX
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 9cb4f358b38c..38dcd296a34d 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -28,19 +28,11 @@
#include <globals.hxx>
#include <database.hxx>
-SV_IMPL_META_FACTORY1( SvMetaObject, SvRttiBase )
+TYPEINIT1( SvMetaObject, SvRttiBase )
SvMetaObject::SvMetaObject()
{
}
-void SvMetaObject::Load( SvPersistStream & )
-{
-}
-
-void SvMetaObject::Save( SvPersistStream & )
-{
-}
-
void SvMetaObject::WriteTab( SvStream & rOutStm, sal_uInt16 nTab )
{
while( nTab-- )
@@ -101,57 +93,16 @@ bool SvMetaObject::ReadSvIdl( SvIdlDataBase &, SvTokenStream & )
return false;
}
-void SvMetaObject::WriteSvIdl( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */ )
-{
-}
-
void SvMetaObject::Write( SvIdlDataBase &, SvStream &, sal_uInt16 /*nTab */,
WriteType, WriteAttribute )
{
}
-SV_IMPL_META_FACTORY1( SvMetaName, SvMetaObject );
+TYPEINIT1( SvMetaName, SvMetaObject );
SvMetaName::SvMetaName()
{
}
-void SvMetaName::Load( SvPersistStream & rStm )
-{
- SvMetaObject::Load( rStm );
- sal_uInt8 nMask;
- rStm.ReadUChar( nMask );
-
- if( nMask >= 0x20 )
- {
- rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- OSL_FAIL( "wrong format" );
- return;
- }
- if( nMask & 0x01 ) rStm >> aName;
- if( nMask & 0x02 ) rStm >> aHelpContext;
- if( nMask & 0x04 ) rStm >> aHelpText;
- if( nMask & 0x08 ) rStm >> aConfigName;
- if( nMask & 0x10 ) rStm >> aDescription;
-}
-
-void SvMetaName::Save( SvPersistStream & rStm )
-{
- SvMetaObject::Save( rStm );
- sal_uInt8 nMask = 0;
- if( aName.IsSet() ) nMask |= 0x01;
- if( aHelpContext.IsSet() ) nMask |= 0x02;
- if( aHelpText.IsSet() ) nMask |= 0x04;
- if( aConfigName.IsSet() ) nMask |= 0x08;
- if( aDescription.IsSet() ) nMask |= 0x10;
-
- rStm.WriteUChar( nMask );
- if( nMask & 0x01 ) WriteSvString( rStm, aName );
- if( nMask & 0x02 ) WriteSvNumberIdentifier( rStm, aHelpContext );
- if( nMask & 0x04 ) WriteSvString( rStm, aHelpText );
- if( nMask & 0x08 ) WriteSvString( rStm, aConfigName );
- if( nMask & 0x10 ) WriteSvString( rStm, aDescription );
-}
-
bool SvMetaName::SetName( const OString& rName, SvIdlDataBase * )
{
aName.setString(rName);
@@ -213,10 +164,6 @@ bool SvMetaName::Test( SvIdlDataBase &, SvTokenStream & )
return true;
}
-void SvMetaName::WriteContextSvIdl( SvIdlDataBase &, SvStream &, sal_uInt16 )
-{
-}
-
void SvMetaName::WriteDescription( SvStream & rOutStm )
{
rOutStm.WriteCharPtr( "<DESCRIPTION>" ) << endl;
@@ -234,35 +181,6 @@ void SvMetaName::WriteDescription( SvStream & rOutStm )
rOutStm.WriteCharPtr( "</DESCRIPTION>" ) << endl;
}
-void SvMetaName::WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- if( aHelpContext.IsSet() || aHelpText.IsSet() || aConfigName.IsSet() )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "// class SvMetaName" ) << endl;
- }
- if( aHelpContext.IsSet() )
- {
- WriteTab( rOutStm, nTab );
- aHelpContext.WriteSvIdl( SvHash_HelpContext(), rOutStm, nTab );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( aHelpText.IsSet() )
- {
- WriteTab( rOutStm, nTab );
- aHelpText.WriteSvIdl( rBase, rOutStm, nTab );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( aConfigName.IsSet() )
- {
- WriteTab( rOutStm, nTab );
- aConfigName.WriteSvIdl( SvHash_ConfigName(), rOutStm, nTab );
- rOutStm.WriteChar( ';' ) << endl;
- }
-}
-
bool SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
@@ -293,43 +211,6 @@ bool SvMetaName::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
return bOk;
}
-void SvMetaName::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- sal_uLong nBeginPos = rOutStm.Tell();
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( '[' ) << endl;
- sal_uLong nOldPos = rOutStm.Tell();
- WriteAttributesSvIdl( rBase, rOutStm, nTab +1 );
-
- // write no empty brackets
- if( TestAndSeekSpaceOnly( rOutStm, nOldPos ) )
- // nothing written
- rOutStm.Seek( nBeginPos );
- else
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( ']' );
- nBeginPos = rOutStm.Tell();
- rOutStm << endl;
- }
-
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( '{' ) << endl;
- nOldPos = rOutStm.Tell();
- WriteContextSvIdl( rBase, rOutStm, nTab +1 );
-
- // write no empty brackets
- if( TestAndSeekSpaceOnly( rOutStm, nOldPos ) )
- // nothing written
- rOutStm.Seek( nBeginPos );
- else
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( '}' );
- }
-}
-
void SvMetaName::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
WriteType nT, WriteAttribute nA )
@@ -391,47 +272,13 @@ void SvMetaName::WriteContext( SvIdlDataBase &, SvStream &,
{
}
-SV_IMPL_META_FACTORY1( SvMetaReference, SvMetaName );
+TYPEINIT1( SvMetaReference, SvMetaName );
SvMetaReference::SvMetaReference()
{
}
-void SvMetaReference::Load( SvPersistStream & rStm )
-{
- SvMetaName::Load( rStm );
-
- sal_uInt8 nMask;
- rStm.ReadUChar( nMask );
- if( nMask >= 0x2 )
- {
- rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- OSL_FAIL( "wrong format" );
- return;
- }
- if( nMask & 0x01 )
- {
- SvMetaReference * pRef;
- rStm >> pRef;
- aRef = pRef;
- }
-}
-
-void SvMetaReference::Save( SvPersistStream & rStm )
-{
- SvMetaName::Save( rStm );
-
- // create mask
- sal_uInt8 nMask = 0;
- if( aRef.Is() )
- nMask |= 0x01;
-
- // write data
- rStm.WriteUChar( nMask );
- if( nMask & 0x01 ) WriteSvPersistBase( rStm, aRef );
-}
-
-SV_IMPL_META_FACTORY1( SvMetaExtern, SvMetaReference );
+TYPEINIT1( SvMetaExtern, SvMetaReference );
SvMetaExtern::SvMetaExtern()
: pModule( NULL )
@@ -440,44 +287,6 @@ SvMetaExtern::SvMetaExtern()
{
}
-void SvMetaExtern::Load( SvPersistStream & rStm )
-{
- SvMetaReference::Load( rStm );
-
- sal_uInt8 nMask;
- rStm.ReadUChar( nMask );
- if( nMask >= 0x20 )
- {
- rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- OSL_FAIL( "wrong format" );
- return;
- }
- if( nMask & 0x01 ) rStm >> pModule;
- if( nMask & 0x02 ) rStm >> aUUId;
- if( nMask & 0x04 ) rStm >> aVersion;
- if( nMask & 0x08 ) bReadUUId = true;
- if( nMask & 0x10 ) bReadVersion = true;
-}
-
-void SvMetaExtern::Save( SvPersistStream & rStm )
-{
- SvMetaReference::Save( rStm );
-
- // create mask
- sal_uInt8 nMask = 0;
- if( pModule ) nMask |= 0x01;
- if( aUUId != SvGlobalName() ) nMask |= 0x02;
- if( aVersion != SvVersion() ) nMask |= 0x04;
- if( bReadUUId ) nMask |= 0x08;
- if( bReadVersion ) nMask |= 0x10;
-
- // write data
- rStm.WriteUChar( nMask );
- if( nMask & 0x01 ) WriteSvPersistBase( rStm, pModule );
- if( nMask & 0x02 ) WriteSvGlobalName( rStm, aUUId );
- if( nMask & 0x04 ) WriteSvVersion( rStm, aVersion );
-}
-
SvMetaModule * SvMetaExtern::GetModule() const
{
DBG_ASSERT( pModule != NULL, "module not set" );
@@ -506,30 +315,6 @@ void SvMetaExtern::ReadAttributesSvIdl( SvIdlDataBase & rBase,
bReadVersion = true;
}
-void SvMetaExtern::WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab )
-{
- SvMetaReference::WriteAttributesSvIdl( rBase, rOutStm, nTab );
- if( bReadUUId || bReadVersion )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "// class SvMetaExtern" ) << endl;
-
- if( bReadUUId )
- {
- WriteTab( rOutStm, nTab );
- aUUId.WriteSvIdl( rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( bReadVersion )
- {
- WriteTab( rOutStm, nTab );
- aVersion.WriteSvIdl( rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- }
-}
-
bool SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
{
SetModule( rBase );
@@ -537,12 +322,6 @@ bool SvMetaExtern::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
return SvMetaReference::ReadSvIdl( rBase, rInStm );
}
-void SvMetaExtern::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- SvMetaReference::WriteSvIdl( rBase, rOutStm, nTab );
-}
-
void SvMetaExtern::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
WriteType nT, WriteAttribute nA )
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index 6619be682015..a42e7ca7d813 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -157,15 +157,6 @@ bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
return false;
}
-bool SvBOOL::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm )
-{
- if( nVal )
- rOutStm.WriteCharPtr( pName->GetName().getStr() );
- else
- rOutStm.WriteCharPtr( pName->GetName().getStr() ).WriteCharPtr( "(FALSE)" );
- return true;
-}
-
OString SvBOOL::GetSvIdlString( SvStringHashEntry * pName )
{
if( nVal )
@@ -203,15 +194,6 @@ bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm
return false;
}
-bool SvIdentifier::WriteSvIdl( SvStringHashEntry * pName,
- SvStream & rOutStm,
- sal_uInt16 /*nTab */ )
-{
- rOutStm.WriteCharPtr( pName->GetName().getStr() ).WriteChar( '(' );
- rOutStm.WriteCharPtr( getString().getStr() ).WriteChar( ')' );
- return true;
-}
-
SvStream& WriteSvIdentifier(SvStream & rStm, const SvIdentifier & r )
{
write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, r.getString());
@@ -317,14 +299,6 @@ bool SvString::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm )
return false;
}
-bool SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
- sal_uInt16 /*nTab */ )
-{
- rOutStm.WriteCharPtr( pName->GetName().getStr() ).WriteCharPtr( "(\"" );
- rOutStm.WriteCharPtr( m_aStr.getStr() ).WriteCharPtr( "\")" );
- return true;
-}
-
SvStream& WriteSvString(SvStream & rStm, const SvString & r )
{
write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, r.getString());
@@ -343,11 +317,6 @@ bool SvHelpText::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
return SvString::ReadSvIdl( SvHash_HelpText(), rInStm );
}
-bool SvHelpText::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 nTab )
-{
- return SvString::WriteSvIdl( SvHash_HelpText(), rOutStm, nTab );
-}
-
bool SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
{
sal_uInt32 nTokPos = rInStm.Tell();
@@ -375,15 +344,6 @@ bool SvUUId::ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm )
return false;
}
-bool SvUUId::WriteSvIdl( SvStream & rOutStm )
-{
- // write global id
- rOutStm.WriteCharPtr( SvHash_uuid()->GetName().getStr() ).WriteCharPtr( "(\"" );
- rOutStm.WriteCharPtr( OUStringToOString(GetHexName(), RTL_TEXTENCODING_UTF8).getStr() ).WriteCharPtr( "\")" );
- return true;
-}
-
-
bool SvVersion::ReadSvIdl( SvTokenStream & rInStm )
{
sal_uLong n = 0;
@@ -408,14 +368,4 @@ bool SvVersion::ReadSvIdl( SvTokenStream & rInStm )
return false;
}
-bool SvVersion::WriteSvIdl( SvStream & rOutStm )
-{
- rOutStm.WriteCharPtr( SvHash_Version()->GetName().getStr() ).WriteChar( '(' )
- .WriteCharPtr( OString::number(nMajorVersion).getStr() )
- .WriteChar( '.' )
- .WriteCharPtr( OString::number(nMinorVersion).getStr() )
- .WriteChar( ')' );
- return true;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index ebd369b42c89..836d70f57035 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -27,7 +27,7 @@
#include <tools/debug.hxx>
#include <osl/file.hxx>
-SV_IMPL_META_FACTORY1( SvMetaModule, SvMetaExtern );
+TYPEINIT1( SvMetaModule, SvMetaExtern );
SvMetaModule::SvMetaModule()
: bImported( false )
@@ -41,65 +41,6 @@ SvMetaModule::SvMetaModule( const OUString & rIdlFileName, bool bImp )
{
}
-#define MODULE_VER 0x0001
-void SvMetaModule::Load( SvPersistStream & rStm )
-{
- bImported = true; // import always
- SvMetaExtern::Load( rStm );
-
- sal_uInt16 nVer;
-
- rStm.ReadUInt16( nVer ); // version
- DBG_ASSERT( (nVer & ~IDL_WRITE_MASK) == MODULE_VER, "false version" );
-
- rStm >> aClassList;
- rStm >> aTypeList;
- rStm >> aAttrList;
- // browser
- aIdlFileName = rStm.ReadUniOrByteString( rStm.GetStreamCharSet() );
- aHelpFileName.setString(read_uInt16_lenPrefixed_uInt8s_ToOString(rStm));
- aSlotIdFile.setString(read_uInt16_lenPrefixed_uInt8s_ToOString(rStm));
- aModulePrefix.setString(read_uInt16_lenPrefixed_uInt8s_ToOString(rStm));
-
- // read compiler data
- sal_uInt16 nCmpLen;
- rStm.ReadUInt16( nCmpLen );
- DBG_ASSERT( (nVer & IDL_WRITE_MASK) == IDL_WRITE_COMPILER,
- "no idl compiler format" );
- rStm >> aBeginName;
- rStm >> aEndName;
- rStm >> aNextName;
-}
-
-void SvMetaModule::Save( SvPersistStream & rStm )
-{
- SvMetaExtern::Save( rStm );
-
- rStm.WriteUInt16( (MODULE_VER | IDL_WRITE_COMPILER) ); // Version
-
- WriteSvDeclPersistList( rStm, aClassList );
- WriteSvDeclPersistList( rStm, aTypeList );
- WriteSvDeclPersistList( rStm, aAttrList );
- // browser
- rStm.WriteUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
- write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aHelpFileName.getString());
- write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aSlotIdFile.getString());
- write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aModulePrefix.getString());
-
- // write compiler data
- sal_uInt16 nCmpLen = 0;
- sal_uLong nLenPos = rStm.Tell();
- rStm.WriteUInt16( nCmpLen );
- WriteSvGlobalName( rStm, aBeginName );
- WriteSvGlobalName( rStm, aEndName );
- WriteSvGlobalName( rStm, aNextName );
- // write length of compiler data
- sal_uLong nPos = rStm.Tell();
- rStm.Seek( nLenPos );
- rStm.WriteUInt16( ( nPos - nLenPos - sizeof( sal_uInt16 ) ) );
- rStm.Seek( nPos );
-}
-
bool SvMetaModule::SetName( const OString& rName, SvIdlDataBase * pBase )
{
if( pBase )
@@ -146,34 +87,6 @@ void SvMetaModule::ReadAttributesSvIdl( SvIdlDataBase & rBase,
aModulePrefix.ReadSvIdl( SvHash_ModulePrefix(), rInStm );
}
-void SvMetaModule::WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
- if( !aHelpFileName.getString().isEmpty() || !aSlotIdFile.getString().isEmpty() || !aTypeLibFile.getString().isEmpty() )
- {
- if( !aHelpFileName.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- aHelpFileName.WriteSvIdl( SvHash_HelpFile(), rOutStm, nTab +1 );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( !aSlotIdFile.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- aSlotIdFile.WriteSvIdl( SvHash_SlotIdFile(), rOutStm, nTab +1 );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( !aTypeLibFile.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- aTypeLibFile.WriteSvIdl( SvHash_TypeLibFile(), rOutStm, nTab +1 );
- rOutStm.WriteChar( ';' ) << endl;
- }
- }
-}
-
void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -288,31 +201,6 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
}
}
-void SvMetaModule::WriteContextSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- SvMetaExtern::WriteContextSvIdl( rBase, rOutStm, nTab );
- sal_uLong n;
- for( n = 0; n < aTypeList.size(); n++ )
- {
- WriteTab( rOutStm, nTab );
- aTypeList[n]->WriteSvIdl( rBase, rOutStm, nTab );
- }
- rOutStm << endl;
- for( n = 0; n < aAttrList.size(); n++ )
- {
- WriteTab( rOutStm, nTab );
- aAttrList[n]->WriteSvIdl( rBase, rOutStm, nTab );
- }
- rOutStm << endl;
- for( n = 0; n < aClassList.size(); n++ )
- {
- WriteTab( rOutStm, nTab );
- aClassList[n]->WriteSvIdl( rBase, rOutStm, nTab );
- }
-}
-
bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
{
bIsModified = true; // up to now always when compiler running
@@ -353,19 +241,6 @@ bool SvMetaModule::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
return bOk;
}
-void SvMetaModule::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- rOutStm.WriteCharPtr( SvHash_module()->GetName().getStr() ) << endl;
- rOutStm.WriteChar( '\"' );
- rOutStm.WriteUniOrByteString( aBeginName.GetHexName(), rOutStm.GetStreamCharSet() );
- rOutStm.WriteChar( '\"' ) << endl;
- rOutStm.WriteChar( '\"' );
- rOutStm.WriteUniOrByteString( aEndName.GetHexName(), rOutStm.GetStreamCharSet() );
- rOutStm.WriteChar( '\"' ) << endl;
- SvMetaExtern::WriteSvIdl( rBase, rOutStm, nTab );
-}
-
void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
{
for( sal_uLong n = 0; n < aClassList.size(); n++ )
@@ -375,16 +250,6 @@ void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
}
}
-void SvMetaModule::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
- HelpIdTable& rTable )
-{
- for( sal_uLong n = 0; n < aClassList.size(); n++ )
- {
- SvMetaClass * pClass = aClassList[n];
- pClass->WriteHelpIds( rBase, rOutStm, rTable );
- }
-}
-
void SvMetaModule::WriteAttributes( SvIdlDataBase & rBase,
SvStream & rOutStm,
sal_uInt16 nTab,
@@ -406,82 +271,6 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
{
switch ( nT )
{
- case WRITE_ODL:
- {
- if( !aSlotIdFile.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "#include \"" ).WriteCharPtr( aSlotIdFile.getString().getStr() ).WriteChar( '"' ) << endl << endl;
- }
- SvMetaExtern::Write( rBase, rOutStm, nTab, nT, nA );
- rOutStm << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "library " ).WriteCharPtr( GetName().getString().getStr() ) << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( '{' ) << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "importlib(\"STDOLE.TLB\");" ) << endl;
-
- for( sal_uLong n = 0; n < aClassList.size(); n++ )
- {
- SvMetaClass * pClass = aClassList[n];
- if( !pClass->IsShell() && pClass->GetAutomation() )
- {
- WriteTab( rOutStm, nTab );
- WriteStars( rOutStm );
- pClass->Write( rBase, rOutStm, nTab +1, nT, nA );
- if( n +1 < aClassList.size() )
- rOutStm << endl;
- }
- }
-
- rOutStm.WriteChar( '}' ) << endl;
- }
- break;
- case WRITE_DOCU:
- {
- rOutStm.WriteCharPtr( "SvIDL interface documentation" ) << endl << endl;
- rOutStm.WriteCharPtr( "<MODULE>" ) << endl;
- rOutStm.WriteCharPtr( GetName().getString().getStr() ) << endl;
- WriteDescription( rOutStm );
- rOutStm.WriteCharPtr( "</MODULE>" ) << endl << endl;
-
- rOutStm.WriteCharPtr( "<CLASSES>" ) << endl;
- for( sal_uLong n = 0; n < aClassList.size(); n++ )
- {
- SvMetaClass * pClass = aClassList[n];
- if( !pClass->IsShell() )
- {
- rOutStm.WriteCharPtr( pClass->GetName().getString().getStr() );
- SvMetaClass* pSC = pClass->GetSuperClass();
- if( pSC )
- rOutStm.WriteCharPtr( " : " ).WriteCharPtr( pSC->GetName().getString().getStr() );
-
- // imported classes
- const SvClassElementMemberList& rClassList = pClass->GetClassList();
- if ( !rClassList.empty() )
- {
- rOutStm.WriteCharPtr( " ( " );
-
- for( sal_uLong m=0; m<rClassList.size(); ++m )
- {
- SvClassElement *pEle = rClassList[m];
- SvMetaClass *pCl = pEle->GetClass();
- rOutStm.WriteCharPtr( pCl->GetName().getString().getStr() );
- if ( m+1 == rClassList.size() )
- rOutStm.WriteCharPtr( " )" );
- else
- rOutStm.WriteCharPtr( " , " );
- }
- }
-
- rOutStm << endl;
- }
- }
- rOutStm.WriteCharPtr( "</CLASSES>" ) << endl << endl;
- // no break!
- }
-
case WRITE_C_SOURCE:
case WRITE_C_HEADER:
{
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 6609031e4b62..15ad67d40686 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -27,103 +27,18 @@
#include <globals.hxx>
#include <database.hxx>
-SV_IMPL_PERSIST1( SvClassElement, SvPersistBase );
+TYPEINIT1( SvClassElement, SvPersistBase );
SvClassElement::SvClassElement()
{
};
-void SvClassElement::Load( SvPersistStream & rStm )
-{
- sal_uInt8 nMask;
- rStm.ReadUChar( nMask );
- if( nMask >= 0x08 )
- {
- rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- OSL_FAIL( "wrong format" );
- return;
- }
- if( nMask & 0x01 ) rStm >> aAutomation;
- if( nMask & 0x02 ) aPrefix = read_uInt16_lenPrefixed_uInt8s_ToOString(rStm);
- if( nMask & 0x04 )
- {
- SvMetaClass * p;
- rStm >> p;
- xClass = p;
- }
-}
-
-void SvClassElement::Save( SvPersistStream & rStm )
-{
- // create mask
- sal_uInt8 nMask = 0;
- if( aAutomation.IsSet() ) nMask |= 0x1;
- if( !aPrefix.isEmpty() ) nMask |= 0x2;
- if( xClass.Is() ) nMask |= 0x4;
-
- // write data
- rStm.WriteUChar( nMask );
- if( nMask & 0x01 ) rStm.WriteUChar( aAutomation );
- if( nMask & 0x02 ) write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aPrefix);
- if( nMask & 0x04 ) WriteSvPersistBase( rStm, xClass );
-}
-
-SV_IMPL_META_FACTORY1( SvMetaClass, SvMetaType );
+TYPEINIT1( SvMetaClass, SvMetaType );
SvMetaClass::SvMetaClass()
: aAutomation( true, false )
{
}
-void SvMetaClass::Load( SvPersistStream & rStm )
-{
- SvMetaType::Load( rStm );
-
- sal_uInt8 nMask;
- rStm.ReadUChar( nMask );
- if( nMask >= 0x20 )
- {
- rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- OSL_FAIL( "wrong format" );
- return;
- }
- if( nMask & 0x01 ) rStm >> aAttrList;
- if( nMask & 0x02 )
- {
- SvMetaClass * pSuper;
- rStm >> pSuper;
- aSuperClass = pSuper;
- }
- if( nMask & 0x04 ) rStm >> aClassList;
- if( nMask & 0x8 )
- {
- SvMetaClass * p;
- rStm >> p;
- xAutomationInterface = p;
- }
- if( nMask & 0x10 ) rStm >> aAutomation;
-}
-
-void SvMetaClass::Save( SvPersistStream & rStm )
-{
- SvMetaType::Save( rStm );
-
- // create mask
- sal_uInt8 nMask = 0;
- if( !aAttrList.empty() ) nMask |= 0x1;
- if( aSuperClass.Is() ) nMask |= 0x2;
- if( !aClassList.empty() ) nMask |= 0x4;
- if( xAutomationInterface.Is() ) nMask |= 0x8;
- if( aAutomation.IsSet() ) nMask |= 0x10;
-
- // write data
- rStm.WriteUChar( nMask );
- if( nMask & 0x01 ) WriteSvDeclPersistList( rStm, aAttrList );
- if( nMask & 0x02 ) WriteSvPersistBase( rStm, aSuperClass );
- if( nMask & 0x04 ) WriteSvDeclPersistList( rStm, aClassList );
- if( nMask & 0x08 ) WriteSvPersistBase( rStm, xAutomationInterface );
- if( nMask & 0x10 ) rStm.WriteUChar( aAutomation );
-}
-
void SvMetaClass::ReadAttributesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -131,24 +46,6 @@ void SvMetaClass::ReadAttributesSvIdl( SvIdlDataBase & rBase,
aAutomation.ReadSvIdl( SvHash_Automation(), rInStm );
}
-void SvMetaClass::WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm, sal_uInt16 nTab )
-{
- SvMetaType::WriteAttributesSvIdl( rBase, rOutStm, nTab );
-
- if( !aAutomation )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "//class SvMetaClass" ) << endl;
- if( !aAutomation )
- {
- WriteTab( rOutStm, nTab );
- aAutomation.WriteSvIdl( SvHash_Automation(), rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- }
-}
-
void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -248,35 +145,6 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
rInStm.Seek( nTokPos );
}
-void SvMetaClass::WriteContextSvIdl
-(
- SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab
-)
-{
- sal_uLong n;
- for( n = 0; n < aAttrList.size(); n++ )
- {
- WriteTab( rOutStm, nTab );
- aAttrList[n]->WriteSvIdl( rBase, rOutStm, nTab );
- rOutStm.WriteChar( ';' ) << endl;
- }
- for( n = 0; n < aClassList.size(); n++ )
- {
- SvClassElement * pEle = aClassList[n];
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( SvHash_import()->GetName().getStr() ).WriteChar( ' ' )
- .WriteCharPtr( pEle->GetPrefix().getStr() );
- if( pEle->GetAutomation() )
- rOutStm.WriteCharPtr( " [ " ).WriteCharPtr( SvHash_Automation()->GetName().getStr() )
- .WriteCharPtr( " ]" );
- if( !pEle->GetPrefix().isEmpty() )
- rOutStm.WriteChar( ' ' ).WriteCharPtr( pEle->GetPrefix().getStr() );
- rOutStm.WriteChar( ';' ) << endl;
- }
-}
-
bool SvMetaClass::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
{
sal_uLong nTokPos = rInStm.Tell();
@@ -365,62 +233,19 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
return true;
}
-void SvMetaClass::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- WriteHeaderSvIdl( rBase, rOutStm, nTab );
- if( aSuperClass.Is() )
- rOutStm.WriteCharPtr( " : " ).WriteCharPtr( aSuperClass->GetName().getString().getStr() );
- rOutStm << endl;
- SvMetaName::WriteSvIdl( rBase, rOutStm, nTab );
- rOutStm << endl;
-}
-
-void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
+void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream &,
+ sal_uInt16,
WriteType nT, WriteAttribute )
{
rBase.aIFaceName = GetName().getString();
switch( nT )
{
- case WRITE_ODL:
- {
- OSL_FAIL( "Not supported anymore!" );
- break;
- }
case WRITE_C_SOURCE:
case WRITE_C_HEADER:
{
OSL_FAIL( "Not supported anymore!" );
break;
}
- case WRITE_DOCU:
- {
- rOutStm.WriteCharPtr( "<INTERFACE>" ) << endl;
- rOutStm.WriteCharPtr( GetName().getString().getStr() );
- if ( GetAutomation() )
- rOutStm.WriteCharPtr( " ( Automation ) " );
- rOutStm << endl;
- WriteDescription( rOutStm );
- rOutStm.WriteCharPtr( "</INTERFACE>" ) << endl << endl;
-
- // write all attributes
- sal_uLong n;
- for( n = 0; n < aAttrList.size(); n++ )
- {
- SvMetaAttribute * pAttr = aAttrList[n];
- if( !pAttr->GetHidden() )
- {
- if( pAttr->IsMethod() )
- pAttr->Write( rBase, rOutStm, nTab, nT, WA_METHOD );
-
- if( pAttr->IsVariable() )
- pAttr->Write( rBase, rOutStm, nTab, nT, WA_VARIABLE );
- }
- }
-
- break;
- }
default:
break;
}
@@ -644,14 +469,4 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
aSlotList.clear();
}
-void SvMetaClass::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
- HelpIdTable& rTable )
-{
- for( sal_uLong n=0; n<aAttrList.size(); n++ )
- {
- SvMetaAttribute * pAttr = aAttrList[n];
- pAttr->WriteHelpId( rBase, rOutStm, rTable );
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 759611052ae3..84afe2dc7ca0 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -26,7 +26,7 @@
#include <globals.hxx>
#include <database.hxx>
-SV_IMPL_META_FACTORY1( SvMetaSlot, SvMetaAttribute );
+TYPEINIT1( SvMetaSlot, SvMetaAttribute );
SvMetaObject *SvMetaSlot::MakeClone() const
{
@@ -58,229 +58,6 @@ SvMetaSlot::SvMetaSlot( SvMetaType * pType )
{
}
-#define TEST_READ
-#define TEST_WRITE
-
-void SvMetaSlot::Load( SvPersistStream & rStm )
-{
- SvMetaAttribute::Load( rStm );
-
- sal_uInt16 nMask;
- rStm.ReadUInt16( nMask );
-
- TEST_READ
- if( nMask & 0x0001 )
- {
- SvMetaAttribute * pMeth;
- rStm >> pMeth;
- aMethod = pMeth;
- }
-
- TEST_READ
- if( nMask & 0x0002 ) rStm >> aGroupId;
- TEST_READ
- if( nMask & 0x0004 ) rStm >> aHasCoreId;
- TEST_READ
- if( nMask & 0x0008 ) rStm >> aConfigId;
- TEST_READ
- if( nMask & 0x0010 ) rStm >> aExecMethod;
- TEST_READ
- if( nMask & 0x0020 ) rStm >> aStateMethod;
- TEST_READ
- if( nMask & 0x0040 ) rStm >> aDefault;
- TEST_READ
- if( nMask & 0x0080 ) rStm >> aPseudoSlots;
- TEST_READ
- if( nMask & 0x0100 ) rStm >> aGet;
- TEST_READ
- if( nMask & 0x0200 ) rStm >> aSet;
- TEST_READ
- if( nMask & 0x0400 ) rStm >> aCachable;
- TEST_READ
- if( nMask & 0x0800 ) rStm >> aVolatile;
- TEST_READ
- if( nMask & 0x1000 ) rStm >> aToggle;
- TEST_READ
- if( nMask & 0x2000 ) rStm >> aAutoUpdate;
- TEST_READ
- if( nMask & 0x4000 ) rStm >> aSynchron;
- TEST_READ
- if( nMask & 0x8000 ) rStm >> aAsynchron;
-
- nMask = 0;
- rStm.ReadUInt16( nMask );
-
- TEST_READ
- if( nMask & 0x0001 ) rStm >> aRecordPerItem;
- TEST_READ
- if( nMask & 0x0002 ) rStm >> aRecordManual;
- TEST_READ
- if( nMask & 0x0004 ) rStm >> aNoRecord;
- TEST_READ
- if( nMask & 0x0008 ) rStm >> aHasDialog;
- TEST_READ
- if( nMask & 0x0010 ) rStm >> aDisableFlags;
- TEST_READ
- if( nMask & 0x0020 ) rStm >> aPseudoPrefix;
- TEST_READ
- if( nMask & 0x0040 ) rStm >> aRecordPerSet;
- TEST_READ
- if( nMask & 0x0080 ) rStm >> aMenuConfig;
- TEST_READ
- if( nMask & 0x0100 ) rStm >> aToolBoxConfig;
- TEST_READ
- if( nMask & 0x0200 ) rStm >> aStatusBarConfig;
- TEST_READ
- if( nMask & 0x0400 ) rStm >> aAccelConfig;
- TEST_READ
- if( nMask & 0x0800 ) rStm >> aFastCall;
- TEST_READ
- if( nMask & 0x1000 ) rStm >> aContainer;
- TEST_READ
-
- if( nMask & 0x2000 )
- {
- SvMetaType * pT;
- rStm >> pT;
- aSlotType = pT;
- }
-
- TEST_READ
- if( nMask & 0x4000 ) rStm >> aRecordAbsolute;
- TEST_READ
- if( nMask & 0x8000 ) rStm >> aImageRotation;
-
- nMask = 0;
- rStm.ReadUInt16( nMask );
-
- TEST_READ
- if( nMask & 0x0001 ) rStm >> aUnoName;
- if( nMask & 0x0002 ) rStm >> aImageReflection;
-}
-
-void SvMetaSlot::Save( SvPersistStream & rStm )
-{
- SvMetaAttribute::Save( rStm );
-
- // create mask
- sal_uInt16 nMask = 0;
- if( aMethod.Is() ) nMask |= 0x0001;
- if( !aGroupId.getString().isEmpty() ) nMask |= 0x0002;
- if( aHasCoreId.IsSet() ) nMask |= 0x0004;
- if( !aConfigId.getString().isEmpty() ) nMask |= 0x0008;
- if( !aExecMethod.getString().isEmpty() ) nMask |= 0x0010;
- if( !aStateMethod.getString().isEmpty() ) nMask |= 0x0020;
- if( !aDefault.getString().isEmpty() ) nMask |= 0x0040;
- if( aPseudoSlots.IsSet() ) nMask |= 0x0080;
- if( aGet.IsSet() ) nMask |= 0x0100;
- if( aSet.IsSet() ) nMask |= 0x0200;
- if( aCachable.IsSet() ) nMask |= 0x0400;
- if( aVolatile.IsSet() ) nMask |= 0x0800;
- if( aToggle.IsSet() ) nMask |= 0x1000;
- if( aAutoUpdate.IsSet() ) nMask |= 0x2000;
- if( aSynchron.IsSet() ) nMask |= 0x4000;
- if( aAsynchron.IsSet() ) nMask |= 0x8000;
-
- // write data
- rStm.WriteUInt16( nMask );
- TEST_WRITE
- if( nMask & 0x0001 ) WriteSvPersistBase( rStm, aMethod );
- TEST_WRITE
- if( nMask & 0x0002 ) WriteSvIdentifier( rStm, aGroupId );
- TEST_WRITE
- if( nMask & 0x0004 ) rStm.WriteUChar( aHasCoreId );
- TEST_WRITE
- if( nMask & 0x0008 ) WriteSvIdentifier( rStm, aConfigId );
- TEST_WRITE
- if( nMask & 0x0010 ) WriteSvIdentifier( rStm, aExecMethod );
- TEST_WRITE
- if( nMask & 0x0020 ) WriteSvIdentifier( rStm, aStateMethod );
- TEST_WRITE
- if( nMask & 0x0040 ) WriteSvIdentifier( rStm, aDefault );
- TEST_WRITE
- if( nMask & 0x0080 ) rStm.WriteUChar( aPseudoSlots );
- TEST_WRITE
- if( nMask & 0x0100 ) rStm.WriteUChar( aGet );
- TEST_WRITE
- if( nMask & 0x0200 ) rStm.WriteUChar( aSet );
- TEST_WRITE
- if( nMask & 0x0400 ) rStm.WriteUChar( aCachable );
- TEST_WRITE
- if( nMask & 0x0800 ) rStm.WriteUChar( aVolatile );
- TEST_WRITE
- if( nMask & 0x1000 ) rStm.WriteUChar( aToggle );
- TEST_WRITE
- if( nMask & 0x2000 ) rStm.WriteUChar( aAutoUpdate );
- TEST_WRITE
- if( nMask & 0x4000 ) rStm.WriteUChar( aSynchron );
- TEST_WRITE
- if( nMask & 0x8000 ) rStm.WriteUChar( aAsynchron );
-
- // write next bunch
- // create mask
- nMask = 0;
- if( aRecordPerItem.IsSet() ) nMask |= 0x0001;
- if( aRecordManual.IsSet() ) nMask |= 0x0002;
- if( aNoRecord.IsSet() ) nMask |= 0x0004;
- if( aHasDialog.IsSet() ) nMask |= 0x0008;
- if ( aDisableFlags.IsSet() ) nMask |= 0x0010;
- if( !aPseudoPrefix.getString().isEmpty() ) nMask |= 0x0020;
- if( aRecordPerSet.IsSet() ) nMask |= 0x0040;
- if( aMenuConfig.IsSet() ) nMask |= 0x0080;
- if( aToolBoxConfig.IsSet() ) nMask |= 0x0100;
- if( aStatusBarConfig.IsSet() )nMask |= 0x0200;
- if( aAccelConfig.IsSet() ) nMask |= 0x0400;
- if( aFastCall.IsSet() ) nMask |= 0x0800;
- if( aContainer.IsSet() ) nMask |= 0x1000;
- if( aSlotType.Is() ) nMask |= 0x2000;
- if( aRecordAbsolute.IsSet() ) nMask |= 0x4000;
- if( aImageRotation.IsSet() ) nMask |= 0x8000;
-
- // write data
- rStm.WriteUInt16( nMask );
- TEST_WRITE
- if( nMask & 0x0001 ) rStm.WriteUChar( aRecordPerItem );
- TEST_WRITE
- if( nMask & 0x0002 ) rStm.WriteUChar( aRecordManual );
- TEST_WRITE
- if( nMask & 0x0004 ) rStm.WriteUChar( aNoRecord );
- TEST_WRITE
- if( nMask & 0x0008 ) rStm.WriteUChar( aHasDialog );
- TEST_WRITE
- if( nMask & 0x0010 ) WriteSvString( rStm, aDisableFlags );
- TEST_WRITE
- if( nMask & 0x0020 ) WriteSvIdentifier( rStm, aPseudoPrefix );
- TEST_WRITE
- if( nMask & 0x0040 ) rStm.WriteUChar( aRecordPerSet );
- TEST_WRITE
- if( nMask & 0x0080 ) rStm.WriteUChar( aMenuConfig );
- TEST_WRITE
- if( nMask & 0x0100 ) rStm.WriteUChar( aToolBoxConfig );
- TEST_WRITE
- if( nMask & 0x0200 ) rStm.WriteUChar( aStatusBarConfig );
- TEST_WRITE
- if( nMask & 0x0400 ) rStm.WriteUChar( aAccelConfig );
- TEST_WRITE
- if( nMask & 0x0800 ) rStm.WriteUChar( aFastCall );
- TEST_WRITE
- if( nMask & 0x1000 ) rStm.WriteUChar( aContainer );
- TEST_WRITE
- if( nMask & 0x2000 ) WriteSvPersistBase( rStm, aSlotType );
- TEST_WRITE
- if( nMask & 0x4000 ) rStm.WriteUChar( aRecordAbsolute );
- TEST_WRITE
- if( nMask & 0x8000 ) rStm.WriteUChar( aImageRotation );
-
- nMask = 0;
- if( aUnoName.IsSet() ) nMask |= 0x0001;
- if( aImageReflection.IsSet() ) nMask |= 0x0002;
- rStm.WriteUInt16( nMask );
- TEST_WRITE
- if( nMask & 0x0001 ) WriteSvString( rStm, aUnoName );
- TEST_WRITE
- if( nMask & 0x0002 ) rStm.WriteUChar( aImageReflection );
-}
-
bool SvMetaSlot::IsVariable() const
{
return SvMetaAttribute::IsVariable();
@@ -622,184 +399,6 @@ void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase,
}
}
-void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- SvMetaAttribute::WriteAttributesSvIdl( rBase, rOutStm, nTab );
-
- if( aSlotType.Is() )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( SvHash_SlotType()->GetName().getStr() ).WriteChar( '(' );
- aSlotType->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm.WriteCharPtr( ");" ) << endl;
- }
- if( aMethod.Is() )
- {
- WriteTab( rOutStm, nTab );
- aMethod->WriteSvIdl( rBase, rOutStm, nTab );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( aHasCoreId )
- {
- aHasCoreId.WriteSvIdl( SvHash_HasCoreId(), rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( !aGroupId.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- aGroupId.WriteSvIdl( SvHash_GroupId(), rOutStm, nTab +1);
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( !aExecMethod.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- aExecMethod.WriteSvIdl( SvHash_ExecMethod(), rOutStm, nTab +1);
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( !aStateMethod.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- aStateMethod.WriteSvIdl( SvHash_StateMethod(), rOutStm, nTab +1);
- rOutStm.WriteChar( ';' ) << endl;
- }
-
- if( !aDisableFlags.getString().isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- aDisableFlags.WriteSvIdl( SvHash_DisableFlags(), rOutStm, nTab +1);
- rOutStm.WriteChar( ';' ) << endl;
- }
-
- if( aSet || aGet || aPseudoSlots )
- {
- WriteTab( rOutStm, nTab );
- char const * p = "";
- if( aPseudoSlots )
- {
- aPseudoSlots.WriteSvIdl( SvHash_PseudoSlots(), rOutStm );
- p = ", ";
- }
- if( aGet )
- {
- rOutStm.WriteCharPtr( p );
- aGet.WriteSvIdl( SvHash_Get(), rOutStm );
- p = ", ";
- }
- if( aSet )
- {
- rOutStm.WriteCharPtr( p );
- aSet.WriteSvIdl( SvHash_Set(), rOutStm );
- }
- rOutStm.WriteChar( ';' ) << endl;
- }
-
- OString aDel(", ");
- OStringBuffer aOut;
- if( aVolatile )
- aOut.append(aVolatile.GetSvIdlString( SvHash_Volatile() ));
- else if( !aCachable )
- // because of Default == TRUE, only when no other is set
- aOut.append(aCachable.GetSvIdlString( SvHash_Cachable() ));
- else
- aDel = OString();
-
- if( aToggle )
- {
- aOut.append(aDel).append(aToggle.GetSvIdlString( SvHash_Toggle() ));
- aDel = ", ";
- }
- if( aAutoUpdate )
- {
- aOut.append(aDel).append(aAutoUpdate.GetSvIdlString( SvHash_AutoUpdate() ));
- aDel = ", ";
- }
-
- OString aDel1(", ");
- if( aAsynchron )
- aOut.append(aDel).append(aAsynchron.GetSvIdlString( SvHash_Asynchron() ));
- else if( !aSynchron )
- {
- // because of Default == TRUE, only when no other is set
- aOut.append(aDel).append(aSynchron.GetSvIdlString( SvHash_Synchron() ));
- }
- else
- aDel1 = aDel;
-
- aDel = ", ";
- if( aRecordManual )
- aOut.append(aDel1).append(aRecordManual.GetSvIdlString( SvHash_RecordManual() ));
- else if( aNoRecord )
- aOut.append(aDel1).append(aNoRecord.GetSvIdlString( SvHash_NoRecord() ));
- else if( !aRecordPerSet )
- // because of Default == TRUE, only when no other is set
- aOut.append(aDel1).append(aRecordPerSet.GetSvIdlString( SvHash_RecordPerSet() ));
- else if( aRecordPerItem )
- aOut.append(aDel1).append(aRecordPerItem.GetSvIdlString( SvHash_RecordPerItem() ));
- else
- aDel = aDel1;
-
- if( aRecordAbsolute )
- {
- aOut.append(aDel).append(aRecordAbsolute.GetSvIdlString( SvHash_RecordAbsolute() ));
- aDel = ", ";
- }
- if( aHasDialog )
- {
- aOut.append(aDel).append(aHasDialog.GetSvIdlString( SvHash_HasDialog() ));
- aDel = ", ";
- }
- if( aMenuConfig )
- {
- aOut.append(aDel).append(aMenuConfig.GetSvIdlString( SvHash_MenuConfig() ));
- aDel = ", ";
- }
- if( aToolBoxConfig )
- {
- aOut.append(aDel).append(aToolBoxConfig.GetSvIdlString( SvHash_ToolBoxConfig() ));
- aDel = ", ";
- }
- if( aStatusBarConfig )
- {
- aOut.append(aDel).append(aStatusBarConfig.GetSvIdlString( SvHash_StatusBarConfig() ));
- aDel = ", ";
- }
- if( aAccelConfig )
- {
- aOut.append(aDel).append(aAccelConfig.GetSvIdlString( SvHash_AccelConfig() ));
- aDel = ", ";
- }
- if( aFastCall )
- {
- aOut.append(aDel).append(aFastCall.GetSvIdlString( SvHash_FastCall() ));
- aDel = ", ";
- }
- if( aContainer )
- {
- aOut.append(aDel).append(aContainer.GetSvIdlString( SvHash_Container() ));
- aDel = ", ";
- }
- if( aImageRotation )
- {
- aOut.append(aDel).append(aImageRotation.GetSvIdlString( SvHash_ImageRotation() ));
- aDel = ", ";
- }
-
- if( aImageReflection )
- {
- aOut.append(aDel).append(aImageReflection.GetSvIdlString( SvHash_ImageReflection() ));
- aDel = ", ";
- }
-
- if( !aOut.isEmpty() )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( aOut.getStr() ) << endl;
- }
-}
-
-
bool SvMetaSlot::Test( SvIdlDataBase & rBase, SvTokenStream & rInStm )
{
bool bOk = SvMetaAttribute::Test( rBase, rInStm );
@@ -886,27 +485,13 @@ bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
return bOk;
}
-void SvMetaSlot::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- SvMetaAttribute::WriteSvIdl( rBase, rOutStm, nTab );
-}
-
void SvMetaSlot::Write( SvIdlDataBase & rBase,
SvStream & rOutStm, sal_uInt16 nTab,
WriteType nT, WriteAttribute nA )
{
- if ( nT == WRITE_DOCU )
- {
- if ( GetHidden() )
- return;
- }
- else
- {
- // no attribute for Automation
- if( !GetAutomation() || !GetExport() )
- return;
- }
+ // no attribute for Automation
+ if( !GetAutomation() || !GetExport() )
+ return;
if( !(nA & WA_VARIABLE) )
{
@@ -1472,163 +1057,4 @@ sal_uInt16 SvMetaSlot::WriteSlotMap( const OString& rShellName, sal_uInt16 nCoun
return nSCount;
}
-void SvMetaSlot::WriteHelpId( SvIdlDataBase & rBase, SvStream & rOutStm,
- HelpIdTable& rTable )
-{
- sal_uLong nSId = GetSlotId().GetValue();
- if( rTable.find( nSId ) == rTable.end() )
- {
- rTable[ nSId ] = this;
- rOutStm.WriteCharPtr( "#define " ).WriteCharPtr( GetSlotId().getString().getStr() ).WriteChar( '\t' )
- .WriteCharPtr( OString::number(nSId).getStr() )
- << endl;
- }
-
- SvMetaTypeEnum * pEnum = PTR_CAST( SvMetaTypeEnum, GetType() );
- if( GetPseudoSlots() && pEnum )
- {
- for( sal_uLong n = 0; n < pEnum->Count(); ++n )
- {
- OString aValName = pEnum->GetObject( n )->GetName().getString();
-
- OStringBuffer aBuf;
- if( !GetPseudoPrefix().isEmpty() )
- aBuf.append(GetPseudoPrefix());
- else
- aBuf.append(GetSlotId().getString());
- aBuf.append('_');
- aBuf.append(aValName.copy(pEnum->GetPrefix().getLength()));
-
- OString aSId = aBuf.makeStringAndClear();
-
- sal_uLong nSId2;
- bool bIdOk = false;
- if( rBase.FindId( aSId, &nSId2 ) )
- {
- aSId = OString::number(nSId2);
- bIdOk = true;
- }
-
- // if id not found, write always
- if( !bIdOk || rTable.find( nSId2 ) == rTable.end() )
- {
- rTable[ nSId2 ] = this;
-
- rOutStm.WriteCharPtr( "#define " ).WriteCharPtr( aSId.getStr() ).WriteChar( '\t' )
- .WriteCharPtr( OString::number(
- nSId2).getStr() )
- << endl;
- }
- }
- }
-}
-
-void WriteBool( bool bSet, SvStream& rStream )
-{
- if ( bSet )
- rStream.WriteCharPtr( "TRUE" ).WriteChar( ',' );
- else
- rStream.WriteCharPtr( "FALSE" ).WriteChar( ',' );
-}
-
-void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
-{
- rStrm.WriteCharPtr( "PROJECT," );
- rStrm.WriteCharPtr( GetSlotId().getString().getStr() ).WriteChar( ',' );
- rStrm
- .WriteCharPtr( OString::number(
- GetSlotId().GetValue()).getStr() )
- .WriteChar( ',' );
-
- if ( !GetPseudoPrefix().isEmpty() )
- rStrm.WriteCharPtr( GetPseudoPrefix().getStr() ).WriteChar( ',' );
- else
- rStrm.WriteChar( ',' );
-
- rStrm.WriteCharPtr( GetGroupId().getStr() ).WriteChar( ',' );
-
- WriteBool( GetAccelConfig(), rStrm );
- WriteBool( GetMenuConfig(), rStrm );
- WriteBool( GetStatusBarConfig(), rStrm );
- WriteBool( GetToolBoxConfig(), rStrm );
-
- if ( GetSlotType() )
- rStrm.WriteCharPtr( GetSlotType()->GetName().getString().getStr() ).WriteChar( ',' );
- else
- rStrm.WriteChar( ',' );
-
- WriteBool( GetAutoUpdate(), rStrm );
- if ( GetCachable() )
- rStrm.WriteCharPtr( "Cachable" ).WriteChar( ',' );
- else
- rStrm.WriteCharPtr( "Volatile" ).WriteChar( ',' );
-
- WriteBool( GetContainer(), rStrm );
- WriteBool( GetFastCall(), rStrm );
- WriteBool( GetHasCoreId(), rStrm );
- WriteBool( GetHasDialog(), rStrm );
- WriteBool( GetReadOnlyDoc(), rStrm );
- WriteBool( GetImageRotation(), rStrm );
- WriteBool( GetImageReflection(), rStrm );
- rStrm.WriteCharPtr( GetDisableFlags().getStr() ).WriteChar( ',' );
-
- if( GetSynchron() )
- rStrm.WriteCharPtr( "Synchron" ).WriteChar( ',' );
- else
- rStrm.WriteCharPtr( "Asynchron" ).WriteChar( ',' );
-
- WriteBool( GetToggle(), rStrm );
- WriteBool( GetReadonly(), rStrm );
- WriteBool( GetExport(), rStrm );
- if( GetRecordPerItem() )
- rStrm.WriteCharPtr( "RecordPerItem" ).WriteChar( ',' );
- else if ( GetNoRecord() )
- rStrm.WriteCharPtr( "NoRecord" ).WriteChar( ',' );
- else if ( GetRecordManual() )
- rStrm.WriteCharPtr( "RecordManual" ).WriteChar( ',' );
- else
- rStrm.WriteCharPtr( "RecordPerSet" ).WriteChar( ',' );
-
- WriteBool( GetRecordAbsolute(), rStrm );
-
- if ( GetType()->GetType() != TYPE_METHOD && GetMethod() )
- {
- rStrm.WriteCharPtr( GetMethod()->GetType()->GetReturnType()->GetName().getString().getStr() ).WriteChar( ',' );
- rStrm.WriteCharPtr( GetMethod()->GetName().getString().getStr() ).WriteChar( ',' );
- }
- else
- {
- rStrm.WriteCharPtr( ",," );
- }
-
- rStrm.WriteCharPtr( GetType()->GetSvName().getStr() ).WriteChar( ',' );
- rStrm.WriteCharPtr( GetName().getString().getStr() ).WriteChar( ',' );
-
- if ( GetType()->GetType() == TYPE_METHOD || GetMethod() )
- {
- SvMetaAttributeMemberList *pList = &GetType()->GetAttrList();
- if ( GetMethod() )
- pList = &GetMethod()->GetType()->GetAttrList();
-
- if( pList && !pList->empty() )
- {
- rStrm.WriteCharPtr( "\"(" );
- SvMetaAttributeMemberList::const_iterator it = pList->begin();
- while( it != pList->end() )
- {
- SvMetaAttribute* pAttr = *it;
- pAttr->WriteCSV( rBase, rStrm );
- ++it;
- if( it != pList->end() )
- rStrm.WriteChar( ',' );
- }
- rStrm.WriteCharPtr( ")\"" );
- }
- else
- rStrm.WriteCharPtr( "()" );
- }
-
- rStrm << endl;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 08e78141f9ea..af230a24912a 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -27,7 +27,7 @@
#include <globals.hxx>
#include <database.hxx>
-SV_IMPL_META_FACTORY1( SvMetaAttribute, SvMetaReference );
+TYPEINIT1( SvMetaAttribute, SvMetaReference );
SvMetaAttribute::SvMetaAttribute()
: aAutomation( true, false )
, aExport( true, false )
@@ -49,54 +49,6 @@ SvMetaAttribute::SvMetaAttribute( SvMetaType * pType )
{
}
-void SvMetaAttribute::Load( SvPersistStream & rStm )
-{
- SvMetaReference::Load( rStm );
-
- sal_uInt8 nMask;
- rStm.ReadUChar( nMask );
- if( nMask & 0x01 )
- {
- SvMetaType * pType;
- rStm >> pType;
- aType = pType;
- }
- if( nMask & 0x02 ) rStm >> aSlotId;
- if( nMask & 0x04 ) rStm >> aExport;
- if( nMask & 0x08 ) rStm >> aReadonly;
- if( nMask & 0x10 ) rStm >> aAutomation;
- if( nMask & 0x20 ) rStm >> aIsCollection;
- if( nMask & 0x40 ) rStm >> aReadOnlyDoc;
- if( nMask & 0x80 ) rStm >> aHidden;
-}
-
-void SvMetaAttribute::Save( SvPersistStream & rStm )
-{
- SvMetaReference::Save( rStm );
-
- // create mask
- sal_uInt8 nMask = 0;
- if( aType.Is() ) nMask |= 0x1;
- if( aSlotId.IsSet() ) nMask |= 0x2;
- if( aExport.IsSet() ) nMask |= 0x4;
- if( aReadonly.IsSet() ) nMask |= 0x8;
- if( aAutomation.IsSet() ) nMask |= 0x10;
- if( aIsCollection.IsSet() ) nMask |= 0x20;
- if( aReadOnlyDoc.IsSet() ) nMask |= 0x40;
- if( aHidden.IsSet() ) nMask |= 0x80;
-
- // write data
- rStm.WriteUChar( nMask );
- if( nMask & 0x1 ) WriteSvPersistBase( rStm, aType );
- if( nMask & 0x2 ) WriteSvNumberIdentifier( rStm, aSlotId );
- if( nMask & 0x4 ) rStm.WriteUChar( aExport );
- if( nMask & 0x8 ) rStm.WriteUChar( aReadonly );
- if( nMask & 0x10 ) rStm.WriteUChar( aAutomation );
- if( nMask & 0x20 ) rStm.WriteUChar( aIsCollection );
- if( nMask & 0x40 ) rStm.WriteUChar( aReadOnlyDoc );
- if( nMask & 0x80 ) rStm.WriteUChar( aHidden );
-}
-
SvMetaType * SvMetaAttribute::GetType() const
{
if( aType.Is() || !GetRef() ) return aType;
@@ -231,26 +183,6 @@ bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
return bOk;
}
-void SvMetaAttribute::WriteSvIdl
-(
- SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab
-)
-{
- SvMetaType * pType = GetType();
- pType->WriteTypePrefix( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm.WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
- if( aSlotId.IsSet() )
- rOutStm.WriteChar( ' ' ).WriteCharPtr( aSlotId.getString().getStr() );
- if( pType->GetType() == TYPE_METHOD )
- pType->WriteMethodArgs( rBase, rOutStm, nTab, WRITE_IDL );
- sal_uLong nPos = rOutStm.Tell();
- rOutStm << endl;
- SvMetaName::WriteSvIdl( rBase, rOutStm, nTab );
- TestAndSeekSpaceOnly( rOutStm, nPos );
-}
-
void SvMetaAttribute::ReadAttributesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -272,58 +204,6 @@ void SvMetaAttribute::ReadAttributesSvIdl( SvIdlDataBase & rBase,
}
}
-void SvMetaAttribute::WriteAttributesSvIdl
-(
- SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab
-)
-{
- SvMetaReference::WriteAttributesSvIdl( rBase, rOutStm, nTab );
-
- if( !aExport || !aAutomation || aReadonly )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "//class SvMetaAttribute" ) << endl;
- if( !aExport )
- {
- WriteTab( rOutStm, nTab );
- aExport.WriteSvIdl( SvHash_Export(), rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if ( aHidden != aExport )
- {
- WriteTab( rOutStm, nTab );
- aExport.WriteSvIdl( SvHash_Hidden(), rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( aReadonly )
- {
- WriteTab( rOutStm, nTab );
- aReadonly.WriteSvIdl( SvHash_Readonly(), rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( !aAutomation )
- {
- WriteTab( rOutStm, nTab );
- aAutomation.WriteSvIdl( SvHash_Automation(), rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( aIsCollection )
- {
- WriteTab( rOutStm, nTab );
- aIsCollection.WriteSvIdl( SvHash_IsCollection(), rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- if( !aReadOnlyDoc )
- {
- WriteTab( rOutStm, nTab );
- aReadOnlyDoc.WriteSvIdl( SvHash_ReadOnlyDoc(), rOutStm );
- rOutStm.WriteChar( ';' ) << endl;
- }
- }
-}
-
void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
SvStream & rOutStm,
sal_uInt16 nTab,
@@ -334,8 +214,7 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
SvMetaType * pBaseType = pType->GetBaseType();
DBG_ASSERT( pBaseType, "no base type for attribute" );
- if( nT == WRITE_ODL || nT == WRITE_DOCU
- || nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
+ if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
{
if( pBaseType->GetType() == TYPE_STRUCT )
{
@@ -352,29 +231,14 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
}
else
{
- if ( nT != WRITE_DOCU )
- {
- WriteTab( rOutStm, nTab );
- pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
- }
+ WriteTab( rOutStm, nTab );
+ pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
if( !GetName().getString().isEmpty() )
{
rOutStm.WriteChar( ' ' );
rOutStm.WriteCharPtr( GetName().getString().getStr() );
}
-
- if ( nT == WRITE_DOCU )
- {
- if( pBaseType->GetType() == TYPE_METHOD ||
- pBaseType->GetType() == TYPE_STRUCT ||
- pBaseType->GetType() == TYPE_ENUM )
- {
- OSL_FAIL( "Falscher Parametertyp!" );
- }
- else
- rOutStm.WriteCharPtr( pBaseType->GetBasicPostfix().getStr() );
- }
}
}
}
@@ -397,38 +261,10 @@ sal_uLong SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, bool bVar ) con
return n;
}
-void SvMetaAttribute::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab,
- WriteType nT, WriteAttribute nA )
+void SvMetaAttribute::WriteAttributes( SvIdlDataBase &, SvStream &,
+ sal_uInt16,
+ WriteType, WriteAttribute )
{
- if( nT == WRITE_ODL )
- {
- const SvNumberIdentifier & rId = GetSlotId();
- bool bReadonly = GetReadonly() || ( nA & WA_READONLY );
- if( (rId.IsSet() && !(nA & WA_STRUCT)) || bReadonly )
- {
- bool bVar = IsVariable();
- if( nA & WA_VARIABLE )
- bVar = true;
- else if( nA & WA_METHOD )
- bVar = false;
-
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "//class SvMetaAttribute" ) << endl;
- if( rId.IsSet() && !(nA & WA_STRUCT) )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "id(" )
- .WriteCharPtr( OString::number(MakeSlotValue(rBase,bVar)).getStr() )
- .WriteCharPtr( ")," ) << endl;
- }
- if( bVar && (bReadonly || IsMethod()) )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "readonly," ) << endl;
- }
- }
- }
}
void SvMetaAttribute::WriteCSource( SvIdlDataBase & rBase, SvStream & rOutStm,
@@ -524,11 +360,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
for( sal_uLong i = 0; i < nCount; i++ )
{
SvMetaAttribute *pAttr = rList[i];
- if ( nT == WRITE_DOCU )
- pAttr->SetDescription( GetDescription().getString() );
pAttr->Write( rBase, rOutStm, nTab, nT, nA );
- if( nT == WRITE_ODL && i +1 < nCount )
- rOutStm.WriteChar( ';' ) << endl;
}
rBase.aStructSlotId = slotId;
@@ -539,12 +371,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
WriteType nT, WriteAttribute nA )
{
// no attributes for automation
- if( nT == WRITE_DOCU )
- {
- if ( GetHidden() )
- return;
- }
- else if ( !GetAutomation() || !GetExport() )
+ if ( !GetAutomation() || !GetExport() )
return;
bool bVariable;
@@ -561,29 +388,7 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
DBG_ASSERT( pBaseType, "no base type for attribute" );
int nBType = pBaseType->GetType();
- if( nT == WRITE_ODL )
- {
- if( (bVariable && IsVariable()) || (!bVariable && IsMethod()) )
- {
- if( nBType == TYPE_STRUCT )
- WriteRecursiv_Impl( rBase, rOutStm, nTab, nT, nA );
- else
- {
- SvMetaReference::Write( rBase, rOutStm, nTab, nT, nA );
- WriteTab( rOutStm, nTab );
- pBaseType->WriteTypePrefix( rBase, rOutStm, nTab, nT );
-
- if( !GetName().getString().isEmpty() )
- {
- rOutStm.WriteChar( ' ' );
- rOutStm.WriteCharPtr( GetName().getString().getStr() );
- }
- if( pType->GetType() == TYPE_METHOD )
- pType->WriteMethodArgs( rBase, rOutStm, nTab, nT );
- }
- }
- }
- else if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
+ if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
{
if( !bVariable && IsMethod() )
{
@@ -643,75 +448,6 @@ void SvMetaAttribute::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
}
}
}
- else if ( nT == WRITE_DOCU )
- {
- if( !bVariable && IsMethod() )
- {
- rOutStm.WriteCharPtr( "<METHOD>" ) << endl;
- rOutStm.WriteCharPtr( GetSlotId().getString().getStr() ) << endl;
- rOutStm.WriteCharPtr( GetName().getString().getStr() ) << endl
- << endl; // readonly
-
- // return type
- SvMetaType* pType2 = GetType();
- SvMetaType* pBaseType2 = pType2->GetBaseType();
- rOutStm.WriteCharPtr( pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().getStr() ) << endl;
-
- DBG_ASSERT( !pBaseType2->GetReturnType()->GetBaseType()->GetBasicName().isEmpty(),
- "Leerer BasicName" );
-
- // syntax
- rOutStm.WriteCharPtr( GetName().getString().getStr() );
- pType2->WriteMethodArgs( rBase, rOutStm, nTab, nT );
-
- // C return type
- pBaseType2->WriteTypePrefix( rBase, rOutStm, 0, WRITE_C_HEADER );
- rOutStm << endl;
-
- // for methods also C syntax
- rOutStm.WriteCharPtr( "<C-SYNTAX>" ) << endl;
- Write( rBase, rOutStm, 0, WRITE_C_HEADER, nA );
- rOutStm.WriteCharPtr( "</C-SYNTAX>" ) << endl;
-
- // description
- WriteDescription( rOutStm );
- rOutStm.WriteCharPtr( "</METHOD>" ) << endl << endl;
- }
- else if( bVariable && IsVariable() )
- {
- if( nBType == TYPE_STRUCT )
- {
- WriteRecursiv_Impl( rBase, rOutStm, nTab, nT, nA );
- }
- else
- {
- rOutStm.WriteCharPtr( "<PROPERTY>" ) << endl;
- rOutStm.WriteCharPtr( GetSlotId().getString().getStr() ) << endl;
- rOutStm.WriteCharPtr( GetName().getString().getStr() ) << endl;
- if ( GetReadonly() )
- rOutStm.WriteCharPtr( "(nur lesen)" ) << endl;
- else
- rOutStm << endl;
-
- // for properties type instead of the return value
- rOutStm.WriteCharPtr( pBaseType->GetBasicName().getStr() ) << endl;
-
- DBG_ASSERT( !pBaseType->GetBasicName().isEmpty(),
- "Leerer BasicName" );
-
- // for properties no syntax
- rOutStm << endl;
-
- // C return type
- pBaseType->WriteTypePrefix( rBase, rOutStm, 0, WRITE_C_HEADER );
- rOutStm << endl;
-
- // description
- WriteDescription( rOutStm );
- rOutStm.WriteCharPtr( "</PROPERTY>" ) << endl << endl;
- }
- }
- }
}
sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray )
@@ -737,11 +473,7 @@ void SvMetaAttribute::Insert (SvSlotElementList&, const OString&, SvIdlDataBase&
{
}
-void SvMetaAttribute::WriteHelpId( SvIdlDataBase &, SvStream &, HelpIdTable& )
-{
-}
-
-SV_IMPL_META_FACTORY1( SvMetaType, SvMetaExtern );
+TYPEINIT1( SvMetaType, SvMetaExtern );
#define CTOR \
: aCall0( CALL_VALUE, false ) \
, aCall1( CALL_VALUE, false ) \
@@ -788,76 +520,6 @@ SvMetaType::~SvMetaType() {
delete pAttrList;
}
-void SvMetaType::Load( SvPersistStream & rStm )
-{
- SvMetaExtern::Load( rStm );
-
- sal_uInt16 nMask;
- rStm.ReadUInt16( nMask );
- if( nMask & 0x0001 ) rStm >> aIn;
- if( nMask & 0x0002 ) rStm >> aOut;
- if( nMask & 0x0004 ) rStm >> aCall0;
- if( nMask & 0x0008 ) rStm >> aCall1;
- if( nMask & 0x0010 ) rStm >> aSbxDataType;
- if( nMask & 0x0020 ) rStm >> aSvName;
- if( nMask & 0x0040 ) rStm >> aSbxName;
- if( nMask & 0x0080 ) rStm >> aOdlName;
- if( nMask & 0x0100 ) rStm >> GetAttrList();
- if( nMask & 0x0200 ) bIsItem = true;
- if( nMask & 0x0400 ) bIsShell = true;
- if( nMask & 0x0800 )
- {
- sal_uInt16 nT;
- rStm.ReadUInt16( nT );
- nType = nT;
- }
- if( nMask & 0x1000 ) rStm.ReadChar( cParserChar );
- if( nMask & 0x2000 ) rStm >> aCName;
- if( nMask & 0x4000 ) rStm >> aBasicName;
- if( nMask & 0x8000 ) rStm >> aBasicPostfix;
-}
-
-void SvMetaType::Save( SvPersistStream & rStm )
-{
- SvMetaExtern::Save( rStm );
-
- // create mask
- sal_uInt16 nMask = 0;
- if( aIn.IsSet() ) nMask |= 0x0001;
- if( aOut.IsSet() ) nMask |= 0x0002;
- if( aCall0.IsSet() ) nMask |= 0x0004;
- if( aCall1.IsSet() ) nMask |= 0x0008;
- if( aSbxDataType.IsSet() ) nMask |= 0x0010;
- if( aSvName.IsSet() ) nMask |= 0x0020;
- if( aSbxName.IsSet() ) nMask |= 0x0040;
- if( aOdlName.IsSet() ) nMask |= 0x0080;
- if( GetAttrCount() ) nMask |= 0x0100;
- if( bIsItem ) nMask |= 0x0200;
- if( bIsShell ) nMask |= 0x0400;
- if( nType != TYPE_BASE ) nMask |= 0x0800;
- if( cParserChar != 'h' ) nMask |= 0x1000;
- if( aCName.IsSet() ) nMask |= 0x2000;
- if( aBasicName.IsSet() ) nMask |= 0x4000;
- if( aBasicPostfix.IsSet() ) nMask |= 0x8000;
-
- // write data
- rStm.WriteUInt16( nMask );
- if( nMask & 0x0001 ) WriteSvBOOL( rStm, aIn );
- if( nMask & 0x0002 ) WriteSvBOOL( rStm, aOut );
- if( nMask & 0x0004 ) WriteSvint( rStm, aCall0 );
- if( nMask & 0x0008 ) WriteSvint( rStm, aCall1 );
- if( nMask & 0x0010 ) WriteSvint( rStm, aSbxDataType );
- if( nMask & 0x0020 ) WriteSvIdentifier( rStm, aSvName );
- if( nMask & 0x0040 ) WriteSvIdentifier( rStm, aSbxName );
- if( nMask & 0x0080 ) WriteSvIdentifier( rStm, aOdlName );
- if( nMask & 0x0100 ) WriteSvDeclPersistList( rStm, *pAttrList );
- if( nMask & 0x0800 ) rStm.WriteUInt16( nType );
- if( nMask & 0x1000 ) rStm.WriteChar( cParserChar );
- if( nMask & 0x2000 ) WriteSvIdentifier( rStm, aCName );
- if( nMask & 0x4000 ) WriteSvIdentifier( rStm, aBasicName );
- if( nMask & 0x8000 ) WriteSvIdentifier( rStm, aBasicPostfix );
-}
-
SvMetaAttributeMemberList & SvMetaType::GetAttrList() const
{
if( !pAttrList )
@@ -1114,26 +776,6 @@ bool SvMetaType::ReadSvIdl( SvIdlDataBase & rBase,
return false;
}
-void SvMetaType::WriteSvIdl
-(
- SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab
-)
-{
- WriteHeaderSvIdl( rBase, rOutStm, nTab );
- if( GetType() == TYPE_METHOD )
- WriteMethodArgs( rBase, rOutStm, nTab, WRITE_IDL );
-
- sal_uLong nOldPos = rOutStm.Tell();
- rOutStm << endl;
- SvMetaExtern::WriteSvIdl( rBase, rOutStm, nTab );
- if( TestAndSeekSpaceOnly( rOutStm, nOldPos ) )
- // nothin written
- rOutStm.Seek( nOldPos );
- rOutStm.WriteChar( ';' ) << endl;
-}
-
void SvMetaType::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
WriteType nT, WriteAttribute nA )
@@ -1163,7 +805,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
return;
OString name = GetName().getString();
- if( nT == WRITE_ODL || nT == WRITE_C_HEADER || nT == WRITE_CXX_HEADER )
+ if( nT == WRITE_C_HEADER )
{
switch( nType )
{
@@ -1179,7 +821,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
if( nType == TYPE_STRUCT || nType == TYPE_UNION )
nA = WA_STRUCT;
- if( nT == WRITE_ODL || nT == WRITE_C_HEADER)
+ if( nT == WRITE_C_HEADER)
{
if ( nT == WRITE_C_HEADER )
{
@@ -1190,8 +832,6 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
WriteTab( rOutStm, nTab );
rOutStm.WriteCharPtr( "typedef" ) << endl;
- if ( nT == WRITE_ODL )
- SvMetaName::Write( rBase, rOutStm, nTab, nT, nA );
}
WriteTab( rOutStm, nTab );
if( nType == TYPE_STRUCT )
@@ -1200,7 +840,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
rOutStm.WriteCharPtr( "union" );
else
rOutStm.WriteCharPtr( "enum" );
- if( nT != WRITE_ODL && nT != WRITE_C_HEADER)
+ if( nT != WRITE_C_HEADER)
rOutStm.WriteChar( ' ' ).WriteCharPtr( name.getStr() );
rOutStm << endl;
@@ -1209,7 +849,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
WriteContext( rBase, rOutStm, nTab +1, nT, nA );
WriteTab( rOutStm, nTab );
rOutStm.WriteChar( '}' );
- if( nT == WRITE_ODL || nT == WRITE_C_HEADER )
+ if( nT == WRITE_C_HEADER )
{
rOutStm.WriteChar( ' ' ).WriteCharPtr( C_PREF ).WriteCharPtr( name.getStr() );
}
@@ -1241,66 +881,6 @@ bool SvMetaType::ReadNamesSvIdl( SvIdlDataBase & rBase,
return bOk;
}
-void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- switch( nType )
- {
- case TYPE_CLASS:
- {
- if( IsShell() )
- rOutStm.WriteCharPtr( SvHash_shell()->GetName().getStr() );
- else
- rOutStm.WriteCharPtr( SvHash_interface()->GetName().getStr() );
- rOutStm.WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
- }
- break;
- case TYPE_STRUCT:
- {
- rOutStm.WriteCharPtr( SvHash_struct()->GetName().getStr() )
- .WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
- }
- break;
- case TYPE_UNION:
- {
- rOutStm.WriteCharPtr( SvHash_union()->GetName().getStr() )
- .WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
- }
- break;
- case TYPE_ENUM:
- {
- rOutStm.WriteCharPtr( SvHash_enum()->GetName().getStr() )
- .WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() );
- }
- break;
- case TYPE_POINTER:
- case TYPE_BASE:
- {
- if( IsItem() )
- rOutStm.WriteCharPtr( SvHash_item()->GetName().getStr() ).WriteChar( ' ' );
- else
- rOutStm.WriteCharPtr( SvHash_typedef()->GetName().getStr() ).WriteChar( ' ' );
- if( GetRef() )
- {
- static_cast<SvMetaType *>(GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm.WriteChar( ' ' );
- }
- rOutStm.WriteCharPtr( GetName().getString().getStr() );
- }
- break;
- case TYPE_METHOD:
- {
- rOutStm.WriteCharPtr( SvHash_typedef()->GetName().getStr() ).WriteChar( ' ' );
- static_cast<SvMetaType *>(GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
- rOutStm.WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() ).WriteCharPtr( "( " );
- WriteContextSvIdl( rBase, rOutStm, nTab );
- rOutStm.WriteCharPtr( " )" );
- }
- break;
- }
-}
-
void SvMetaType::ReadAttributesSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -1310,37 +890,6 @@ void SvMetaType::ReadAttributesSvIdl( SvIdlDataBase & rBase,
aOdlName.ReadSvIdl( SvHash_OdlName(), rInStm );
}
-void SvMetaType::WriteAttributesSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- SvMetaExtern::WriteAttributesSvIdl( rBase, rOutStm, nTab );
- OString name = GetName().getString();
- if( aSvName.getString() != name || aSbxName.getString() != name || aOdlName.getString() != name )
- {
- WriteTab( rOutStm, nTab );
- rOutStm.WriteCharPtr( "class SvMetaType" ) << endl;
- if( aSvName.getString() != name )
- {
- WriteTab( rOutStm, nTab );
- aSvName.WriteSvIdl( SvHash_SvName(), rOutStm, nTab );
- rOutStm << endl;
- }
- if( aSbxName.getString() != name )
- {
- WriteTab( rOutStm, nTab );
- aSbxName.WriteSvIdl( SvHash_SbxName(), rOutStm, nTab );
- rOutStm << endl;
- }
- if( aOdlName.getString() != name )
- {
- WriteTab( rOutStm, nTab );
- aOdlName.WriteSvIdl( SvHash_OdlName(), rOutStm, nTab );
- rOutStm << endl;
- }
- }
-}
-
void SvMetaType::ReadContextSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -1352,30 +901,6 @@ void SvMetaType::ReadContextSvIdl( SvIdlDataBase & rBase,
}
}
-void SvMetaType::WriteContextSvIdl
-(
- SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab
-)
-{
- if( GetAttrCount() )
- {
- SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
- while( it != pAttrList->end() )
- {
- SvMetaAttribute * pAttr = *it;
- WriteTab( rOutStm, nTab );
- pAttr->WriteSvIdl( rBase, rOutStm, nTab );
- if( GetType() == TYPE_METHOD )
- rOutStm.WriteChar( ',' ) << endl;
- else
- rOutStm.WriteChar( ';' ) << endl;
- ++it;
- }
- }
-}
-
void SvMetaType::WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
WriteType nT, WriteAttribute nA )
@@ -1495,98 +1020,49 @@ void SvMetaType::WriteMethodArgs
sal_uInt16 nTab, WriteType nT
)
{
- if( nT == WRITE_IDL )
+ rOutStm.WriteChar( '(' );
+ if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
{
+ rOutStm.WriteChar( ' ' ).WriteCharPtr( C_PREF ).WriteCharPtr( "Object h" ).WriteCharPtr( rBase.aIFaceName.getStr() );
if( GetAttrCount() )
- {
- rOutStm << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( '(' ) << endl;
-
- SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
- while( it != pAttrList->end() )
- {
- SvMetaAttribute * pAttr = *it;
- WriteTab( rOutStm, nTab +1 );
- pAttr->WriteSvIdl( rBase, rOutStm, nTab +1 );
- ++it;
- if( it != pAttrList->end() )
- rOutStm.WriteChar( ',' ) << endl;
- }
- rOutStm << endl;
- WriteTab( rOutStm, nTab );
- rOutStm.WriteChar( ')' );
- }
+ rOutStm.WriteChar( ',' );
else
- rOutStm.WriteCharPtr( "()" );
+ rOutStm.WriteChar( ' ' );
}
- else if ( nT == WRITE_DOCU )
- {
- rOutStm.WriteChar( '(' );
- if( GetAttrCount() )
- {
- SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
- while( it != pAttrList->end() )
- {
- SvMetaAttribute * pAttr = *it;
- pAttr->WriteParam( rBase, rOutStm, nTab+1, nT );
- ++it;
- if( it != pAttrList->end() )
- rOutStm.WriteChar( ',' );
- else
- rOutStm.WriteChar( ' ' );
- }
- }
- rOutStm.WriteChar( ')' ) << endl;
- }
- else
+ if( GetAttrCount() )
{
- rOutStm.WriteChar( '(' );
- if( nT == WRITE_C_HEADER || nT == WRITE_C_SOURCE )
- {
- rOutStm.WriteChar( ' ' ).WriteCharPtr( C_PREF ).WriteCharPtr( "Object h" ).WriteCharPtr( rBase.aIFaceName.getStr() );
- if( GetAttrCount() )
- rOutStm.WriteChar( ',' );
- else
- rOutStm.WriteChar( ' ' );
- }
-
- if( GetAttrCount() )
+ rOutStm << endl;
+ SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
+ while( it != pAttrList->end() )
{
- rOutStm << endl;
- SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
- while( it != pAttrList->end() )
+ SvMetaAttribute* pAttr = *it;
+ switch( nT )
{
- SvMetaAttribute* pAttr = *it;
- switch( nT )
+ case WRITE_C_HEADER:
+ case WRITE_C_SOURCE:
{
- case WRITE_C_HEADER:
- case WRITE_C_SOURCE:
- case WRITE_ODL:
- {
- pAttr->WriteParam( rBase, rOutStm, nTab +1, nT );
- }
- break;
+ pAttr->WriteParam( rBase, rOutStm, nTab +1, nT );
+ }
+ break;
- default:
- {
- DBG_ASSERT( false, "WriteType not implemented" );
- }
+ default:
+ {
+ DBG_ASSERT( false, "WriteType not implemented" );
}
- ++it;
- if( it != pAttrList->end() )
- rOutStm.WriteChar( ',' ) << endl;
- }
- if( nT != WRITE_C_HEADER && nT != WRITE_C_SOURCE )
- {
- rOutStm << endl;
- WriteTab( rOutStm, nTab +1 );
}
- rOutStm.WriteChar( ' ' );
+ ++it;
+ if( it != pAttrList->end() )
+ rOutStm.WriteChar( ',' ) << endl;
+ }
+ if( nT != WRITE_C_HEADER && nT != WRITE_C_SOURCE )
+ {
+ rOutStm << endl;
+ WriteTab( rOutStm, nTab +1 );
}
- rOutStm.WriteChar( ')' );
+ rOutStm.WriteChar( ' ' );
}
+ rOutStm.WriteChar( ')' );
}
void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
@@ -1594,54 +1070,8 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
{
switch( nT )
{
- case WRITE_IDL:
- {
- if( GetIn() && GetOut() )
- rOutStm.WriteCharPtr( SvHash_inout()->GetName().getStr() ).WriteChar( ' ' );
- else if( GetIn() )
- rOutStm.WriteCharPtr( SvHash_in()->GetName().getStr() ).WriteChar( ' ' );
- else if( GetOut() )
- rOutStm.WriteCharPtr( SvHash_out()->GetName().getStr() ).WriteChar( ' ' );
- rOutStm.WriteCharPtr( GetCString().getStr() );
- }
- break;
-
- case WRITE_ODL:
- {
- bool bIn = GetIn();
- bool bOut = GetOut();
- if( bIn || bOut )
- {
- if( bIn && bOut )
- rOutStm.WriteCharPtr( "[in,out] " );
- else if( bIn )
- rOutStm.WriteCharPtr( "[in] " );
- else if( bOut )
- rOutStm.WriteCharPtr( "[out] " );
- }
-
- OString out;
- if( GetType() == TYPE_METHOD )
- out = GetReturnType()->GetBaseType()->GetOdlName();
- else
- {
- SvMetaType * pBType = GetBaseType();
- out = pBType->GetOdlName();
- }
- if( aCall0 == (int)CALL_POINTER
- || aCall0 == (int)CALL_REFERENCE )
- rOutStm.WriteCharPtr( " *" );
- if( aCall1 == (int)CALL_POINTER
- || aCall1 == (int)CALL_REFERENCE )
- rOutStm.WriteCharPtr( " *" );
- rOutStm.WriteCharPtr( out.getStr() );
- }
- break;
-
case WRITE_C_HEADER:
case WRITE_C_SOURCE:
- case WRITE_CXX_HEADER:
- case WRITE_CXX_SOURCE:
{
SvMetaType * pBaseType = GetBaseType();
@@ -1672,29 +1102,6 @@ void SvMetaType::WriteTypePrefix( SvIdlDataBase & rBase, SvStream & rOutStm,
}
break;
- case WRITE_DOCU:
- {
-
- SvMetaType * pBaseType = GetBaseType();
- DBG_ASSERT( pBaseType, "no base type for attribute" );
-
- if( pBaseType->GetType() == TYPE_METHOD )
- {
- pBaseType->GetReturnType()->WriteTypePrefix(
- rBase, rOutStm, nTab, nT );
- }
- else
- {
- if( TYPE_STRUCT == pBaseType->GetType() )
- rOutStm.WriteCharPtr( "VARIANT" ).WriteCharPtr( pBaseType->GetName().getString().getStr() );
- else if ( pBaseType->GetType() == TYPE_ENUM )
- rOutStm.WriteCharPtr( "integer" );
- else
- rOutStm.WriteCharPtr( pBaseType->GetOdlName().getStr() );
- }
- }
- break;
-
default:
{
DBG_ASSERT( false, "WriteType not implemented" );
@@ -1763,55 +1170,17 @@ void SvMetaType::WriteParamNames( SvIdlDataBase & rBase,
}
}
-SV_IMPL_META_FACTORY1( SvMetaTypeString, SvMetaType );
+TYPEINIT1( SvMetaTypeString, SvMetaType );
SvMetaTypeString::SvMetaTypeString()
: SvMetaType( "String", "SbxSTRING", "BSTR", 's', "char *", "String", "$" )
{
}
-void SvMetaTypeString::Load( SvPersistStream & rStm )
-{
- SvMetaType::Load( rStm );
-}
-
-void SvMetaTypeString::Save( SvPersistStream & rStm )
-{
- SvMetaType::Save( rStm );
-}
-
-SV_IMPL_META_FACTORY1( SvMetaEnumValue, SvMetaName );
+TYPEINIT1( SvMetaEnumValue, SvMetaName );
SvMetaEnumValue::SvMetaEnumValue()
{
}
-void SvMetaEnumValue::Load( SvPersistStream & rStm )
-{
- SvMetaName::Load( rStm );
-
- sal_uInt8 nMask;
- rStm.ReadUChar( nMask );
- if( nMask >= 0x02 )
- {
- rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- OSL_FAIL( "wrong format" );
- return;
- }
- if( nMask & 0x01 ) aEnumValue = read_uInt16_lenPrefixed_uInt8s_ToOString(rStm);
-}
-
-void SvMetaEnumValue::Save( SvPersistStream & rStm )
-{
- SvMetaName::Save( rStm );
-
- // create mask
- sal_uInt8 nMask = 0;
- if( !aEnumValue.isEmpty() ) nMask |= 0x01;
-
- // write data
- rStm.WriteUChar( nMask );
- if( nMask & 0x01 ) write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aEnumValue);
-}
-
bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -1820,11 +1189,6 @@ bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase,
return true;
}
-void SvMetaEnumValue::WriteSvIdl( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 )
-{
- rOutStm.WriteCharPtr( GetName().getString().getStr() );
-}
-
void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16,
WriteType nT, WriteAttribute )
{
@@ -1834,43 +1198,12 @@ void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16,
rOutStm.WriteCharPtr( GetName().getString().getStr() );
}
-SV_IMPL_META_FACTORY1( SvMetaTypeEnum, SvMetaType );
+TYPEINIT1( SvMetaTypeEnum, SvMetaType );
SvMetaTypeEnum::SvMetaTypeEnum()
{
SetBasicName("Integer");
}
-void SvMetaTypeEnum::Load( SvPersistStream & rStm )
-{
- SvMetaType::Load( rStm );
-
- sal_uInt8 nMask;
- rStm.ReadUChar( nMask );
- if( nMask >= 0x04 )
- {
- rStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- OSL_FAIL( "wrong format" );
- return;
- }
- if( nMask & 0x01 ) rStm >> aEnumValueList;
- if( nMask & 0x02 ) aPrefix = read_uInt16_lenPrefixed_uInt8s_ToOString(rStm);
-}
-
-void SvMetaTypeEnum::Save( SvPersistStream & rStm )
-{
- SvMetaType::Save( rStm );
-
- // create mask
- sal_uInt8 nMask = 0;
- if( !aEnumValueList.empty() ) nMask |= 0x01;
- if( !aPrefix.isEmpty() ) nMask |= 0x02;
-
- // write data
- rStm.WriteUChar( nMask );
- if( nMask & 0x01 ) WriteSvDeclPersistList( rStm, aEnumValueList );
- if( nMask & 0x02 ) write_uInt16_lenPrefixed_uInt8s_FromOString(rStm, aPrefix);
-}
-
namespace
{
OString getCommonSubPrefix(const OString &rA, const OString &rB)
@@ -1911,21 +1244,6 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase,
rInStm.Seek( nTokPos );
}
-void SvMetaTypeEnum::WriteContextSvIdl( SvIdlDataBase & rBase,
- SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- WriteTab( rOutStm, nTab +1 );
- for( sal_uLong n = 0; n < aEnumValueList.size(); n++ )
- {
- aEnumValueList[n]->WriteSvIdl( rBase, rOutStm, nTab );
- if( n + 1 != aEnumValueList.size() )
- rOutStm.WriteCharPtr( ", " );
- else
- rOutStm << endl;
- }
-}
-
bool SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase,
SvTokenStream & rInStm )
{
@@ -1940,15 +1258,6 @@ bool SvMetaTypeEnum::ReadSvIdl( SvIdlDataBase & rBase,
return false;
}
-void SvMetaTypeEnum::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
- sal_uInt16 nTab )
-{
- WriteHeaderSvIdl( rBase, rOutStm, nTab );
- rOutStm << endl;
- SvMetaName::WriteSvIdl( rBase, rOutStm, nTab );
- rOutStm << endl;
-}
-
void SvMetaTypeEnum::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
sal_uInt16 nTab,
WriteType nT, WriteAttribute nA )
@@ -1981,22 +1290,12 @@ void SvMetaTypeEnum::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
rOutStm << endl;
}
-SV_IMPL_META_FACTORY1( SvMetaTypevoid, SvMetaType );
+TYPEINIT1( SvMetaTypevoid, SvMetaType );
SvMetaTypevoid::SvMetaTypevoid()
: SvMetaType( "void", "SbxVOID", "void", 'v', "void", "", "" )
{
}
-void SvMetaTypevoid::Load( SvPersistStream & rStm )
-{
- SvMetaType::Load( rStm );
-}
-
-void SvMetaTypevoid::Save( SvPersistStream & rStm )
-{
- SvMetaType::Save( rStm );
-}
-
OString SvMetaAttribute::Compare( SvMetaAttribute* pAttr )
{
OStringBuffer aStr;
@@ -2060,12 +1359,4 @@ OString SvMetaAttribute::Compare( SvMetaAttribute* pAttr )
return aStr.makeStringAndClear();
}
-void SvMetaAttribute::WriteCSV( SvIdlDataBase&, SvStream& rStrm )
-{
- rStrm.WriteCharPtr( GetType()->GetSvName().getStr() ).WriteChar( ' ' );
- rStrm.WriteCharPtr( GetName().getString().getStr() ).WriteChar( ' ' );
- rStrm.WriteCharPtr( GetSlotId().getString().getStr() );
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 9eceab119581..465cbfcf7bd6 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -107,13 +107,8 @@ char const * SyntaxStrings[] = {
NULL };
char CommandLineSyntax[] =
-"-fs<slotmap file> -fl<listing file>\n"
-"-fo<odl file> -fd<data base file>\n"
-"-fi<item implementation> -ft<type library file> (not OLE)\n"
-"-fr<resource file> -fm<makefile target file>\n"
-"-fC<c++ source file> -fH<c++ header file>\n"
-"-fc<c source file> -fh<c header file>\n"
-"-rsc <*.srs header line>\n"
+"-fs<slotmap file>\n"
+"-fm<makefile target file>\n"
"-help, ? @<file> response file\n"
" <filenames>\n";
@@ -139,30 +134,9 @@ bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand )
SvFileStream aStm( aFileName, STREAM_STD_READ | STREAM_NOCREATE );
if( aStm.GetError() == SVSTREAM_OK )
{
- if( SvIdlDataBase::IsBinaryFormat( aStm ) )
- {
- pDataBase->Load( aStm );
- if( aStm.GetError() != SVSTREAM_OK )
- {
- OStringBuffer aStr;
- if( aStm.GetError() == SVSTREAM_FILEFORMAT_ERROR )
- aStr.append("error: incompatible format, file ");
- else if( aStm.GetError() == SVSTREAM_WRONGVERSION )
- aStr.append("error: wrong version, file ");
- else
- aStr.append("error during load, file ");
- aStr.append(OUStringToOString(aFileName,
- RTL_TEXTENCODING_UTF8));
- fprintf( stderr, "%s\n", aStr.getStr() );
- return false;
- }
- }
- else
- {
- SvTokenStream aTokStm( aStm, aFileName );
- if( !pDataBase->ReadSvIdl( aTokStm, false, rCommand.aPath ) )
- return false;
- }
+ SvTokenStream aTokStm( aStm, aFileName );
+ if( !pDataBase->ReadSvIdl( aTokStm, false, rCommand.aPath ) )
+ return false;
}
else
{
@@ -211,7 +185,7 @@ static bool ResponseFile( StringList * pList, int argc, char ** argv )
}
SvCommand::SvCommand( int argc, char ** argv )
- : nVerbosity(1), nFlags( 0 )
+ : nVerbosity(1)
{
StringList aList;
@@ -234,53 +208,10 @@ SvCommand::SvCommand( int argc, char ** argv )
{ // name of slot output
aSlotMapFile = aName;
}
- else if( 'l' == aFirstChar )
- { // name of listing
- aListFile = aName;
- }
- else if( 'i' == aFirstChar )
- {
- }
- else if( 'o' == aFirstChar )
- {
- }
- else if( 'd' == aFirstChar )
- { // name of data set file
- aDataBaseFile = aName;
- }
- else if( 'D' == aFirstChar )
- {
- }
- else if( 'C' == aFirstChar )
- {
- }
- else if( 'H' == aFirstChar )
- {
- }
- else if( 'c' == aFirstChar )
- {
- }
- else if( 'h' == aFirstChar )
- {
- }
- else if( 't' == aFirstChar )
- {
- }
else if( 'm' == aFirstChar )
{ // name of info file
aTargetFile = aName;
}
- else if( 'r' == aFirstChar )
- {
- }
- else if( 'z' == aFirstChar )
- { // name of HelpId file
- aHelpIdFile = aName;
- }
- else if( 'y' == aFirstChar )
- { // name of CSV file
- aCSVFile = aName;
- }
else if( 'x' == aFirstChar )
{ // name of IDL file for the CSV file
aExportFile = aName;
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 33ac3ac38a2e..c6c37c55a49b 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -31,7 +31,6 @@ SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
: bExport( false )
, nUniqueId( 0 )
, nVerbosity( rCmd.nVerbosity )
- , aPersStream( *IDLAPP->pClassMgr, NULL )
, pIdTable( NULL )
{
sSlotMapFile = rCmd.aSlotMapFile;
@@ -82,80 +81,6 @@ SvMetaModule * SvIdlDataBase::GetModule( const OString& rName )
return NULL;
}
-#define DATABASE_SIGNATURE (sal_uInt32)0x13B799F2
-#define DATABASE_VER 0x0006
-bool SvIdlDataBase::IsBinaryFormat( SvStream & rStm )
-{
- sal_uInt32 nSig = 0;
- sal_uLong nPos = rStm.Tell();
- rStm.ReadUInt32( nSig );
- rStm.Seek( nPos );
-
- return nSig == DATABASE_SIGNATURE;
-}
-
-void SvIdlDataBase::Load( SvStream & rStm )
-{
- DBG_ASSERT( aTypeList.empty(), "type list already initialized" );
- SvPersistStream aPStm( *IDLAPP->pClassMgr, &rStm );
-
- sal_uInt16 nVersion = 0;
- sal_uInt32 nSig = 0;
-
- aPStm.ReadUInt32( nSig );
- aPStm.ReadUInt16( nVersion );
- if( nSig != DATABASE_SIGNATURE )
- {
- aPStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return;
- }
- if( nVersion != DATABASE_VER )
- {
- aPStm.SetError( SVSTREAM_WRONGVERSION );
- return;
- }
- aPStm >> aClassList;
- aPStm >> aTypeList;
- aPStm >> aAttrList;
- aPStm >> aModuleList;
- aPStm.ReadUInt32( nUniqueId );
-
- if( aPStm.IsEof() )
- aPStm.SetError( SVSTREAM_GENERALERROR );
-}
-
-void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags )
-{
- SvPersistStream aPStm( *IDLAPP->pClassMgr, &rStm );
- aPStm.SetContextFlags( nFlags );
-
- aPStm.WriteUInt32( DATABASE_SIGNATURE );
- aPStm.WriteUInt16( DATABASE_VER );
-
- bool bOnlyStreamedObjs = false;
- if( nFlags & IDL_WRITE_CALLING )
- bOnlyStreamedObjs = true;
-
- if( bOnlyStreamedObjs )
- {
- SvMetaClassMemberList aList;
- for( sal_uLong n = 0; n < GetModuleList().size(); n++ )
- {
- SvMetaModule * pModule = GetModuleList()[n];
- if( !pModule->IsImported() )
- aList.insert( pModule->GetClassList() );
- }
- WriteSvDeclPersistList( aPStm, aList );
- }
- else
- WriteSvDeclPersistList( aPStm, aClassList );
-
- aTypeList.WriteObjects( aPStm, bOnlyStreamedObjs );
- aAttrList.WriteObjects( aPStm, bOnlyStreamedObjs );
- aModuleList.WriteObjects( aPStm, bOnlyStreamedObjs );
- aPStm.WriteUInt32( nUniqueId );
-}
-
void SvIdlDataBase::SetError( const OString& rError, SvToken * pTok )
{
if( pTok->GetLine() > 10000 )
@@ -638,25 +563,8 @@ bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, bool bImported, const
osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName );
this->AddDepFile(aFullName);
SvFileStream aStm( aFullName, STREAM_STD_READ | STREAM_NOCREATE );
- Load( aStm );
- if( aStm.GetError() != SVSTREAM_OK )
- {
- if( aStm.GetError() == SVSTREAM_WRONGVERSION )
- {
- OStringBuffer aStr("wrong version, file ");
- aStr.append(OUStringToOString( aFullName, RTL_TEXTENCODING_UTF8));
- SetError(aStr.makeStringAndClear(), pTok);
- WriteError( rInStm );
- bOk = false;
- }
- else
- {
- aStm.Seek( 0 );
- aStm.ResetError();
- SvTokenStream aTokStm( aStm, aFullName );
- bOk = ReadSvIdl( aTokStm, true, rPath );
- }
- }
+ SvTokenStream aTokStm( aStm, aFullName );
+ bOk = ReadSvIdl( aTokStm, true, rPath );
}
else
bOk = false;
@@ -697,33 +605,6 @@ bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, bool bImported, const
return true;
}
-bool SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm )
-{
- if( rOutStm.GetError() != SVSTREAM_OK )
- return false;
-
- SvStringHashList aList;
- if( GetIdTable() )
- {
- GetIdTable()->FillHashList( &aList );
- for ( size_t i = 0, n = aList.size(); i < n; ++i )
- {
- SvStringHashEntry* pEntry = aList[ i ];
- rOutStm.WriteCharPtr( "#define " ).WriteCharPtr( pEntry->GetName().getStr() )
- .WriteChar( '\t' )
- .WriteCharPtr( OString::number(pEntry->GetValue()).getStr() )
- << endl;
- }
- }
-
- for( sal_uLong n = 0; n < GetModuleList().size(); n++ )
- {
- SvMetaModule * pModule = GetModuleList()[n];
- pModule->WriteSvIdl( *this, rOutStm, 0 );
- }
- return true;
-}
-
bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm )
{
if( rOutStm.GetError() != SVSTREAM_OK )
@@ -750,34 +631,6 @@ bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm )
return true;
}
-bool SvIdlWorkingBase::WriteHelpIds( SvStream& rOutStm )
-{
- if( rOutStm.GetError() != SVSTREAM_OK )
- return false;
-
- HelpIdTable aIdTable;
- sal_uLong n;
- for( n = 0; n < GetModuleList().size(); n++ )
- {
- SvMetaModule * pModule = GetModuleList()[n];
- pModule->WriteHelpIds( *this, rOutStm, aIdTable );
- }
-
- const SvMetaAttributeMemberList & rAttrList = GetAttrList();
- for( n = 0; n < rAttrList.size(); n++ )
- {
- SvMetaAttribute * pAttr = rAttrList[n];
- pAttr->WriteHelpId( *this, rOutStm, aIdTable );
- }
-
- return true;
-}
-
-bool SvIdlWorkingBase::WriteSfxItem( SvStream & )
-{
- return false;
-}
-
void SvIdlDataBase::StartNewFile( const OUString& rName )
{
bExport = ( aExportFile.equalsIgnoreAsciiCase( rName ) );
@@ -790,38 +643,6 @@ void SvIdlDataBase::AppendAttr( SvMetaAttribute *pAttr )
pAttr->SetNewAttribute( true );
}
-bool SvIdlWorkingBase::WriteCSV( SvStream& rStrm )
-{
- SvMetaAttributeMemberList &rList = GetAttrList();
- sal_uLong nCount = rList.size();
- for ( sal_uLong n=0; n<nCount; n++ )
- {
- if ( rList[n]->IsNewAttribute() )
- {
- rList[n]->WriteCSV( *this, rStrm );
- }
- }
-
- if ( rStrm.GetError() != SVSTREAM_OK )
- return false;
- else
- return true;
-}
-
-bool SvIdlWorkingBase::WriteDocumentation( SvStream & rOutStm )
-{
- if( rOutStm.GetError() != SVSTREAM_OK )
- return false;
-
- for( sal_uLong n = 0; n < GetModuleList().size(); n++ )
- {
- SvMetaModule * pModule = GetModuleList()[n];
- if( !pModule->IsImported() )
- pModule->Write( *this, rOutStm, 0, WRITE_DOCU );
- }
- return true;
-}
-
void SvIdlDataBase::AddDepFile(OUString const& rFileName)
{
m_DepFiles.insert(rFileName);
diff --git a/idl/source/prj/globals.cxx b/idl/source/prj/globals.cxx
index ad8c9432324e..f6dfeaf4188e 100644
--- a/idl/source/prj/globals.cxx
+++ b/idl/source/prj/globals.cxx
@@ -34,36 +34,13 @@ IdlDll * GetIdlApp()
IdlDll::IdlDll()
: pHashTable( NULL )
- , pClassMgr( NULL )
, pGlobalNames( NULL )
-{
- pClassMgr = new SvClassManager();
- // File OBJECT.HXX:
- pClassMgr->SV_CLASS_REGISTER( SvMetaAttribute );
- pClassMgr->SV_CLASS_REGISTER( SvMetaClass );
- //File SLOT.HXX:
- pClassMgr->SV_CLASS_REGISTER( SvMetaSlot );
- //File MODULE.HXX:
- pClassMgr->SV_CLASS_REGISTER( SvMetaModule );
- //File BASOBJ.HXX:
- pClassMgr->SV_CLASS_REGISTER( SvMetaObject );
- pClassMgr->SV_CLASS_REGISTER( SvMetaName );
- pClassMgr->SV_CLASS_REGISTER( SvMetaExtern );
- pClassMgr->SV_CLASS_REGISTER( SvMetaReference );
- //File TYPES.HXX:
- pClassMgr->SV_CLASS_REGISTER( SvMetaType );
- pClassMgr->SV_CLASS_REGISTER( SvMetaTypeString );
- pClassMgr->SV_CLASS_REGISTER( SvMetaEnumValue );
- pClassMgr->SV_CLASS_REGISTER( SvMetaTypeEnum );
- pClassMgr->SV_CLASS_REGISTER( SvMetaTypevoid );
- pClassMgr->SV_CLASS_REGISTER( SvClassElement );
-}
+{}
IdlDll::~IdlDll()
{
delete pGlobalNames;
- delete pClassMgr;
delete pHashTable;
}
diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx
index 94a6e538f7d7..852b6bacf524 100644
--- a/idl/source/prj/svidl.cxx
+++ b/idl/source/prj/svidl.cxx
@@ -105,13 +105,7 @@ inline OUString tempFileHelper(OUString const & fname)
int main ( int argc, char ** argv)
{
- OUString aTmpListFile;
OUString aTmpSlotMapFile;
- OUString aTmpSfxItemFile;
- OUString aTmpDataBaseFile;
- OUString aTmpHelpIdFile;
- OUString aTmpCSVFile;
- OUString aTmpDocuFile;
OUString aTmpDepFile;
SvCommand aCommand( argc, argv );
@@ -134,30 +128,6 @@ int main ( int argc, char ** argv)
if( ReadIdl( pDataBase, aCommand ) )
{
- if( nExit == 0 && !aCommand.aDocuFile.isEmpty() )
- {
- aTmpDocuFile = tempFileHelper(aCommand.aDocuFile);
- SvFileStream aOutStm( aTmpDocuFile, STREAM_READWRITE | STREAM_TRUNC );
- if( !pDataBase->WriteDocumentation( aOutStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write documentation file: ");
- aStr.append(OUStringToOString(aCommand.aDocuFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
- if( nExit == 0 && !aCommand.aListFile.isEmpty() )
- {
- aTmpListFile = tempFileHelper(aCommand.aListFile);
- SvFileStream aOutStm( aTmpListFile, STREAM_READWRITE | STREAM_TRUNC );
- if( !pDataBase->WriteSvIdl( aOutStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write list file: ");
- aStr.append(OUStringToOString(aCommand.aListFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
if( nExit == 0 && !aCommand.aSlotMapFile.isEmpty() )
{
aTmpSlotMapFile = tempFileHelper(aCommand.aSlotMapFile);
@@ -170,55 +140,6 @@ int main ( int argc, char ** argv)
fprintf(stderr, "%s\n", aStr.getStr());
}
}
- if( nExit == 0 && !aCommand.aHelpIdFile.isEmpty() )
- {
- aTmpHelpIdFile = tempFileHelper(aCommand.aHelpIdFile);
- SvFileStream aStm( aTmpHelpIdFile, STREAM_READWRITE | STREAM_TRUNC );
- if (!pDataBase->WriteHelpIds( aStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write help ID file: ");
- aStr.append(OUStringToOString(aCommand.aHelpIdFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
- if( nExit == 0 && !aCommand.aCSVFile.isEmpty() )
- {
- aTmpCSVFile = tempFileHelper(aCommand.aCSVFile);
- SvFileStream aStm( aTmpCSVFile, STREAM_READWRITE | STREAM_TRUNC );
- if (!pDataBase->WriteCSV( aStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write CSV file: ");
- aStr.append(OUStringToOString(aCommand.aCSVFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
- if( nExit == 0 && !aCommand.aSfxItemFile.isEmpty() )
- {
- aTmpSfxItemFile = tempFileHelper(aCommand.aSfxItemFile);
- SvFileStream aOutStm( aTmpSfxItemFile, STREAM_READWRITE | STREAM_TRUNC );
- if( !pDataBase->WriteSfxItem( aOutStm ) )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write item file: ");
- aStr.append(OUStringToOString(aCommand.aSfxItemFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
- if( nExit == 0 && !aCommand.aDataBaseFile.isEmpty() )
- {
- aTmpDataBaseFile = tempFileHelper(aCommand.aDataBaseFile);
- SvFileStream aOutStm( aTmpDataBaseFile, STREAM_READWRITE | STREAM_TRUNC );
- pDataBase->Save( aOutStm, aCommand.nFlags );
- if( aOutStm.GetError() != SVSTREAM_OK )
- {
- nExit = -1;
- OStringBuffer aStr("cannot write database file: ");
- aStr.append(OUStringToOString(aCommand.aDataBaseFile, RTL_TEXTENCODING_UTF8));
- fprintf(stderr, "%s\n", aStr.getStr());
- }
- }
if (nExit == 0 && !aCommand.m_DepFile.isEmpty())
{
aTmpDepFile = tempFileHelper(aCommand.m_DepFile);
@@ -241,14 +162,6 @@ int main ( int argc, char ** argv)
bool bErr = false;
bool bDoMove = aCommand.aTargetFile.isEmpty();
OUString aErrFile, aErrFile2;
- if( !bErr && !aCommand.aListFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aListFile, aTmpListFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aListFile;
- aErrFile2 = aTmpListFile;
- }
- }
if( !bErr && !aCommand.aSlotMapFile.isEmpty() )
{
bErr |= !FileMove_Impl( aCommand.aSlotMapFile, aTmpSlotMapFile, bDoMove );
@@ -257,46 +170,6 @@ int main ( int argc, char ** argv)
aErrFile2 = aTmpSlotMapFile;
}
}
- if( !bErr && !aCommand.aSfxItemFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aSfxItemFile, aTmpSfxItemFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aSfxItemFile;
- aErrFile2 = aTmpSfxItemFile;
- }
- }
- if( !bErr && !aCommand.aDataBaseFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aDataBaseFile, aTmpDataBaseFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aDataBaseFile;
- aErrFile2 = aTmpDataBaseFile;
- }
- }
- if( !bErr && !aCommand.aHelpIdFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aHelpIdFile, aTmpHelpIdFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aHelpIdFile;
- aErrFile2 = aTmpHelpIdFile;
- }
- }
- if( !bErr && !aCommand.aCSVFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aCSVFile, aTmpCSVFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aCSVFile;
- aErrFile2 = aTmpCSVFile;
- }
- }
- if( !bErr && !aCommand.aDocuFile.isEmpty() )
- {
- bErr |= !FileMove_Impl( aCommand.aDocuFile, aTmpDocuFile, bDoMove );
- if( bErr ) {
- aErrFile = aCommand.aDocuFile;
- aErrFile2 = aTmpDocuFile;
- }
- }
if (!bErr && !aCommand.m_DepFile.isEmpty())
{
bErr |= !FileMove_Impl( aCommand.m_DepFile, aTmpDepFile, bDoMove );
@@ -330,26 +203,11 @@ int main ( int argc, char ** argv)
if( nExit != 0 )
{
- if( !aCommand.aListFile.isEmpty() )
- {
- osl::FileBase::getSystemPathFromFileURL( aTmpListFile, aTmpListFile );
- osl::File::remove( aTmpListFile );
- }
if( !aCommand.aSlotMapFile.isEmpty() )
{
osl::FileBase::getSystemPathFromFileURL( aTmpSlotMapFile, aTmpSlotMapFile );
osl::File::remove( aTmpSlotMapFile );
}
- if( !aCommand.aSfxItemFile.isEmpty() )
- {
- osl::FileBase::getSystemPathFromFileURL( aTmpSfxItemFile, aTmpSfxItemFile );
- osl::File::remove( aTmpSfxItemFile );
- }
- if( !aCommand.aDataBaseFile.isEmpty() )
- {
- osl::FileBase::getSystemPathFromFileURL( aTmpDataBaseFile, aTmpDataBaseFile );
- osl::File::remove( aTmpDataBaseFile );
- }
}
delete pDataBase;