summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-08 11:41:46 +0200
committerNoel Grandin <noel@peralex.com>2016-02-08 14:00:38 +0200
commit04e22bee0a79008a39dc9d78a460941f738020a6 (patch)
tree8a9f1b1bcb646049925e2772ff16c32ef42b28b9 /idl
parent81c82cabe53101b828c56af71c5bd49b9ca60a21 (diff)
format IDL compiler headers a little
Change-Id: I54cb7a664908f8817958d4482a5adfdc6d2a0f3d
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/basobj.hxx5
-rw-r--r--idl/inc/command.hxx2
-rw-r--r--idl/inc/database.hxx15
-rw-r--r--idl/inc/lex.hxx12
-rw-r--r--idl/inc/object.hxx8
-rw-r--r--idl/inc/slot.hxx75
-rw-r--r--idl/inc/types.hxx34
-rw-r--r--idl/source/objects/types.cxx19
8 files changed, 70 insertions, 100 deletions
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index dd01e85af7b6..4a2b2528d194 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -27,13 +27,8 @@
#include <vector>
class SvTokenStream;
-class SvMetaObject;
class SvIdlDataBase;
-typedef SvMetaObject * (*CreateMetaObjectType)();
-
-#define C_PREF "C_"
-
template<typename T>
class SvRefMemberList : private std::vector<T>
{
diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx
index fdcd89d565cd..6be70f446e81 100644
--- a/idl/inc/command.hxx
+++ b/idl/inc/command.hxx
@@ -35,7 +35,7 @@ public:
OUString aTargetFile;
OUString aExportFile;
OUString m_DepFile;
- sal_uInt32 nVerbosity;
+ sal_uInt32 nVerbosity;
SvCommand( int argc, char ** argv );
~SvCommand();
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 7852e80d2d83..c9259bf22fdf 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -42,14 +42,15 @@ public:
: nLine(nL), nColumn(nC) {}
const OString& GetText() const { return aText; }
- void SetText( const OString& rT ) { aText = rT; }
+ void SetText( const OString& rT ) { aText = rT; }
bool IsError() const { return nLine != 0; }
SvIdlError & operator = ( const SvIdlError & rRef )
- { aText = rRef.aText;
- nLine = rRef.nLine;
- nColumn = rRef.nColumn;
- return *this;
- }
+ {
+ aText = rRef.aText;
+ nLine = rRef.nLine;
+ nColumn = rRef.nColumn;
+ return *this;
+ }
};
class SvIdlDataBase
@@ -68,7 +69,7 @@ class SvIdlDataBase
SvRefMemberList<SvMetaType *> aTmpTypeList; // not persistent
protected:
- ::std::set< OUString > m_DepFiles;
+ ::std::set< OUString > m_DepFiles;
SvMetaObjectMemberStack aContextStack;
OUString aPath;
SvIdlError aError;
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
index a8138c835f44..c06b605292ee 100644
--- a/idl/inc/lex.hxx
+++ b/idl/inc/lex.hxx
@@ -102,11 +102,11 @@ inline SvToken::SvToken()
class SvTokenStream
{
sal_uLong nLine, nColumn;
- int nBufPos;
- int c; // next character
+ int nBufPos;
+ int c; // next character
sal_uInt16 nTabSize; // length of tabulator
- OString aStrTrue;
- OString aStrFalse;
+ OString aStrTrue;
+ OString aStrFalse;
sal_uLong nMaxPos;
SvFileStream * pInStream;
@@ -115,9 +115,9 @@ class SvTokenStream
std::vector<std::unique_ptr<SvToken> > aTokList;
std::vector<std::unique_ptr<SvToken> >::iterator pCurToken;
- OString aBufStr;
+ OString aBufStr;
- void InitCtor();
+ void InitCtor();
int GetNextChar();
int GetFastNextChar()
diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index 6399b007f692..c4c45f02b07d 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -78,15 +78,15 @@ class SvMetaClass : public SvMetaType
const OString& rPrefix, SvIdlDataBase& rBase );
protected:
- virtual void ReadContextSvIdl( SvIdlDataBase &,
+ virtual void ReadContextSvIdl( SvIdlDataBase &,
SvTokenStream & rInStm ) override;
public:
SvMetaClass();
- void FillClasses( SvMetaClassList & rList );
+ void FillClasses( SvMetaClassList & rList );
- virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
- virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) override;
+ virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
+ virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) override;
};
#endif // INCLUDED_IDL_INC_OBJECT_HXX
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index d0bdc4a18b7a..999263aa0f02 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -27,32 +27,32 @@ class SvMetaSlot : public SvMetaAttribute
{
tools::SvRef<SvMetaType> aSlotType;
tools::SvRef<SvMetaSlot> aMethod;
- SvIdentifier aGroupId;
- SvIdentifier aExecMethod;
- SvIdentifier aStateMethod;
- SvBOOL aPseudoSlots;
-
- SvBOOL aToggle;
- SvBOOL aAutoUpdate;
-
- SvBOOL aAsynchron;
-
- SvBOOL aRecordPerItem;// exclusive
- SvBOOL aRecordPerSet;
- SvBOOL aNoRecord;
- SvBOOL aRecordAbsolute;
-
- SvBOOL aMenuConfig;
- SvBOOL aToolBoxConfig;
- SvBOOL aAccelConfig;
- SvBOOL aFastCall;
- SvBOOL aContainer;
- SvBOOL aImageRotation;
- SvBOOL aImageReflection;
- SvIdentifier aPseudoPrefix;
- SvString aDisableFlags;
- SvMetaSlot* pLinkedSlot;
- SvMetaSlot* pNextSlot;
+ SvIdentifier aGroupId;
+ SvIdentifier aExecMethod;
+ SvIdentifier aStateMethod;
+ SvBOOL aPseudoSlots;
+
+ SvBOOL aToggle;
+ SvBOOL aAutoUpdate;
+
+ SvBOOL aAsynchron;
+
+ SvBOOL aRecordPerItem;// exclusive
+ SvBOOL aRecordPerSet;
+ SvBOOL aNoRecord;
+ SvBOOL aRecordAbsolute;
+
+ SvBOOL aMenuConfig;
+ SvBOOL aToolBoxConfig;
+ SvBOOL aAccelConfig;
+ SvBOOL aFastCall;
+ SvBOOL aContainer;
+ SvBOOL aImageRotation;
+ SvBOOL aImageReflection;
+ SvIdentifier aPseudoPrefix;
+ SvString aDisableFlags;
+ SvMetaSlot* pLinkedSlot;
+ SvMetaSlot* pNextSlot;
sal_uLong nListPos;
SvMetaEnumValue* pEnumValue;
SvBOOL aReadOnlyDoc;
@@ -64,23 +64,11 @@ class SvMetaSlot : public SvMetaAttribute
size_t nStart,
SvIdlDataBase & rBase, SvStream & rOutStm );
- void SetEnumValue(SvMetaEnumValue *p)
- { pEnumValue = p; }
+ void SetEnumValue(SvMetaEnumValue *p) { pEnumValue = p; }
protected:
- void SetToggle( bool bSet )
- {
- aToggle = bSet;
- }
- void SetAutoUpdate( bool bSet )
- {
- aAutoUpdate = bSet;
- }
-
- void SetAsynchron( bool bSet )
- {
- aAsynchron = bSet;
- }
-
+ void SetToggle( bool bSet ) { aToggle = bSet; }
+ void SetAutoUpdate( bool bSet ) { aAutoUpdate = bSet; }
+ void SetAsynchron( bool bSet ) { aAsynchron = bSet; }
void SetRecordPerItem( bool bSet )
{
aRecordPerItem = bSet;
@@ -99,8 +87,7 @@ protected:
if( bSet )
aRecordPerItem = aRecordPerSet = false;
}
- void SetRecordAbsolute( bool bSet )
- { aRecordAbsolute = bSet; }
+ void SetRecordAbsolute( bool bSet ) { aRecordAbsolute = bSet; }
public:
SvMetaObject * MakeClone() const;
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 7044e00ac643..142a211001e9 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -27,8 +27,6 @@
struct SvSlotElement;
typedef std::vector< SvSlotElement* > SvSlotElementList;
-class SvMetaSlot;
-
class SvMetaType;
class SvMetaAttribute : public SvMetaReference
@@ -45,7 +43,7 @@ public:
void SetSlotId( const SvIdentifier & rId )
{ aSlotId = rId; }
- const SvIdentifier & GetSlotId() const;
+ const SvIdentifier& GetSlotId() const;
SvMetaType * GetType() const;
virtual bool IsMethod() const;
@@ -64,29 +62,27 @@ enum MetaTypeType { Method, Struct, Base, Enum, Class };
class SvMetaType : public SvMetaReference
{
- SvRefMemberList<SvMetaAttribute *>* pAttrList;
- MetaTypeType nType;
- bool bIsItem;
- bool bIsShell;
+ SvRefMemberList<SvMetaAttribute *> aAttrList;
+ MetaTypeType nType;
+ bool bIsItem;
+ bool bIsShell;
- void WriteSfxItem( const OString& rItemName, SvIdlDataBase & rBase,
- SvStream & rOutStm );
+ void WriteSfxItem( const OString& rItemName, SvIdlDataBase & rBase,
+ SvStream & rOutStm );
protected:
- bool ReadNamesSvIdl( SvTokenStream & rInStm );
- virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
+ bool ReadNamesSvIdl( SvTokenStream & rInStm );
+ virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
- bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
+ bool ReadHeaderSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
public:
SvMetaType();
SvMetaType( const OString& rTypeName );
virtual ~SvMetaType();
- SvRefMemberList<SvMetaAttribute *>& GetAttrList() const;
- sal_uLong GetAttrCount() const
- {
- return pAttrList ? pAttrList->size() : 0L;
- }
+ SvRefMemberList<SvMetaAttribute *>&
+ GetAttrList() { return aAttrList; }
+ sal_uLong GetAttrCount() const { return aAttrList.size(); }
void SetType( MetaTypeType nT );
MetaTypeType GetType() const { return nType; }
@@ -100,7 +96,7 @@ public:
sal_uLong MakeSfx( OStringBuffer& rAtrrArray );
virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
bool ReadMethodArgs( SvIdlDataBase & rBase,
- SvTokenStream & rInStm );
+ SvTokenStream & rInStm );
};
class SvMetaTypeString : public SvMetaType
@@ -120,7 +116,7 @@ public:
class SvMetaTypeEnum : public SvMetaType
{
SvRefMemberList<SvMetaEnumValue *> aEnumValueList;
- OString aPrefix;
+ OString aPrefix;
protected:
virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
public:
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 42deae19d378..07f7260790cf 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -150,8 +150,7 @@ void SvMetaAttribute::Insert (SvSlotElementList&, const OString&, SvIdlDataBase&
}
#define CTOR \
- : pAttrList( nullptr ) \
- , nType( MetaTypeType::Base ) \
+ : nType( MetaTypeType::Base ) \
, bIsItem( false ) \
, bIsShell( false ) \
@@ -166,23 +165,15 @@ SvMetaType::SvMetaType( const OString& rName )
SetName( rName );
}
-SvMetaType::~SvMetaType() {
- delete pAttrList;
-}
-
-SvRefMemberList<SvMetaAttribute *>& SvMetaType::GetAttrList() const
-{
- if( !pAttrList )
- const_cast<SvMetaType *>(this)->pAttrList = new SvRefMemberList<SvMetaAttribute *>();
- return *pAttrList;
-}
+SvMetaType::~SvMetaType()
+{}
void SvMetaType::SetType( MetaTypeType nT )
{
nType = nT;
if( nType == MetaTypeType::Class )
{
- OStringBuffer aTmp(C_PREF);
+ OStringBuffer aTmp("C_");
aTmp.append("Object *");
}
}
@@ -287,7 +278,7 @@ sal_uLong SvMetaType::MakeSfx( OStringBuffer& rAttrArray )
// write the single attributes
for( sal_uLong n = 0; n < nAttrCount; n++ )
{
- nC += (*pAttrList)[n]->MakeSfx( rAttrArray );
+ nC += aAttrList[n]->MakeSfx( rAttrArray );
if( n +1 < nAttrCount )
rAttrArray.append(", ");
}