diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-03 02:35:31 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-03 20:53:12 +0000 |
commit | bb45bdf359c65c174fd557d615f77ceb46fa685c (patch) | |
tree | 1f87575ee1d0471b14f5078a99d3a589d955d56d /rsc/inc/rscconst.hxx | |
parent | 27a4d5597c0757611d0e2e682d0c05441859cc4e (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/rscconst.hxx')
-rw-r--r-- | rsc/inc/rscconst.hxx | 33 |
1 files changed, 18 insertions, 15 deletions
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; |