summaryrefslogtreecommitdiffstats
path: root/include/basic/sbxvar.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-26 11:18:51 +0200
committerNoel Grandin <noel@peralex.com>2014-03-27 13:45:08 +0200
commitf288d7dcbd65e86e2c4f6519fac91eece8f01034 (patch)
treece706f8d0aca0501f7ca5976b4c3ff33486ece42 /include/basic/sbxvar.hxx
parentbasic: sal_Bool->bool (diff)
downloadcore-f288d7dcbd65e86e2c4f6519fac91eece8f01034.tar.gz
core-f288d7dcbd65e86e2c4f6519fac91eece8f01034.zip
basic: sal_Bool->bool
Change-Id: Id4952b6f97f9e8f917fea5651dee91499d109e48
Diffstat (limited to 'include/basic/sbxvar.hxx')
-rw-r--r--include/basic/sbxvar.hxx150
1 files changed, 75 insertions, 75 deletions
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index 686577ac0a74..789cec6cd55d 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -90,7 +90,7 @@ struct SbxValues
class BASIC_DLLPUBLIC SbxValue : public SbxBase
{
// #55226 Transport additional infos
- BASIC_DLLPRIVATE SbxValue* TheRealValue( sal_Bool bObjInObjError ) const;
+ BASIC_DLLPRIVATE SbxValue* TheRealValue( bool bObjInObjError ) const;
BASIC_DLLPRIVATE SbxValue* TheRealValue() const;
protected:
SbxValues aData; // Data
@@ -99,8 +99,8 @@ protected:
virtual void Broadcast( sal_uIntPtr ); // Broadcast-Call
virtual ~SbxValue();
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VALUE,1);
TYPEINFO_OVERRIDE();
@@ -109,40 +109,40 @@ public:
SbxValue( const SbxValue& );
SbxValue& operator=( const SbxValue& );
virtual void Clear() SAL_OVERRIDE;
- virtual sal_Bool IsFixed() const SAL_OVERRIDE;
-
- sal_Bool IsInteger() const { return sal_Bool( GetType() == SbxINTEGER ); }
- sal_Bool IsLong() const { return sal_Bool( GetType() == SbxLONG ); }
- sal_Bool IsSingle() const { return sal_Bool( GetType() == SbxSINGLE ); }
- sal_Bool IsDouble() const { return sal_Bool( GetType() == SbxDOUBLE ); }
- sal_Bool IsString() const { return sal_Bool( GetType() == SbxSTRING ); }
- sal_Bool IsDate() const { return sal_Bool( GetType() == SbxDATE ); }
- sal_Bool IsCurrency()const { return sal_Bool( GetType() == SbxCURRENCY ); }
- sal_Bool IsObject() const { return sal_Bool( GetType() == SbxOBJECT ); }
- sal_Bool IsDataObject()const{return sal_Bool( GetType() == SbxDATAOBJECT);}
- sal_Bool IsBool() const { return sal_Bool( GetType() == SbxBOOL ); }
- sal_Bool IsErr() const { return sal_Bool( GetType() == SbxERROR ); }
- sal_Bool IsEmpty() const { return sal_Bool( GetType() == SbxEMPTY ); }
- sal_Bool IsNull() const { return sal_Bool( GetType() == SbxNULL ); }
- sal_Bool IsChar() const { return sal_Bool( GetType() == SbxCHAR ); }
- sal_Bool IsByte() const { return sal_Bool( GetType() == SbxBYTE ); }
- sal_Bool IsUShort() const { return sal_Bool( GetType() == SbxUSHORT ); }
- sal_Bool IsULong() const { return sal_Bool( GetType() == SbxULONG ); }
- sal_Bool IsInt() const { return sal_Bool( GetType() == SbxINT ); }
- sal_Bool IsUInt() const { return sal_Bool( GetType() == SbxUINT ); }
- sal_Bool IspChar() const { return sal_Bool( GetType() == SbxLPSTR ); }
- sal_Bool IsNumeric() const;
- sal_Bool IsNumericRTL() const; // #41692 Interface for Basic
- sal_Bool ImpIsNumeric( bool bOnlyIntntl ) const; // Implementation
+ virtual bool IsFixed() const SAL_OVERRIDE;
+
+ bool IsInteger() const { return GetType() == SbxINTEGER ; }
+ bool IsLong() const { return GetType() == SbxLONG ; }
+ bool IsSingle() const { return GetType() == SbxSINGLE ; }
+ bool IsDouble() const { return GetType() == SbxDOUBLE ; }
+ bool IsString() const { return GetType() == SbxSTRING ; }
+ bool IsDate() const { return GetType() == SbxDATE ; }
+ bool IsCurrency() const { return GetType() == SbxCURRENCY ; }
+ bool IsObject() const { return GetType() == SbxOBJECT ; }
+ bool IsDataObject() const { return GetType() == SbxDATAOBJECT; }
+ bool IsBool() const { return GetType() == SbxBOOL ; }
+ bool IsErr() const { return GetType() == SbxERROR ; }
+ bool IsEmpty() const { return GetType() == SbxEMPTY ; }
+ bool IsNull() const { return GetType() == SbxNULL ; }
+ bool IsChar() const { return GetType() == SbxCHAR ; }
+ bool IsByte() const { return GetType() == SbxBYTE ; }
+ bool IsUShort() const { return GetType() == SbxUSHORT ; }
+ bool IsULong() const { return GetType() == SbxULONG ; }
+ bool IsInt() const { return GetType() == SbxINT ; }
+ bool IsUInt() const { return GetType() == SbxUINT ; }
+ bool IspChar() const { return GetType() == SbxLPSTR ; }
+ bool IsNumeric() const;
+ bool IsNumericRTL() const; // #41692 Interface for Basic
+ bool ImpIsNumeric( bool bOnlyIntntl ) const; // Implementation
virtual SbxClassType GetClass() const SAL_OVERRIDE;
virtual SbxDataType GetType() const SAL_OVERRIDE;
SbxDataType GetFullType() const;
- sal_Bool SetType( SbxDataType );
+ bool SetType( SbxDataType );
- virtual sal_Bool Get( SbxValues& ) const;
+ virtual bool Get( SbxValues& ) const;
const SbxValues& GetValues_Impl() const { return aData; }
- virtual sal_Bool Put( const SbxValues& );
+ virtual bool Put( const SbxValues& );
inline SbxValues * data() { return &aData; }
@@ -159,7 +159,7 @@ public:
double GetDouble() const;
double GetDate() const;
- sal_Bool GetBool() const;
+ bool GetBool() const;
const OUString& GetCoreString() const;
OUString GetOUString() const;
@@ -168,50 +168,50 @@ public:
sal_uInt16 GetUShort() const;
sal_uInt32 GetULong() const;
- sal_Bool PutInteger( sal_Int16 );
- sal_Bool PutLong( sal_Int32 );
- sal_Bool PutSingle( float );
- sal_Bool PutDouble( double );
- sal_Bool PutDate( double );
- sal_Bool PutBool( sal_Bool );
- sal_Bool PutErr( sal_uInt16 );
- sal_Bool PutStringExt( const OUString& ); // with extended analysis (International, "sal_True"/"sal_False")
- sal_Bool PutInt64( sal_Int64 );
- sal_Bool PutUInt64( sal_uInt64 );
- sal_Bool PutString( const OUString& );
- sal_Bool PutChar( sal_Unicode );
- sal_Bool PutByte( sal_uInt8 );
- sal_Bool PutUShort( sal_uInt16 );
- sal_Bool PutULong( sal_uInt32 );
- sal_Bool PutEmpty();
- sal_Bool PutNull();
+ bool PutInteger( sal_Int16 );
+ bool PutLong( sal_Int32 );
+ bool PutSingle( float );
+ bool PutDouble( double );
+ bool PutDate( double );
+ bool PutBool( bool );
+ bool PutErr( sal_uInt16 );
+ bool PutStringExt( const OUString& ); // with extended analysis (International, "sal_True"/"sal_False")
+ bool PutInt64( sal_Int64 );
+ bool PutUInt64( sal_uInt64 );
+ bool PutString( const OUString& );
+ bool PutChar( sal_Unicode );
+ bool PutByte( sal_uInt8 );
+ bool PutUShort( sal_uInt16 );
+ bool PutULong( sal_uInt32 );
+ bool PutEmpty();
+ bool PutNull();
// Special methods
- sal_Bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
- sal_Bool PutDecimal( SbxDecimal* pDecimal ); // This function is needed for Windows build, don't remove
- sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) const;
- sal_Bool PutCurrency( const sal_Int64& );
+ bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
+ bool PutDecimal( SbxDecimal* pDecimal ); // This function is needed for Windows build, don't remove
+ bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec ) const;
+ bool PutCurrency( const sal_Int64& );
// Interface for CDbl in Basic
static SbxError ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle = false );
- sal_Bool PutObject( SbxBase* );
+ bool PutObject( SbxBase* );
- virtual sal_Bool Convert( SbxDataType );
- virtual sal_Bool Compute( SbxOperator, const SbxValue& );
- virtual sal_Bool Compare( SbxOperator, const SbxValue& ) const;
- sal_Bool Scan( const OUString&, sal_uInt16* = NULL );
+ virtual bool Convert( SbxDataType );
+ virtual bool Compute( SbxOperator, const SbxValue& );
+ virtual bool Compare( SbxOperator, const SbxValue& ) const;
+ bool Scan( const OUString&, sal_uInt16* = NULL );
void Format( OUString&, const OUString* = NULL ) const;
// The following operators are definied for easier handling.
// TODO: Ensure error conditions (overflow, conversions)
// are taken into consideration in Compute and Compare
- inline int operator ==( const SbxValue& ) const;
- inline int operator !=( const SbxValue& ) const;
- inline int operator <( const SbxValue& ) const;
- inline int operator >( const SbxValue& ) const;
- inline int operator <=( const SbxValue& ) const;
- inline int operator >=( const SbxValue& ) const;
+ inline bool operator ==( const SbxValue& ) const;
+ inline bool operator !=( const SbxValue& ) const;
+ inline bool operator <( const SbxValue& ) const;
+ inline bool operator >( const SbxValue& ) const;
+ inline bool operator <=( const SbxValue& ) const;
+ inline bool operator >=( const SbxValue& ) const;
inline SbxValue& operator *=( const SbxValue& );
inline SbxValue& operator /=( const SbxValue& );
@@ -223,22 +223,22 @@ public:
inline SbxValue& operator ^=( const SbxValue& );
};
-inline int SbxValue::operator==( const SbxValue& r ) const
+inline bool SbxValue::operator==( const SbxValue& r ) const
{ return Compare( SbxEQ, r ); }
-inline int SbxValue::operator!=( const SbxValue& r ) const
+inline bool SbxValue::operator!=( const SbxValue& r ) const
{ return Compare( SbxNE, r ); }
-inline int SbxValue::operator<( const SbxValue& r ) const
+inline bool SbxValue::operator<( const SbxValue& r ) const
{ return Compare( SbxLT, r ); }
-inline int SbxValue::operator>( const SbxValue& r ) const
+inline bool SbxValue::operator>( const SbxValue& r ) const
{ return Compare( SbxGT, r ); }
-inline int SbxValue::operator<=( const SbxValue& r ) const
+inline bool SbxValue::operator<=( const SbxValue& r ) const
{ return Compare( SbxLE, r ); }
-inline int SbxValue::operator>=( const SbxValue& r ) const
+inline bool SbxValue::operator>=( const SbxValue& r ) const
{ return Compare( SbxGE, r ); }
inline SbxValue& SbxValue::operator*=( const SbxValue& r )
@@ -300,8 +300,8 @@ protected:
sal_uIntPtr nUserData; // User data for Call()
SbxObject* pParent; // Currently attached object
virtual ~SbxVariable();
- virtual sal_Bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
- virtual sal_Bool StoreData( SvStream& ) const SAL_OVERRIDE;
+ virtual bool LoadData( SvStream&, sal_uInt16 ) SAL_OVERRIDE;
+ virtual bool StoreData( SvStream& ) const SAL_OVERRIDE;
public:
SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_VARIABLE,2);
TYPEINFO_OVERRIDE();
@@ -310,13 +310,13 @@ public:
SbxVariable( const SbxVariable& );
SbxVariable& operator=( const SbxVariable& );
- void Dump( SvStream&, sal_Bool bDumpAll=sal_False );
+ void Dump( SvStream&, bool bDumpAll=false );
virtual void SetName( const OUString& );
virtual const OUString& GetName( SbxNameType = SbxNAME_NONE ) const;
sal_uInt16 GetHashCode() const { return nHash; }
- virtual void SetModified( sal_Bool ) SAL_OVERRIDE;
+ virtual void SetModified( bool ) SAL_OVERRIDE;
sal_uIntPtr GetUserData() const { return nUserData; }
void SetUserData( sal_uIntPtr n ) { nUserData = n; }
@@ -333,7 +333,7 @@ public:
// Sfx-Broadcasting-Support:
// Due to data reduction and better DLL-hierarchie currently via casting
SfxBroadcaster& GetBroadcaster();
- sal_Bool IsBroadcaster() const { return sal_Bool( pCst != NULL ); }
+ bool IsBroadcaster() const { return pCst != NULL; }
virtual void Broadcast( sal_uIntPtr nHintId ) SAL_OVERRIDE;
inline const SbxObject* GetParent() const { return pParent; }