summaryrefslogtreecommitdiff
path: root/rsc/inc/rscflag.hxx
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/rscflag.hxx
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/rscflag.hxx')
-rw-r--r--rsc/inc/rscflag.hxx67
1 files changed, 36 insertions, 31 deletions
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 * );
};