summaryrefslogtreecommitdiff
path: root/rsc/inc
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-07-03 02:35:31 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-07-03 20:53:12 +0000
commitbb45bdf359c65c174fd557d615f77ceb46fa685c (patch)
tree1f87575ee1d0471b14f5078a99d3a589d955d56d /rsc/inc
parent27a4d5597c0757611d0e2e682d0c05441859cc4e (diff)
module rsc: String, bool and other clean-up.
Change-Id: I2dcde42e6068631a5a643961a764df86dc63dca2 Reviewed-on: https://gerrit.libreoffice.org/4690 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'rsc/inc')
-rw-r--r--rsc/inc/rscall.h19
-rw-r--r--rsc/inc/rscarray.hxx45
-rw-r--r--rsc/inc/rscclass.hxx50
-rw-r--r--rsc/inc/rscclobj.hxx69
-rw-r--r--rsc/inc/rscconst.hxx33
-rw-r--r--rsc/inc/rsccont.hxx58
-rw-r--r--rsc/inc/rscdb.hxx79
-rw-r--r--rsc/inc/rscdef.hxx171
-rw-r--r--rsc/inc/rscerror.h36
-rw-r--r--rsc/inc/rscflag.hxx67
-rw-r--r--rsc/inc/rsckey.hxx30
-rw-r--r--rsc/inc/rsclex.hxx10
-rw-r--r--rsc/inc/rscmgr.hxx28
-rw-r--r--rsc/inc/rscpar.hxx54
-rw-r--r--rsc/inc/rscrange.hxx129
-rw-r--r--rsc/inc/rscstr.hxx32
-rw-r--r--rsc/inc/rsctools.hxx8
-rw-r--r--rsc/inc/rsctop.hxx30
-rw-r--r--rsc/inc/rsctree.hxx4
19 files changed, 490 insertions, 462 deletions
diff --git a/rsc/inc/rscall.h b/rsc/inc/rscall.h
index 96b3954174d3..b1b919205304 100644
--- a/rsc/inc/rscall.h
+++ b/rsc/inc/rscall.h
@@ -70,25 +70,28 @@ extern AtomContainer* pHS;
/******************* T y p e s *******************************************/
enum RSCCLASS_TYPE { RSCCLASS_BOOL, RSCCLASS_STRING, RSCCLASS_NUMBER,
- RSCCLASS_CONST, RSCCLASS_COMPLEX, RSCCLASS_ENUMARRAY };
+ RSCCLASS_CONST, RSCCLASS_COMPLEX, RSCCLASS_ENUMARRAY };
typedef void (* VarEnumCallbackProc)( void * pData, RSCCLASS_TYPE, Atom );
/******************* S t r u c t s ***************************************/
-struct RSCINST {
+struct RSCINST
+{
RscTop * pClass;
CLASS_DATA pData;
RSCINST(){ pClass = NULL; pData = NULL; }
- RSCINST( RscTop * pCl, CLASS_DATA pClassData ){
- pClass = pCl;
- pData = pClassData;
- }
- sal_Bool IsInst() const { return( pData != NULL ); }
+ RSCINST( RscTop * pCl, CLASS_DATA pClassData )
+ {
+ pClass = pCl;
+ pData = pClassData;
+ }
+ bool IsInst() const { return( pData != NULL ); }
};
/********************** S U B I N F O S T R U C T ************************/
-struct SUBINFO_STRUCT {
+struct SUBINFO_STRUCT
+{
SUBINFO_STRUCT(){ nPos = 0; pClass = NULL; };
RscId aId; // Identifier der Resource
sal_uInt32 nPos; // Position der Resource
diff --git a/rsc/inc/rscarray.hxx b/rsc/inc/rscarray.hxx
index 9d036a5fc4fe..a3ec217ba73a 100644
--- a/rsc/inc/rscarray.hxx
+++ b/rsc/inc/rscarray.hxx
@@ -38,9 +38,9 @@ public:
RscInstNode * Left() const { return (RscInstNode *)pLeft ; };
RscInstNode * Right() const{ return (RscInstNode *)pRight ; };
RscInstNode * Search( sal_uInt32 nId ) const
- {
- return (RscInstNode *)IdNode::Search( nId );
- }
+ {
+ return (RscInstNode *)IdNode::Search( nId );
+ }
};
struct RscArrayInst
@@ -55,38 +55,35 @@ class RscArray : public RscTop
{
protected:
RscEnum * pTypeClass; // Typ der Eintraege
- sal_uInt32 nSize; // Groesse der Instanzdaten dieser Klasse
+ sal_uInt32 nSize; // Groesse der Instanzdaten dieser Klasse
// mit Superklassen
- sal_uInt32 nOffInstData;// Offset auf eigen Instanzdaten
+ sal_uInt32 nOffInstData;// Offset auf eigen Instanzdaten
void WriteSrcArray( const RSCINST & rInst, FILE * fOutput,
- RscTypCont * pTC, sal_uInt32 nTab, const char * );
+ RscTypCont * pTC, sal_uInt32 nTab, const char * );
public:
RscArray( Atom nId, sal_uInt32 nTypId,
- RscTop * pSuper, RscEnum * pTypeClass );
+ RscTop * pSuper, RscEnum * pTypeClass );
~RscArray();
virtual RSCCLASS_TYPE GetClassType() const;
- void SetTypeClass( RscEnum * pClass )
- {
- pTypeClass = pClass;
- }
+ void SetTypeClass( RscEnum * pClass ) { pTypeClass = pClass; }
virtual RscTop * GetTypeClass() const;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool );
void Destroy( const RSCINST & rInst );
virtual ERRTYPE GetValueEle( const RSCINST & rInst, sal_Int32 lValue,
- RscTop * pCreateClass,
- RSCINST * pGetInst );
+ RscTop * pCreateClass,
+ RSCINST * pGetInst );
virtual ERRTYPE GetArrayEle( const RSCINST & rInst, Atom nId,
- RscTop * pCreateClass,
- RSCINST * pGetInst );
+ RscTop * pCreateClass,
+ RSCINST * pGetInst );
// Gibt die Groesse der Klasse in Bytes
- sal_uInt32 Size(){ return( nSize ); };
+ sal_uInt32 Size(){ return nSize; }
- sal_Bool IsConsistent( const RSCINST & rInst );
+ bool IsConsistent( const RSCINST & rInst );
virtual void SetToDefault( const RSCINST & rInst );
- sal_Bool IsDefault( const RSCINST & rInst );
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsDefault( const RSCINST & rInst );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
virtual void WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab,
@@ -94,14 +91,14 @@ public:
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
class RscClassArray : public RscArray
{
public:
RscClassArray( Atom nId, sal_uInt32 nTypId,
- RscTop * pSuper, RscEnum * pTypeClass );
+ RscTop * pSuper, RscEnum * pTypeClass );
~RscClassArray();
virtual void WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab,
@@ -110,7 +107,7 @@ public:
RscTypCont * pTC, sal_uInt32 nTab, const char * );
virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, const RscId & aId,
- sal_uInt32 nDeep, sal_Bool bExtra );
+ sal_uInt32 nDeep, bool bExtra );
};
@@ -118,7 +115,7 @@ class RscLangArray : public RscArray
{
public:
RscLangArray( Atom nId, sal_uInt32 nTypId,
- RscTop * pSuper, RscEnum * pTypeClass );
+ RscTop * pSuper, RscEnum * pTypeClass );
virtual RSCCLASS_TYPE GetClassType() const;
};
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx
index 609d288f8a68..f32ab9d1aaca 100644
--- a/rsc/inc/rscclass.hxx
+++ b/rsc/inc/rscclass.hxx
@@ -27,10 +27,12 @@
class RscClass : public RscTop
{
protected:
- struct RscClassInst{
- sal_uLong nVarDflt;
+ struct RscClassInst
+ {
+ sal_uLong nVarDflt;
};
- struct VARTYPE_STRUCT {
+ struct VARTYPE_STRUCT
+ {
Atom nVarName; // Variablenname
RSCVAR nVarType; // Variablentyp
sal_uInt32 nMask; // Maskierungsbit
@@ -39,20 +41,20 @@ protected:
CLASS_DATA pDefault; // Zeiger auf DefaultDaten
Atom nDataBaseName;//Name fuer Fremddatenbereich
};
- sal_uInt32 nSuperSize; // Groesse der Instanzdaten der SuperKl.
- sal_uInt32 nSize; // Groesse der Instanzdaten dieser Klasse
+ sal_uInt32 nSuperSize; // Groesse der Instanzdaten der SuperKl.
+ sal_uInt32 nSize; // Groesse der Instanzdaten dieser Klasse
// mit Superklassen
- sal_uInt32 nEntries; // Eintraege in pVarTypeList
+ sal_uInt32 nEntries; // Eintraege in pVarTypeList
VARTYPE_STRUCT * pVarTypeList; // Variablenliste
RSCINST GetInstData( CLASS_DATA pData, sal_uInt32 nEle,
- sal_Bool bGetCopy = sal_False );
+ bool bGetCopy = false );
CLASS_DATA GetDfltData( sal_uInt32 nEle );
- sal_Bool IsDflt( CLASS_DATA pData, sal_uInt32 nEle );
- sal_Bool IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle );
+ bool IsDflt( CLASS_DATA pData, sal_uInt32 nEle );
+ bool IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle );
void SetVarDflt( CLASS_DATA pData, sal_uInt32 nEle,
- sal_Bool bSet );
- sal_Int32 GetCorrectValues( const RSCINST & rInst, sal_uInt32 nVarPos,
- sal_uInt32 nTupelIdx, RscTypCont * pTC );
+ bool bSet );
+ sal_Int32 GetCorrectValues( const RSCINST & rInst, sal_uInt32 nVarPos,
+ sal_uInt32 nTupelIdx, RscTypCont * pTC );
public:
RscClass( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
~RscClass();
@@ -67,29 +69,29 @@ public:
virtual void EnumVariables( void * pData, VarEnumCallbackProc );
RSCINST GetVariable( const RSCINST & rInst, Atom nVarName,
const RSCINST & rInitInst,
- sal_Bool nInitDflt = sal_False,
+ bool nInitDflt = false,
RscTop * pCreateClass = NULL );
RSCINST GetCopyVar( const RSCINST & rInst, Atom nVarName );
// Gibt die Groesse der Klasse in Bytes
- sal_uInt32 Size(){ return( nSize ); };
+ sal_uInt32 Size(){ return nSize; }
- sal_Bool IsConsistent( const RSCINST & rInst );
+ bool IsConsistent( const RSCINST & rInst );
void SetToDefault( const RSCINST & rInst );
- sal_Bool IsDefault( const RSCINST & rInst );
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsDefault( const RSCINST & rInst );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
void SetDefault( const RSCINST & rData, Atom nVarId );
using RscTop::GetDefault;
RSCINST GetDefault( Atom nVarId );
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool );
void Destroy( const RSCINST & rInst );
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteInstRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
class RscSysDepend : public RscClass
@@ -97,10 +99,10 @@ class RscSysDepend : public RscClass
public:
RscSysDepend( Atom nId, sal_uInt32 nTypId, RscTop * pSuper );
ERRTYPE WriteSysDependRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra,
- sal_Bool bFirst = sal_False );
+ RscTypCont * pTC, sal_uInt32, bool bExtra,
+ bool bFirst = false );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
class RscTupel : public RscClass
@@ -108,7 +110,7 @@ class RscTupel : public RscClass
public:
RscTupel( Atom nId, sal_uInt32 nTypId, RscTop * pSuper );
RSCINST GetTupelVar( const RSCINST & rInst, sal_uInt32 nPos,
- const RSCINST & rInitInst );
+ const RSCINST & rInitInst );
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
};
diff --git a/rsc/inc/rscclobj.hxx b/rsc/inc/rscclobj.hxx
index 8eba2316da4c..463f119778d4 100644
--- a/rsc/inc/rscclobj.hxx
+++ b/rsc/inc/rscclobj.hxx
@@ -24,10 +24,11 @@
#include <rscall.h>
/******************* O b j N o d e ***************************************/
-class ObjNode : public IdNode{
+class ObjNode : public IdNode
+{
RscId aRscId; // Id der Resource
CLASS_DATA pRscObj;// pointer to a resourceobject
- sal_uLong lFileKey;// Dateischluessel
+ sal_uLong lFileKey;// Dateischluessel
protected:
using NameNode::Search;
@@ -36,26 +37,29 @@ public:
ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey );
ObjNode * DelObjNode( RscTop * pClass, sal_uLong lFileKey );
- sal_uInt32 GetId() const;
+ sal_uInt32 GetId() const;
RscId GetRscId(){ return( aRscId ); }
- sal_uLong GetFileKey(){ return lFileKey; };
- ObjNode* Search( const RscId &rName ) const{
- // search the index in the b-tree
- return( (ObjNode *)IdNode::Search( rName ) );
- }
- sal_Bool Insert( ObjNode* pTN ){
- // insert a new node in the b-tree
- return( IdNode::Insert( (IdNode *)pTN ) );
- }
- CLASS_DATA GetRscObj(){
- // get the Object from this Node
- return( pRscObj );
- }
- sal_Bool IsConsistent();
+ sal_uLong GetFileKey(){ return lFileKey; };
+ ObjNode* Search( const RscId &rName ) const //< search the index in the b-tree
+ {
+ return( (ObjNode *)IdNode::Search( rName ) );
+ }
+ bool Insert( ObjNode* pTN ) //< insert a new node in the b-tree
+
+ {
+ return( IdNode::Insert( (IdNode *)pTN ) );
+ }
+ CLASS_DATA GetRscObj() //< get the Object from this Node
+
+ {
+ return( pRscObj );
+ }
+ bool IsConsistent();
};
/******************* R e f N o d e ***************************************/
-class RefNode : public IdNode{
+class RefNode : public IdNode
+{
Atom nTypNameId; // index of a Name in a hashtabel
protected:
using NameNode::Search;
@@ -65,24 +69,25 @@ public:
ObjNode* pObjBiTree; // Zeiger auf Objektbaum
RefNode( Atom nTyp );
- sal_uInt32 GetId() const;
- RefNode* Search( Atom typ ) const{
- // search the index in the b-tree
- return( (RefNode *)IdNode::Search( typ ) );
- };
- sal_Bool Insert( RefNode* pTN ){
- // insert a new node in the b-tree
- return( IdNode::Insert( (IdNode *)pTN ) );
- };
- sal_Bool PutObjNode( ObjNode * pPutObject );
+ sal_uInt32 GetId() const;
+ RefNode* Search( Atom typ ) const //< search the index in the b-tree
+ {
+ return( (RefNode *)IdNode::Search( typ ) );
+ }
+ bool Insert( RefNode* pTN ) //< insert a new node in the b-tree
+ {
+ return( IdNode::Insert( (IdNode *)pTN ) );
+ }
+ bool PutObjNode( ObjNode * pPutObject );
// insert new node in b-tree pObjBiTree
ObjNode * GetObjNode( const RscId &rRscId );
- ObjNode * GetObjNode(){
- // hole pObjBiTree
- return( pObjBiTree );
- };
+ ObjNode * GetObjNode()
+ {
+ // hole pObjBiTree
+ return( pObjBiTree );
+ }
};
#endif // _RSCCLOBJ_HXX
diff --git a/rsc/inc/rscconst.hxx b/rsc/inc/rscconst.hxx
index 3cba043db1fc..1e48f27bfcce 100644
--- a/rsc/inc/rscconst.hxx
+++ b/rsc/inc/rscconst.hxx
@@ -27,46 +27,49 @@
class RscConst : public RscTop
{
protected:
- struct VarEle {
+ struct VarEle
+ {
Atom nId; // Name der Konstante
sal_Int32 lValue; // Wert der Konstante
};
- VarEle * pVarArray; // Zeiger auf das Feld mit Konstanten
+ VarEle * pVarArray; // Zeiger auf das Feld mit Konstanten
sal_uInt32 nEntries; // Anzahle der Eintraege im Feld
public:
RscConst( Atom nId, sal_uInt32 nTypId );
~RscConst();
virtual RSCCLASS_TYPE GetClassType() const;
- sal_uInt32 GetEntryCount() const { return nEntries; }
+ sal_uInt32 GetEntryCount() const { return nEntries; }
// Die erlaubten Werte werden gesetzt
ERRTYPE SetConstant( Atom nVarName, sal_Int32 lValue );
Atom GetConstant( sal_uInt32 nPos );
- sal_Bool GetConstValue( Atom nConstId, sal_Int32 * pVal ) const;
- sal_Bool GetValueConst( sal_Int32 nValue, Atom * pConstId ) const;
+ bool GetConstValue( Atom nConstId, sal_Int32 * pVal ) const;
+ bool GetValueConst( sal_Int32 nValue, Atom * pConstId ) const;
sal_uInt32 GetConstPos( Atom nConstId );
};
-class RscEnum : public RscConst {
- struct RscEnumInst {
+class RscEnum : public RscConst
+{
+ struct RscEnumInst
+ {
sal_uInt32 nValue; // Position der Konstanten im Array
- sal_Bool bDflt; // Ist Default
+ bool bDflt; // Ist Default
};
- sal_uInt32 nSize;
+ sal_uInt32 nSize;
public:
RscEnum( Atom nId, sal_uInt32 nTypId );
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
- sal_uInt32 Size(){ return nSize; }
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool );
+ sal_uInt32 Size(){ return nSize; }
virtual void SetToDefault( const RSCINST & rInst )
{
- ((RscEnumInst*)rInst.pData)->bDflt = sal_True;
+ ((RscEnumInst*)rInst.pData)->bDflt = true;
}
- sal_Bool IsDefault( const RSCINST & rInst )
+ bool IsDefault( const RSCINST & rInst )
{
return( ((RscEnumInst*)rInst.pData)->bDflt );
};
// Als Default setzen
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
sal_Int32 nValue );
@@ -76,7 +79,7 @@ public:
void WriteSrc( const RSCINST &rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
class RscNameTable;
diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx
index fe7ad8704765..e23f1455b5d7 100644
--- a/rsc/inc/rsccont.hxx
+++ b/rsc/inc/rsccont.hxx
@@ -23,16 +23,18 @@
#include <rscerror.h>
#include <rsctop.hxx>
-struct ENTRY_STRUCT {
+struct ENTRY_STRUCT
+{
RscId aName;
RSCINST aInst;
void Create(){ aName.Create(); aInst = RSCINST(); }
void Destroy();
};
-struct RscBaseContInst {
+struct RscBaseContInst
+{
sal_uInt32 nEntries;
ENTRY_STRUCT * pEntries;
- sal_Bool bDflt;
+ bool bDflt;
};
class RscBaseCont : public RscTop
@@ -40,10 +42,10 @@ class RscBaseCont : public RscTop
protected:
RscTop * pTypeClass; // Typ der Eintraege
RscTop * pTypeClass1;// Zwei verschiedene Typen moeglich
- sal_Bool bNoId; // Keine Identifier
- sal_uInt32 nSize; // Groesse der Instanzdaten dieser Klasse
+ bool bNoId; // Keine Identifier
+ sal_uInt32 nSize; // Groesse der Instanzdaten dieser Klasse
// mit Superklassen
- sal_uInt32 nOffInstData;// Offset auf eigen Instanzdaten
+ sal_uInt32 nOffInstData;// Offset auf eigen Instanzdaten
void DestroyElements( RscBaseContInst * pClassData );
RSCINST SearchElePos( const RSCINST & rInst, const RscId & rEleName,
RscTop * pClass, sal_uInt32 nPos );
@@ -51,19 +53,19 @@ protected:
void ContWriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE ContWriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
public:
RscBaseCont( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = NULL,
- sal_Bool bNoId = sal_True );
+ bool bNoId = true );
~RscBaseCont();
virtual RSCCLASS_TYPE GetClassType() const;
void SetTypeClass( RscTop * pClass, RscTop * pClass1 = NULL )
- {
- pTypeClass = pClass;
- pTypeClass1 = pClass1;
- };
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
+ {
+ pTypeClass = pClass;
+ pTypeClass1 = pClass1;
+ }
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool );
void Destroy( const RSCINST & rInst );
ERRTYPE GetElement( const RSCINST & rInst, const RscId & rEleName,
RscTop * pCreateClass, const RSCINST & rCreateInst,
@@ -79,18 +81,18 @@ public:
SUBINFO_STRUCT GetInfoEle( const RSCINST & rInst, sal_uInt32 nPos );
ERRTYPE SetString( const RSCINST &, const char * pStr );
ERRTYPE SetNumber( const RSCINST &, sal_Int32 lValue );
- ERRTYPE SetBool( const RSCINST & rInst, sal_Bool bValue );
+ ERRTYPE SetBool( const RSCINST & rInst, bool bValue );
ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
sal_Int32 nValue );
ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
// Gibt die Groesse der Klasse in Bytes
- sal_uInt32 Size(){ return( nSize ); };
+ sal_uInt32 Size(){ return nSize; }
- sal_Bool IsConsistent( const RSCINST & rInst );
+ bool IsConsistent( const RSCINST & rInst );
void SetToDefault( const RSCINST & rInst );
- sal_Bool IsDefault( const RSCINST & rInst );
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsDefault( const RSCINST & rInst );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
void Delete( const RSCINST & rInst, RscTop * pClass,
const RscId & rId );
@@ -99,7 +101,7 @@ public:
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32 , sal_Bool bExtra);
+ RscTypCont * pTC, sal_uInt32 , bool bExtra);
};
class RscContWriteSrc : public RscBaseCont
@@ -107,27 +109,29 @@ class RscContWriteSrc : public RscBaseCont
public:
RscContWriteSrc( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = NULL,
- sal_Bool bNoId = sal_True );
+ bool bNoId = true );
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
};
-class RscCont : public RscContWriteSrc {
+class RscCont : public RscContWriteSrc
+{
public:
RscCont( Atom nId, sal_uInt32 nTypId,
RscTop * pSuper = NULL,
- sal_Bool bNoId = sal_True );
+ bool bNoId = true );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
-class RscContExtraData : public RscContWriteSrc {
+class RscContExtraData : public RscContWriteSrc
+{
public:
RscContExtraData( Atom nId, sal_uInt32 nTypId,
- RscTop * pSuper = NULL,
- sal_Bool bNoId = sal_True );
+ RscTop * pSuper = NULL,
+ bool bNoId = true );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
#endif //_RSCCONT_HXX
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index c0a416575ddd..b8bc6b571bcd 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -28,7 +28,6 @@
#include <rscstr.hxx>
#include <rscarray.hxx>
#include <rscdef.hxx>
-#include <tools/string.hxx>
#include <vector>
#include <map>
@@ -63,13 +62,13 @@ typedef ::std::vector< RscSysEntry* > RscSysList;
class RscTypCont
{
- CharSet nSourceCharSet;
+ rtl_TextEncoding nSourceCharSet;
sal_uInt32 nMachineId; // Globaler Maschinentyp
RSCBYTEORDER_TYPE nByteOrder; // Intel oder
- OString aLanguage; // output language
+ OString aLanguage; // output language
std::vector< sal_uInt32 > aLangFallbacks; // language fallback list (entry 0 is language itself)
- OString aSearchPath; // Suchen der Bitmap, Icon, Pointer
- OString aSysSearchPath; // aSearchPath plus language specific paths
+ OString aSearchPath; // Suchen der Bitmap, Icon, Pointer
+ OString aSysSearchPath; // aSearchPath plus language specific paths
sal_uInt32 nUniqueId; // eindeutiger Id fuer Systemresourcen
sal_uLong nFilePos; // Position in der Datei ( MTF )
sal_uInt32 nPMId; // eindeutiger Id fuer PM-Rseourcefile
@@ -286,7 +285,7 @@ public:
RscError* pEH; // Fehlerhandler
RscNameTable aNmTb; // Tabelle fuer Namen
RscFileTab aFileTab; // Tabelle der Dateinamen
- sal_uInt32 nFlags;
+ sal_uInt32 nFlags;
std::map<sal_uInt64, sal_uLong> aIdTranslator; //Ordnet Resourcetypen und Id's einen Id zu
//(unter PM), oder eine Dateiposition (MTF)
@@ -295,43 +294,43 @@ public:
Atom AddLanguage( const char* );
- sal_Bool IsPreload() const
- { return (nFlags & PRELOAD_FLAG) ? sal_True : sal_False; }
- sal_Bool IsSysResTest() const
- { return (nFlags & NOSYSRESTEST_FLAG) ? sal_False : sal_True; }
- sal_Bool IsSrsDefault() const
- { return (nFlags & SRSDEFAULT_FLAG) ? sal_True : sal_False; }
- OString ChangeLanguage(const OString & rNewLang);
+ bool IsPreload() const
+ { return (nFlags & PRELOAD_FLAG) ? true : false; }
+ bool IsSysResTest() const
+ { return (nFlags & NOSYSRESTEST_FLAG) ? false : true; }
+ bool IsSrsDefault() const
+ { return (nFlags & SRSDEFAULT_FLAG) ? true : false; }
+ OString ChangeLanguage(const OString & rNewLang);
const std::vector< sal_uInt32 >& GetFallbacks() const
- { return aLangFallbacks; }
+ { return aLangFallbacks; }
RSCBYTEORDER_TYPE GetByteOrder() const { return nByteOrder; }
- CharSet GetSourceCharSet() const { return nSourceCharSet; }
- CharSet SetSourceCharSet( CharSet aCharSet )
- {
- CharSet aOld = nSourceCharSet;
- nSourceCharSet = aCharSet;
- return aOld;
- }
- void SetSearchPath( const OString& rStr) { aSearchPath = rStr; }
- OString GetSearchPath() const { return aSearchPath; }
- void SetSysSearchPath( const OString& rStr ) { aSysSearchPath = rStr; }
- void InsertType( RscTop * pType )
- {
- aBaseLst.push_back( pType );
- }
- RscTop * SearchType( Atom nTypId );
- // loescht alle Resourceobjekte diese Datei
- void Delete( sal_uLong lFileKey );
- RscTop * GetRoot() { return( pRoot ); };
- sal_uInt32 PutSysName( sal_uInt32 nRscTyp, char * pName, sal_uInt32 nConst,
- sal_uInt32 nId, sal_Bool bFirst );
- void ClearSysNames();
- ERRTYPE WriteRc( WriteRcContext& rContext );
- void WriteSrc( FILE * fOutput, sal_uLong nFileIndex,
- sal_Bool bName = sal_True );
- sal_uInt32 PutTranslatorKey( sal_uInt64 nKey );
- void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; }
+ rtl_TextEncoding GetSourceCharSet() const { return nSourceCharSet; }
+ rtl_TextEncoding SetSourceCharSet( rtl_TextEncoding aCharSet )
+ {
+ rtl_TextEncoding aOld = nSourceCharSet;
+ nSourceCharSet = aCharSet;
+ return aOld;
+ }
+ void SetSearchPath( const OString& rStr) { aSearchPath = rStr; }
+ OString GetSearchPath() const { return aSearchPath; }
+ void SetSysSearchPath( const OString& rStr ) { aSysSearchPath = rStr; }
+ void InsertType( RscTop * pType )
+ {
+ aBaseLst.push_back( pType );
+ }
+ RscTop * SearchType( Atom nTypId );
+ // loescht alle Resourceobjekte diese Datei
+ void Delete( sal_uLong lFileKey );
+ RscTop * GetRoot() { return pRoot; }
+ sal_uInt32 PutSysName( sal_uInt32 nRscTyp, char * pName, sal_uInt32 nConst,
+ sal_uInt32 nId, bool bFirst );
+ void ClearSysNames();
+ ERRTYPE WriteRc( WriteRcContext& rContext );
+ void WriteSrc( FILE * fOutput, sal_uLong nFileIndex,
+ bool bName = true );
+ sal_uInt32 PutTranslatorKey( sal_uInt64 nKey );
+ void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; }
};
#endif
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index 0ca4ec6b5ff5..f279ddb2f18f 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -38,37 +38,41 @@ class RscDefine;
class RscExpType
{
public:
- union {
+ union
+ {
RscExpression * pExp;
RscDefine * pDef;
- struct {
+ struct
+ {
short nHi;
unsigned short nLo;
} aLong;
} aExp;
char cType;
char cUnused;
- sal_Bool IsNumber() const { return( RSCEXP_LONG == cType ); }
- sal_Bool IsExpression()const { return( RSCEXP_EXP == cType ); }
- sal_Bool IsDefinition()const { return( RSCEXP_DEF == cType ); }
- sal_Bool IsNothing() const { return( RSCEXP_NOTHING == cType ); }
- void SetLong( sal_Int32 lValue ){
- aExp.aLong.nHi = (short)(lValue >> 16);
- aExp.aLong.nLo = (unsigned short)lValue;
- cType = RSCEXP_LONG;
- }
- sal_Int32 GetLong() const{
- return aExp.aLong.nLo |
- ((sal_Int32)aExp.aLong.nHi << 16);
- }
- sal_Bool Evaluate( sal_Int32 * pValue ) const;
+ bool IsNumber() const { return( RSCEXP_LONG == cType ); }
+ bool IsExpression()const { return( RSCEXP_EXP == cType ); }
+ bool IsDefinition()const { return( RSCEXP_DEF == cType ); }
+ bool IsNothing() const { return( RSCEXP_NOTHING == cType ); }
+ void SetLong( sal_Int32 lValue )
+ {
+ aExp.aLong.nHi = (short)(lValue >> 16);
+ aExp.aLong.nLo = (unsigned short)lValue;
+ cType = RSCEXP_LONG;
+ }
+ sal_Int32 GetLong() const
+ {
+ return aExp.aLong.nLo |
+ ((sal_Int32)aExp.aLong.nHi << 16);
+ }
+ bool Evaluate( sal_Int32 * pValue ) const;
void AppendMacro( OStringBuffer & ) const;
};
/*********** R s c I d ***************************************************/
class RscId
{
- static sal_Bool bNames;// sal_False, bei den Namenoperation nur Zahlen
+ static bool bNames;// false, bei den Namenoperation nur Zahlen
public:
RscExpType aExp; // Zahl, Define oder Ausdruck
sal_Int32 GetNumber() const;
@@ -86,25 +90,23 @@ public:
void Destroy();
- ~RscId(){
- Destroy();
- }
+ ~RscId() { Destroy(); }
RscId( const RscId& rRscId );
RscId& operator = ( const RscId& rRscId );
- static void SetNames( sal_Bool bSet = sal_True );
- operator sal_Int32() const; // Gibt Nummer zurueck
+ static void SetNames( bool bSet = true );
+ operator sal_Int32() const; // Gibt Nummer zurueck
OString GetName() const; // Gibt den Namen des Defines zurueck
- sal_Bool operator < ( const RscId& rRscId ) const;
- sal_Bool operator > ( const RscId& rRscId ) const;
- sal_Bool operator == ( const RscId& rRscId ) const;
- sal_Bool operator <= ( const RscId& rRscId ) const
- { return !(operator > ( rRscId )); }
- sal_Bool operator >= ( const RscId& rRscId ) const
- { return !(operator < ( rRscId )); }
- sal_Bool IsId() const { return !aExp.IsNothing(); }
+ bool operator < ( const RscId& rRscId ) const;
+ bool operator > ( const RscId& rRscId ) const;
+ bool operator == ( const RscId& rRscId ) const;
+ bool operator <= ( const RscId& rRscId ) const
+ { return !(operator > ( rRscId )); }
+ bool operator >= ( const RscId& rRscId ) const
+ { return !(operator < ( rRscId )); }
+ bool IsId() const { return !aExp.IsNothing(); }
};
/*********** R s c D e f i n e *******************************************/
@@ -115,35 +117,36 @@ friend class RscDefineList;
friend class RscDefTree;
friend class RscExpression;
friend class RscId;
- sal_uLong lFileKey; // zu welcher Datei gehoert das Define
- sal_uInt32 nRefCount; // Wieviele Referenzen auf dieses Objekt
- sal_Int32 lId; // Identifier
+ sal_uLong lFileKey; // zu welcher Datei gehoert das Define
+ sal_uInt32 nRefCount; // Wieviele Referenzen auf dieses Objekt
+ sal_Int32 lId; // Identifier
RscExpression * pExp; // Ausdruck
protected:
- RscDefine( sal_uLong lFileKey, const OString& rDefName,
- sal_Int32 lDefId );
- RscDefine( sal_uLong lFileKey, const OString& rDefName,
- RscExpression * pExpression );
- ~RscDefine();
- void IncRef(){ nRefCount++; }
+ RscDefine( sal_uLong lFileKey, const OString& rDefName,
+ sal_Int32 lDefId );
+ RscDefine( sal_uLong lFileKey, const OString& rDefName,
+ RscExpression * pExpression );
+ ~RscDefine();
+ void IncRef(){ nRefCount++; }
sal_uInt32 GetRefCount() const { return nRefCount; }
- void DecRef();
- void DefineToNumber();
- void SetName(const OString& rNewName) { m_aName = rNewName; }
+ void DecRef();
+ void DefineToNumber();
+ void SetName(const OString& rNewName) { m_aName = rNewName; }
using StringNode::Search;
public:
RscDefine * Search( const char * );
- sal_uLong GetFileKey() const { return lFileKey; }
- sal_Bool Evaluate();
- sal_Int32 GetNumber() const { return lId; }
- OString GetMacro();
+ sal_uLong GetFileKey() const { return lFileKey; }
+ bool Evaluate();
+ sal_Int32 GetNumber() const { return lId; }
+ OString GetMacro();
};
typedef ::std::vector< RscDefine* > RscSubDefList;
-class RscDefineList {
+class RscDefineList
+{
friend class RscFile;
friend class RscFileTab;
private:
@@ -153,19 +156,21 @@ private:
sal_Int32 lDefId, size_t lPos );
RscDefine * New( sal_uLong lFileKey, const OString& rDefName,
RscExpression * pExpression, size_t lPos );
- sal_Bool Remove();
- size_t GetPos( RscDefine* item ) {
- for ( size_t i = 0, n = maList.size(); i < n; ++i )
- if ( maList[ i ] == item )
- return i;
- return size_t(-1);
- }
+ bool Remove();
+ size_t GetPos( RscDefine* item )
+ {
+ for ( size_t i = 0, n = maList.size(); i < n; ++i )
+ if ( maList[ i ] == item )
+ return i;
+ return size_t(-1);
+ }
public:
void WriteAll( FILE * fOutput );
};
/*********** R s c E x p r e s s i o n ***********************************/
-class RscExpression {
+class RscExpression
+{
friend class RscFileTab;
char cOperation;
RscExpType aLeftExp;
@@ -174,15 +179,16 @@ public:
RscExpression( RscExpType aLE, char cOp,
RscExpType aRE );
~RscExpression();
- sal_Bool Evaluate( sal_Int32 * pValue );
- OString GetMacro();
+ bool Evaluate( sal_Int32 * pValue );
+ OString GetMacro();
};
/********************** R S C F I L E ************************************/
-class RscDepend {
- sal_uLong lKey;
+class RscDepend
+{
+ sal_uLong lKey;
public:
- RscDepend( sal_uLong lIncKey ){ lKey = lIncKey; };
+ RscDepend( sal_uLong lIncKey ){ lKey = lIncKey; };
sal_uLong GetFileKey(){ return lKey; }
};
@@ -192,31 +198,32 @@ typedef ::std::vector< RscDepend* > RscDependList;
class RscFile
{
friend class RscFileTab;
- sal_Bool bIncFile; // Ist es eine Include-Datei
+ bool bIncFile; // Ist es eine Include-Datei
public:
- sal_Bool bLoaded; // Ist die Datei geladen
- sal_Bool bScanned; // Wurde Datei nach Inclide abgesucht
- sal_Bool bDirty; // Dirty-Flag
- OString aFileName; // Name der Datei
- OString aPathName; // Pfad und Name der Datei
+ bool bLoaded; // Ist die Datei geladen
+ bool bScanned; // Wurde Datei nach Inclide abgesucht
+ bool bDirty; // Dirty-Flag
+ OString aFileName; // Name der Datei
+ OString aPathName; // Pfad und Name der Datei
RscDefineList aDefLst; // Liste der Defines
RscDependList aDepLst; // List of Depend
RscFile();
~RscFile();
- sal_Bool InsertDependFile( sal_uLong lDepFile, size_t lPos );
- sal_Bool Depend( sal_uLong lDepend, sal_uLong lFree );
- void SetIncFlag(){ bIncFile = sal_True; };
- sal_Bool IsIncFile(){ return bIncFile; };
+ bool InsertDependFile( sal_uLong lDepFile, size_t lPos );
+ bool Depend( sal_uLong lDepend, sal_uLong lFree );
+ void SetIncFlag(){ bIncFile = true; };
+ bool IsIncFile(){ return bIncFile; };
};
typedef UniqueIndex<RscFile> RscSubFileTab;
#define NOFILE_INDEX UNIQUEINDEX_ENTRY_NOTFOUND
-class RscDefTree {
+class RscDefTree
+{
RscDefine * pDefRoot;
public:
- static sal_Bool Evaluate( RscDefine * pDef );
+ static bool Evaluate( RscDefine * pDef );
RscDefTree(){ pDefRoot = NULL; }
~RscDefTree();
void Remove();
@@ -235,14 +242,14 @@ public:
RscDefine * FindDef( const char * );
RscDefine * FindDef(const OString& rStr)
- {
- return FindDef(rStr.getStr());
- }
+ {
+ return FindDef(rStr.getStr());
+ }
- sal_Bool Depend( sal_uLong lDepend, sal_uLong lFree );
- sal_Bool TestDef( sal_uLong lFileKey, size_t lPos,
+ bool Depend( sal_uLong lDepend, sal_uLong lFree );
+ bool TestDef( sal_uLong lFileKey, size_t lPos,
const RscDefine * pDefDec );
- sal_Bool TestDef( sal_uLong lFileKey, size_t lPos,
+ bool TestDef( sal_uLong lFileKey, size_t lPos,
const RscExpression * pExpDec );
RscDefine * NewDef( sal_uLong lKey, const OString& rDefName,
@@ -251,10 +258,10 @@ public:
RscExpression *, sal_uLong lPos );
// Alle Defines die in dieser Datei Definiert sind loeschen
- void DeleteFileContext( sal_uLong lKey );
- sal_uLong NewCodeFile(const OString& rName);
- sal_uLong NewIncFile(const OString& rName, const OString& rPath);
- RscFile * GetFile( sal_uLong lFileKey ){ return Get( lFileKey ); }
+ void DeleteFileContext( sal_uLong lKey );
+ sal_uLong NewCodeFile(const OString& rName);
+ sal_uLong NewIncFile(const OString& rName, const OString& rPath);
+ RscFile * GetFile( sal_uLong lFileKey ){ return Get( lFileKey ); }
};
#endif // _RSCDEF_HXX
diff --git a/rsc/inc/rscerror.h b/rsc/inc/rscerror.h
index 6b8a579594e4..6c7fd6ef1926 100644
--- a/rsc/inc/rscerror.h
+++ b/rsc/inc/rscerror.h
@@ -85,20 +85,19 @@
#define ERR_WARNINGEND 0x2000
-class ERRTYPE {
+class ERRTYPE
+{
sal_uInt32 nError;
public:
ERRTYPE() { nError = ERR_OK; }
ERRTYPE( sal_uInt32 nErr ) { nError = nErr; }
- ERRTYPE( const ERRTYPE & rErr ) { nError = rErr.nError; };
+ ERRTYPE( const ERRTYPE & rErr ) { nError = rErr.nError; }
ERRTYPE& operator = ( const ERRTYPE & rError );
- operator sal_uInt32() const { return( nError ); }
- sal_Bool IsError() const { return( nError <= ERR_ERROREND ); }
- sal_Bool IsOk() const { return( !IsError() ); }
- sal_Bool IsWarning() const {
- return( nError >= ERR_WARNINGSTART && nError <= ERR_WARNINGEND );
- };
- void Clear(){ nError = ERR_OK; }
+ operator sal_uInt32() const { return( nError ); }
+ bool IsError() const { return nError <= ERR_ERROREND; }
+ bool IsOk() const { return !IsError(); }
+ bool IsWarning() const { return nError >= ERR_WARNINGSTART && nError <= ERR_WARNINGEND;}
+ void Clear(){ nError = ERR_OK; }
};
/****************** R s c E r r o r **************************************/
@@ -126,17 +125,14 @@ public:
virtual ~RscError() {}
sal_uInt32 nErrors;// Anzahl der Fehler
- RscError( RscVerbosity _verbosity ) {
- fListing = NULL;
- nErrors = 0;
- m_verbosity = _verbosity;
- };
- void SetListFile( FILE * fList ){
- fListing = fList;
- };
- FILE * GetListFile(){
- return fListing;
- };
+ RscError( RscVerbosity _verbosity )
+ {
+ fListing = NULL;
+ nErrors = 0;
+ m_verbosity = _verbosity;
+ }
+ void SetListFile( FILE * fList ){ fListing = fList; }
+ FILE * GetListFile(){ return fListing; }
RscVerbosity GetVerbosity() const { return m_verbosity; }
virtual void StdOut( const char *, const RscVerbosity _verbosityLevel = RscVerbosityNormal );
virtual void StdErr( const char * );
diff --git a/rsc/inc/rscflag.hxx b/rsc/inc/rscflag.hxx
index 981272a9422f..aefbf0de135a 100644
--- a/rsc/inc/rscflag.hxx
+++ b/rsc/inc/rscflag.hxx
@@ -25,29 +25,31 @@
#include <rscconst.hxx>
/******************* R s c F l a g ***************************************/
-class RscFlag : public RscConst {
- struct RscFlagInst{
+class RscFlag : public RscConst
+{
+ struct RscFlagInst
+ {
sal_uInt32 nFlags;
sal_uInt32 nDfltFlags;
};
RSCINST CreateBasic( RSCINST * pInst );
public:
RscFlag( Atom nId, sal_uInt32 nTypId );
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool );
RSCINST CreateClient( RSCINST * pInst, const RSCINST & rDflt,
- sal_Bool bOwnClass, Atom nConsId );
- sal_uInt32 Size();
+ bool bOwnClass, Atom nConsId );
+ sal_uInt32 Size();
virtual void SetToDefault( const RSCINST & rInst );
- sal_Bool IsDefault( const RSCINST & rInst );
- sal_Bool IsDefault( const RSCINST & rInst, Atom nConstId );
+ bool IsDefault( const RSCINST & rInst );
+ bool IsDefault( const RSCINST & rInst, Atom nConstId );
// Ist das Flag gesetzt
- sal_Bool IsSet( const RSCINST & rInst, Atom nConstId );
+ bool IsSet( const RSCINST & rInst, Atom nConstId );
// Als Default setzen
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef,
Atom nConstId );
ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
@@ -56,41 +58,44 @@ public:
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
/******************* R s c C l i e n t ***********************************/
class RscClient : public RscTop
{
- RscFlag * pRefClass; //Klasse die als Server benutzt wird
- Atom nConstId; //Id des zu setzenden Wertes
+ RscFlag * pRefClass; //Klasse die als Server benutzt wird
+ Atom nConstId; //Id des zu setzenden Wertes
public:
RscClient( Atom nId, sal_uInt32 nTypId, RscFlag * pClass,
Atom nConstantId );
virtual RSCCLASS_TYPE GetClassType() const;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
- sal_uInt32 Size(){ return( pRefClass->Size() ); };
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool );
+ sal_uInt32 Size(){ return( pRefClass->Size() ); };
// Eine Zuweisung an eine Variable
- sal_Bool IsDefault( const RSCINST & rInst ){
+ bool IsDefault( const RSCINST & rInst ){
return( pRefClass->IsDefault( rInst, nConstId ) );
};
// Als Default setzen
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
- return pRefClass->IsValueDefault( rInst,
- pDef, nConstId );
- }
- ERRTYPE SetBool( const RSCINST & rInst, sal_Bool bValue ){
- if( bValue )
- return( pRefClass->SetConst( rInst, nConstId, bValue ) );
- else
- return( pRefClass->
- SetNotConst( rInst, nConstId ) );
- };
- ERRTYPE GetBool( const RSCINST & rInst, sal_Bool * pB ){
- *pB = pRefClass->IsSet( rInst, nConstId );
- return( ERR_OK );
- };
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef )
+ {
+ return pRefClass->IsValueDefault( rInst,
+ pDef, nConstId );
+ }
+ ERRTYPE SetBool( const RSCINST & rInst, bool bValue )
+ {
+ if( bValue )
+ return( pRefClass->SetConst( rInst, nConstId, bValue ) );
+ else
+ return( pRefClass->
+ SetNotConst( rInst, nConstId ) );
+ }
+ ERRTYPE GetBool( const RSCINST & rInst, bool * pB )
+ {
+ *pB = pRefClass->IsSet( rInst, nConstId );
+ return( ERR_OK );
+ }
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
};
diff --git a/rsc/inc/rsckey.hxx b/rsc/inc/rsckey.hxx
index d04c4047439f..7ec4141ec325 100644
--- a/rsc/inc/rsckey.hxx
+++ b/rsc/inc/rsckey.hxx
@@ -24,27 +24,29 @@ class RscTop;
#include <rscall.h>
-typedef struct {
- Atom nName;
- sal_uInt32 nTyp;
+typedef struct
+{
+ Atom nName;
+ sal_uInt32 nTyp;
long yylval;
} KEY_STRUCT;
-class RscNameTable {
- sal_Bool bSort; //soll bei jedem einfuegen sortiert werden?
- sal_uInt32 nEntries; //Anzahl der Eintr�ge
+class RscNameTable
+{
+ bool bSort; //soll bei jedem einfuegen sortiert werden?
+ sal_uInt32 nEntries; //Anzahl der Eintr�ge
KEY_STRUCT * pTable;
public:
RscNameTable();
~RscNameTable();
- void SetSort( sal_Bool bSorted = sal_True );
- Atom Put( Atom nName, sal_uInt32 nTyp, long nValue );
- Atom Put( const char * pName, sal_uInt32 nTyp, long nValue );
- Atom Put( const char * pName, sal_uInt32 nTyp );
- Atom Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass );
-
- // sal_True, wurde gefunden
- sal_Bool Get( Atom nName, KEY_STRUCT * pEle );
+ void SetSort( bool bSorted = true );
+ Atom Put( Atom nName, sal_uInt32 nTyp, long nValue );
+ Atom Put( const char * pName, sal_uInt32 nTyp, long nValue );
+ Atom Put( const char * pName, sal_uInt32 nTyp );
+ Atom Put( Atom nName, sal_uInt32 nTyp, RscTop * pClass );
+
+ // true, wurde gefunden
+ bool Get( Atom nName, KEY_STRUCT * pEle );
};
diff --git a/rsc/inc/rsclex.hxx b/rsc/inc/rsclex.hxx
index 2b6605f3604a..31069240468b 100644
--- a/rsc/inc/rsclex.hxx
+++ b/rsc/inc/rsclex.hxx
@@ -52,14 +52,16 @@ struct RSCHEADER {
};
/************** O b j e c t s t a c k ************************************/
-struct Node {
+struct Node
+{
Node* pPrev;
RSCINST aInst;
sal_uInt32 nTupelRec; // Rekursionstiefe fuer Tupel
- Node() { pPrev = NULL; nTupelRec = 0; };
+ Node() { pPrev = NULL; nTupelRec = 0; }
};
-class ObjectStack {
+class ObjectStack
+{
private :
Node* pRoot;
public :
@@ -67,7 +69,7 @@ class ObjectStack {
ObjectStack () { pRoot = NULL; }
const RSCINST & Top () { return pRoot->aInst; }
- sal_Bool IsEmpty() { return( pRoot == NULL ); }
+ bool IsEmpty() { return( pRoot == NULL ); }
void IncTupelRec() { pRoot->nTupelRec++; }
void DecTupelRec() { pRoot->nTupelRec--; }
sal_uInt32 TupelRecCount() const { return pRoot->nTupelRec; }
diff --git a/rsc/inc/rscmgr.hxx b/rsc/inc/rscmgr.hxx
index 838533bb6488..95301d28a7aa 100644
--- a/rsc/inc/rscmgr.hxx
+++ b/rsc/inc/rscmgr.hxx
@@ -26,11 +26,13 @@
#include <rscclass.hxx>
/******************* R s c M g r *****************************************/
-class RscMgr : public RscClass {
- struct RscMgrInst {
+class RscMgr : public RscClass
+{
+ struct RscMgrInst
+ {
RscId aRefId; // nRefId = Referenz Identifier
- sal_Bool bDflt; // Ist Default
- void Create(){ aRefId.Create(); bDflt = sal_True; }
+ bool bDflt; // Ist Default
+ void Create(){ aRefId.Create(); bDflt = true; }
void Destroy(){ aRefId.Destroy(); }
};
ERRTYPE IsToDeep( const RSCINST & rInst, sal_uInt32 nDeep = 0 );
@@ -38,24 +40,24 @@ public:
RscMgr( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
void SetToDefault( const RSCINST & rInst );
- sal_Bool IsDefault( const RSCINST & rInst );
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsDefault( const RSCINST & rInst );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
- RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool );
void Destroy( const RSCINST & rInst );
- sal_uInt32 Size();
+ sal_uInt32 Size();
void WriteSrcHeader( const RSCINST & aInst, FILE * fOutput,
- RscTypCont * pTC, sal_uInt32 nTab,
- const RscId & rId, const char * );
+ RscTypCont * pTC, sal_uInt32 nTab,
+ const RscId & rId, const char * );
void WriteSrc( const RSCINST & rInst, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, const RscId & rId,
- sal_uInt32, sal_Bool bExtra );
+ sal_uInt32, bool bExtra );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
- sal_Bool IsConsistent( const RSCINST & rInst );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
+ bool IsConsistent( const RSCINST & rInst );
ERRTYPE GetRef( const RSCINST & rInst, RscId * );
ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
};
diff --git a/rsc/inc/rscpar.hxx b/rsc/inc/rscpar.hxx
index 0833e224fb6f..98a3944ae360 100644
--- a/rsc/inc/rscpar.hxx
+++ b/rsc/inc/rscpar.hxx
@@ -30,44 +30,46 @@ class RscTypCont;
class RscFileInst
{
ERRTYPE aFirstError;// Erster Fehler
- sal_uInt32 nErrorLine; // Zeile des ersten Fehlers
- sal_uInt32 nErrorPos; // Position des ersten Fehlers
- sal_uInt32 nLineNo; // Zeile in der Eingabedatei
- sal_uLong lFileIndex; // Index auf Eingabedatei
- sal_uLong lSrcIndex; // Index auf Basisdatei
+ sal_uInt32 nErrorLine; // Zeile des ersten Fehlers
+ sal_uInt32 nErrorPos; // Position des ersten Fehlers
+ sal_uInt32 nLineNo; // Zeile in der Eingabedatei
+ sal_uLong lFileIndex; // Index auf Eingabedatei
+ sal_uLong lSrcIndex; // Index auf Basisdatei
FILE * fInputFile; // Eingabedatei
char * pInput; // Lesepuffer
- sal_uInt32 nInputBufLen; // Laenge des Lesepuffers
- sal_uInt32 nInputPos; // Position im Lesepuffer
- sal_uInt32 nInputEndPos;// Ende im Lesepuffer
+ sal_uInt32 nInputBufLen; // Laenge des Lesepuffers
+ sal_uInt32 nInputPos; // Position im Lesepuffer
+ sal_uInt32 nInputEndPos;// Ende im Lesepuffer
char * pLine; // Zeile
- sal_uInt32 nLineBufLen;//Lange des Zeilenpuffres
- sal_uInt32 nScanPos; // Position in der Zeile
+ sal_uInt32 nLineBufLen;//Lange des Zeilenpuffres
+ sal_uInt32 nScanPos; // Position in der Zeile
int cLastChar;
- sal_Bool bEof;
+ bool bEof;
public:
RscTypCont * pTypCont;
- void Init(); // ctor initialisieren
- RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
+ void Init(); // ctor initialisieren
+ RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
sal_uLong lFileIndex, FILE * fFile );
- ~RscFileInst();
- sal_Bool IsEof() const { return bEof; }
- void SetFileIndex( sal_uLong lFIndex ) { lFileIndex = lFIndex; }
+ ~RscFileInst();
+ bool IsEof() const { return bEof; }
+ void SetFileIndex( sal_uLong lFIndex ) { lFileIndex = lFIndex; }
sal_uLong GetFileIndex() { return( lFileIndex ); }
sal_uLong GetSrcIndex() { return( lSrcIndex ); }
- void SetLineNo( sal_uInt32 nLine ) { nLineNo = nLine; }
+ void SetLineNo( sal_uInt32 nLine ) { nLineNo = nLine; }
sal_uInt32 GetLineNo() { return( nLineNo ); }
sal_uInt32 GetScanPos() { return( nScanPos ); }
- char * GetLine() { return( pLine ); }
- int GetChar();
- int GetFastChar() { return pLine[ nScanPos ] ?
- pLine[ nScanPos++ ] : GetChar();
- }
- void GetNewLine();
- // Fehlerbehandlung
- void SetError( ERRTYPE aError );
- ERRTYPE GetError() { return aFirstError; }
+ char * GetLine() { return( pLine ); }
+ int GetChar();
+ int GetFastChar()
+ {
+ return pLine[ nScanPos ] ?
+ pLine[ nScanPos++ ] : GetChar();
+ }
+ void GetNewLine();
+ // Fehlerbehandlung
+ void SetError( ERRTYPE aError );
+ ERRTYPE GetError() { return aFirstError; }
sal_uInt32 GetErrorLine() { return nErrorLine; }
sal_uInt32 GetErrorPos() { return nErrorPos; }
};
diff --git a/rsc/inc/rscrange.hxx b/rsc/inc/rscrange.hxx
index e9adb1ce82a6..00dbf283a77d 100644
--- a/rsc/inc/rscrange.hxx
+++ b/rsc/inc/rscrange.hxx
@@ -27,38 +27,39 @@
class RscRange : public RscTop
{
protected:
- struct RscRangeInst {
+ struct RscRangeInst
+ {
sal_uInt16 nValue; // nValue = Ausgangswert - nMin
- sal_Bool bDflt; // Ist Default
+ bool bDflt; // Ist Default
};
- sal_Int32 nMin; // Minimum des Bereiches
- sal_Int32 nMax; // Maximum des Bereiches
- sal_uInt32 nSize;
+ sal_Int32 nMin; // Minimum des Bereiches
+ sal_Int32 nMax; // Maximum des Bereiches
+ sal_uInt32 nSize;
public:
RscRange( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool );
// Der zulaessige Bereich wird gesetzt
ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
// Gibt die Groesse der Klasse in Bytes
- sal_uInt32 Size(){ return nSize; }
+ sal_uInt32 Size(){ return nSize; }
// Eine Zuweisung an eine Variable
virtual void SetToDefault( const RSCINST & rInst )
- {
- ((RscRangeInst*)rInst.pData)->bDflt = sal_True;
- }
- sal_Bool IsDefault( const RSCINST & rInst)
- {
- return( ((RscRangeInst*)rInst.pData)->bDflt );
- };
+ {
+ ((RscRangeInst*)rInst.pData)->bDflt = true;
+ }
+ bool IsDefault( const RSCINST & rInst)
+ {
+ return( ((RscRangeInst*)rInst.pData)->bDflt );
+ };
// Als Default setzen
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
ERRTYPE SetNumber( const RSCINST &, sal_Int32 );
ERRTYPE GetNumber( const RSCINST &, sal_Int32 * );
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
class RscLongRange : public RscTop
@@ -67,7 +68,7 @@ protected:
struct RscLongRangeInst
{
sal_Int32 nValue; // nValue = Ausgangswert - nMin
- sal_Bool bDflt; // Ist Default
+ bool bDflt; // Ist Default
};
sal_Int32 nMin; // Minimum des Bereiches
sal_Int32 nMax; // Maximum des Bereiches
@@ -75,28 +76,28 @@ protected:
public:
RscLongRange( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool );
// Der zulaessige Bereich wird gesetzt
ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
// Gibt die Groesse der Klasse in Bytes
- sal_uInt32 Size(){ return nSize; }
+ sal_uInt32 Size(){ return nSize; }
// Eine Zuweisung an eine Variable
virtual void SetToDefault( const RSCINST & rInst )
- {
- ((RscLongRangeInst*)rInst.pData)->bDflt = sal_True;
- }
- sal_Bool IsDefault( const RSCINST & rInst)
- {
- return( ((RscLongRangeInst*)rInst.pData)->bDflt );
- };
+ {
+ ((RscLongRangeInst*)rInst.pData)->bDflt = true;
+ }
+ bool IsDefault( const RSCINST & rInst)
+ {
+ return( ((RscLongRangeInst*)rInst.pData)->bDflt );
+ };
// Als Default setzen
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
ERRTYPE SetNumber( const RSCINST &, sal_Int32 );
ERRTYPE GetNumber( const RSCINST &, sal_Int32 * );
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
@@ -119,26 +120,27 @@ public:
RscIdRange( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
// Der zulaessige Bereich wird gesetzt
- ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum ){
- nMin = nMinimum;
- nMax = nMaximum;
- return ERR_OK;
- }
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
+ ERRTYPE SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
+ {
+ nMin = nMinimum;
+ nMax = nMaximum;
+ return ERR_OK;
+ }
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool );
void Destroy( const RSCINST & rInst );
sal_uInt32 Size(){ return nSize; }
virtual void SetToDefault( const RSCINST & rInst )
- {
- ((RscId*)rInst.pData)->aExp.cUnused = sal_True;
- }
- sal_Bool IsDefault( const RSCINST & rInst)
- {
- //cUnused wird fuer Defaultkennung verwendet
- return ((RscId*)rInst.pData)->aExp.cUnused
- ? sal_True : sal_False;
- }
+ {
+ ((RscId*)rInst.pData)->aExp.cUnused = true;
+ }
+ bool IsDefault( const RSCINST & rInst)
+ {
+ //cUnused wird fuer Defaultkennung verwendet
+ return ((RscId*)rInst.pData)->aExp.cUnused
+ ? true : false;
+ }
// Als Default setzen
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
ERRTYPE SetNumber( const RSCINST &, sal_Int32 );
ERRTYPE GetNumber( const RSCINST &, sal_Int32 * );
ERRTYPE SetRef( const RSCINST &, const RscId & rRscId );
@@ -146,8 +148,8 @@ public:
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
- sal_Bool IsConsistent( const RSCINST & rInst );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
+ bool IsConsistent( const RSCINST & rInst );
};
class RscBool : public RscRange
@@ -156,30 +158,29 @@ public:
RscBool( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
// Der zulaessige Bereich wird gesetzt
- ERRTYPE SetRange( sal_Int32, sal_Int32 ){
- return( ERR_UNKNOWN_METHOD );
- };
- ERRTYPE SetBool( const RSCINST & rInst, sal_Bool b ){
- return( SetNumber( rInst, (sal_Int32)b ) );
- };
- ERRTYPE GetBool( const RSCINST & rInst, sal_Bool * pB){
- sal_Int32 l;
- GetNumber( rInst, &l );
- *pB = (0 != l);
- return( ERR_OK );
- };
+ ERRTYPE SetRange( sal_Int32, sal_Int32 ){ return ERR_UNKNOWN_METHOD; }
+ ERRTYPE SetBool( const RSCINST & rInst, bool b )
+ {
+ return SetNumber( rInst, (sal_Int32)b );
+ };
+ ERRTYPE GetBool( const RSCINST & rInst, bool * pB)
+ {
+ sal_Int32 l;
+ GetNumber( rInst, &l );
+ *pB = (0 != l);
+ return ERR_OK;
+ };
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
};
-class RscBreakRange : public RscRange {
- sal_Int32 nOutRange;
+class RscBreakRange : public RscRange
+{
+ sal_Int32 nOutRange;
public:
RscBreakRange( Atom nId, sal_uInt32 nTypId );
- void SetOutRange( sal_Int32 nNumber ){
- nOutRange = nNumber;
- }
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
+ void SetOutRange( sal_Int32 nNumber ) { nOutRange = nNumber; }
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool );
ERRTYPE SetNumber( const RSCINST &, sal_Int32 );
};
diff --git a/rsc/inc/rscstr.hxx b/rsc/inc/rscstr.hxx
index 87da46f7fae2..fffbe5c26783 100644
--- a/rsc/inc/rscstr.hxx
+++ b/rsc/inc/rscstr.hxx
@@ -27,9 +27,10 @@
class RscString : public RscTop
{
RscTop * pRefClass;
- struct RscStringInst {
+ struct RscStringInst
+ {
char * pStr; // Zeiger auf String
- sal_Bool bDflt; // Ist Default
+ bool bDflt; // Ist Default
RscId aRefId; // ReferenzName
};
sal_uInt32 nSize;
@@ -37,24 +38,21 @@ public:
RscString( Atom nId, sal_uInt32 nTypId );
virtual RSCCLASS_TYPE GetClassType() const;
- void SetRefClass( RscTop * pClass )
- {
- pRefClass = pClass;
- };
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
+ void SetRefClass( RscTop * pClass ) { pRefClass = pClass; }
+ RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool );
// Der zulaessige Bereich wird gesetzt
void Destroy( const RSCINST & rInst );
- sal_uInt32 Size(){ return nSize; }
+ sal_uInt32 Size(){ return nSize; }
void SetToDefault( const RSCINST & rInst )
- {
- ((RscStringInst*)rInst.pData)->bDflt = sal_True;
- }
- sal_Bool IsDefault( const RSCINST & rInst)
- {
- return( ((RscStringInst*)rInst.pData)->bDflt );
- };
+ {
+ ((RscStringInst*)rInst.pData)->bDflt = true;
+ }
+ bool IsDefault( const RSCINST & rInst)
+ {
+ return ((RscStringInst*)rInst.pData)->bDflt;
+ }
// Als Default setzen
- sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
ERRTYPE SetString( const RSCINST &, const char * pStr );
ERRTYPE GetString( const RSCINST &, char ** ppStr );
ERRTYPE GetRef( const RSCINST & rInst, RscId * );
@@ -62,7 +60,7 @@ public:
void WriteSrc( const RSCINST &, FILE * fOutput,
RscTypCont * pTC, sal_uInt32 nTab, const char * );
ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32, bool bExtra );
};
#endif // _RSCSTR_HXX
diff --git a/rsc/inc/rsctools.hxx b/rsc/inc/rsctools.hxx
index e26efcd60807..296ca4f09848 100644
--- a/rsc/inc/rsctools.hxx
+++ b/rsc/inc/rsctools.hxx
@@ -41,8 +41,8 @@ enum RSCBYTEORDER_TYPE { RSC_BIGENDIAN, RSC_LITTLEENDIAN, RSC_SYSTEMENDIAN };
(nSize + sizeof( void * ) -1) / sizeof( void * ) * sizeof( void * )
/******************* F u n c t i o n F o r w a r d s *******************/
OString GetTmpFileName();
-sal_Bool Append(const OString &rDestFile, const OString &rSourceFile);
-sal_Bool Append(FILE * fDest, OString &raSourceFile);
+bool Append(const OString &rDestFile, const OString &rSourceFile);
+bool Append(FILE * fDest, OString &raSourceFile);
OString OutputFile(const OString &rInput, const char * ext);
char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv,
sal_uInt32 nArgc );
@@ -85,8 +85,8 @@ public:
/****************** R s c W r i t e R c **********************************/
class RscWriteRc
{
- sal_uInt32 nLen;
- sal_Bool bSwap;
+ sal_uInt32 nLen;
+ bool bSwap;
RSCBYTEORDER_TYPE nByteOrder;
char * pMem;
char * GetPointer( sal_uInt32 nSize );
diff --git a/rsc/inc/rsctop.hxx b/rsc/inc/rsctop.hxx
index 34723c618f1e..0929db770d4c 100644
--- a/rsc/inc/rsctop.hxx
+++ b/rsc/inc/rsctop.hxx
@@ -45,9 +45,9 @@ protected:
RscTop * pSuperCl = NULL );
public:
- OString aCallPar1; // Klassenaufruf ohne Typen bis ResId
- OString aCallPar2; // Klassenaufruf ohne Typen ab ResId
- OString aCallParType; // Klassenaufruf mit Typen
+ OString aCallPar1; // Klassenaufruf ohne Typen bis ResId
+ OString aCallPar2; // Klassenaufruf ohne Typen ab ResId
+ OString aCallParType; // Klassenaufruf mit Typen
void SetSuperClass( RscTop * pClass )
{
@@ -59,8 +59,8 @@ public:
sal_uInt32 GetTypId() const
{ return nTypId; };
// Gibt die Oberklasse zurueck
- sal_Bool InHierarchy( RscTop * pClass );
- sal_Bool IsCodeWriteable() const
+ bool InHierarchy( RscTop * pClass );
+ bool IsCodeWriteable() const
{
return( 0 != aCallParType.getLength() );
}
@@ -79,7 +79,7 @@ public:
virtual Atom GetConstant( sal_uInt32 );
- virtual RscTop * GetTypeClass() const;
+ virtual RscTop* GetTypeClass() const;
// Gibt die Groesse der Klasse in Bytes
virtual sal_uInt32 Size();
@@ -103,7 +103,7 @@ public:
// pData, pClass im return koennen NULL sein
virtual RSCINST GetVariable( const RSCINST & rInst, Atom nVarName,
const RSCINST & rInitInst,
- sal_Bool nInitDflt = sal_False,
+ bool nInitDflt = false,
RscTop * pCreateClass = NULL );
virtual RSCINST GetCopyVar( const RSCINST & rInst, Atom nVarName );
@@ -153,7 +153,7 @@ public:
virtual ERRTYPE SetNumber( const RSCINST & rInst, sal_Int32 lValue );
// Eine Zuweisung an eine Variable
- virtual ERRTYPE SetBool( const RSCINST & rInst, sal_Bool bValue );
+ virtual ERRTYPE SetBool( const RSCINST & rInst, bool bValue );
// Eine Zuweisung an eine Variable
virtual ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId,
@@ -166,29 +166,29 @@ public:
virtual ERRTYPE GetNumber( const RSCINST & rInst, sal_Int32 * pN );
- virtual ERRTYPE GetBool( const RSCINST & rInst, sal_Bool * pB );
+ virtual ERRTYPE GetBool( const RSCINST & rInst, bool * pB );
virtual ERRTYPE GetConst( const RSCINST & rInst, Atom * pH );
virtual ERRTYPE GetString( const RSCINST & rInst, char ** ppStr );
virtual RSCINST Create( RSCINST * pInst,
- const RSCINST & rDefInst, sal_Bool bOwnClass = sal_False );
+ const RSCINST & rDefInst, bool bOwnClass = false );
// Instanz zerstoeren
virtual void Destroy( const RSCINST & rInst );
// prueft auf konsistenz
- virtual sal_Bool IsConsistent( const RSCINST & rInst );
+ virtual bool IsConsistent( const RSCINST & rInst );
// Alles auf Default setzen
virtual void SetToDefault( const RSCINST & rInst );
// Ist Eingabe = Default
- virtual sal_Bool IsDefault( const RSCINST & rInst );
+ virtual bool IsDefault( const RSCINST & rInst );
// Gleiche Werte auf Default setzen
- virtual sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
+ virtual bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
// Instanz auf Default setzen
virtual void SetDefault( const RSCINST & rInst, Atom nVarId );
@@ -210,9 +210,9 @@ public:
RscTypCont * pTC, sal_uInt32 nTab,const char * );
virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, const RscId & aId,
- sal_uInt32 nDeep, sal_Bool bExtra );
+ sal_uInt32 nDeep, bool bExtra );
virtual ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32 nDeep, sal_Bool bExtra );
+ RscTypCont * pTC, sal_uInt32 nDeep, bool bExtra );
};
#endif //_RSCTOP_HXX
diff --git a/rsc/inc/rsctree.hxx b/rsc/inc/rsctree.hxx
index ed3bb3ee2cb8..ee674d4b947b 100644
--- a/rsc/inc/rsctree.hxx
+++ b/rsc/inc/rsctree.hxx
@@ -60,8 +60,8 @@ public:
NameNode* Right() const{ return (NameNode *)pRight ; };
NameNode* Search( const NameNode * pName ) const;
// insert a new node in the b-tree
- sal_Bool Insert( NameNode * pTN, sal_uInt32 * nDepth );
- sal_Bool Insert( NameNode* pTN );
+ bool Insert( NameNode * pTN, sal_uInt32 * nDepth );
+ bool Insert( NameNode* pTN );
virtual COMPARE Compare( const NameNode * ) const;
virtual COMPARE Compare( const void * ) const;
NameNode* SearchParent( const NameNode * ) const;