sligh mis-merge, and favor bool over sal_Bool for internal stuff
This commit is contained in:
parent
e350588a2d
commit
824daba411
@ -110,8 +110,8 @@ public:
|
||||
|
||||
inline void Delete() { delete this; }
|
||||
inline StackVar GetType() const { return eType; }
|
||||
sal_Bool IsFunction() const; // pure functions, no operators
|
||||
sal_Bool IsMatrixFunction() const; // if a function _always_ returns a Matrix
|
||||
bool IsFunction() const; // pure functions, no operators
|
||||
bool IsMatrixFunction() const; // if a function _always_ returns a Matrix
|
||||
bool IsExternalRef() const;
|
||||
sal_uInt8 GetParamCount() const;
|
||||
inline void IncRef() const { nRefCnt++; }
|
||||
@ -155,9 +155,9 @@ public:
|
||||
|
||||
virtual FormulaToken* Clone() const { return new FormulaToken(*this); }
|
||||
|
||||
virtual sal_Bool Is3DRef() const; // reference with 3D flag set
|
||||
virtual sal_Bool TextEqual( const formula::FormulaToken& rToken ) const;
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool Is3DRef() const; // reference with 3D flag set
|
||||
virtual bool TextEqual( const formula::FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
|
||||
virtual bool isFunction() const
|
||||
{
|
||||
@ -217,7 +217,7 @@ public:
|
||||
virtual void SetByte( sal_uInt8 n );
|
||||
virtual bool HasForceArray() const;
|
||||
virtual void SetForceArray( bool b );
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
|
||||
DECL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaByteToken )
|
||||
};
|
||||
@ -238,7 +238,7 @@ public:
|
||||
|
||||
virtual FormulaToken* Clone() const { return new FormulaFAPToken(*this); }
|
||||
virtual FormulaToken* GetFAPOrigToken() const;
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
};
|
||||
|
||||
class FORMULA_DLLPUBLIC FormulaDoubleToken : public FormulaToken
|
||||
@ -254,7 +254,7 @@ public:
|
||||
virtual FormulaToken* Clone() const { return new FormulaDoubleToken(*this); }
|
||||
virtual double GetDouble() const;
|
||||
virtual double& GetDoubleAsReference();
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
|
||||
DECL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaDoubleToken )
|
||||
};
|
||||
@ -272,7 +272,7 @@ public:
|
||||
|
||||
virtual FormulaToken* Clone() const { return new FormulaStringToken(*this); }
|
||||
virtual const String& GetString() const;
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
|
||||
DECL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaStringToken )
|
||||
};
|
||||
@ -292,7 +292,7 @@ public:
|
||||
|
||||
virtual FormulaToken* Clone() const { return new FormulaStringOpToken(*this); }
|
||||
virtual const String& GetString() const;
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
};
|
||||
|
||||
class FORMULA_DLLPUBLIC FormulaIndexToken : public FormulaToken
|
||||
@ -308,7 +308,7 @@ public:
|
||||
virtual FormulaToken* Clone() const { return new FormulaIndexToken(*this); }
|
||||
virtual sal_uInt16 GetIndex() const;
|
||||
virtual void SetIndex( sal_uInt16 n );
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
};
|
||||
|
||||
|
||||
@ -332,7 +332,7 @@ public:
|
||||
virtual const String& GetExternal() const;
|
||||
virtual sal_uInt8 GetByte() const;
|
||||
virtual void SetByte( sal_uInt8 n );
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
};
|
||||
|
||||
|
||||
@ -347,7 +347,7 @@ public:
|
||||
virtual FormulaToken* Clone() const { return new FormulaMissingToken(*this); }
|
||||
virtual double GetDouble() const;
|
||||
virtual const String& GetString() const;
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
};
|
||||
|
||||
class FORMULA_DLLPUBLIC FormulaJumpToken : public FormulaToken
|
||||
@ -369,7 +369,7 @@ public:
|
||||
}
|
||||
virtual ~FormulaJumpToken();
|
||||
virtual short* GetJump() const;
|
||||
virtual sal_Bool operator==( const formula::FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const formula::FormulaToken& rToken ) const;
|
||||
virtual FormulaToken* Clone() const { return new FormulaJumpToken(*this); }
|
||||
};
|
||||
|
||||
@ -383,7 +383,7 @@ public:
|
||||
FormulaToken( r ) {}
|
||||
|
||||
virtual FormulaToken* Clone() const { return new FormulaUnknownToken(*this); }
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
};
|
||||
|
||||
|
||||
@ -399,7 +399,7 @@ public:
|
||||
virtual FormulaToken* Clone() const { return new FormulaErrorToken(*this); }
|
||||
virtual sal_uInt16 GetError() const;
|
||||
virtual void SetError( sal_uInt16 nErr );
|
||||
virtual sal_Bool operator==( const FormulaToken& rToken ) const;
|
||||
virtual bool operator==( const FormulaToken& rToken ) const;
|
||||
};
|
||||
|
||||
// =============================================================================
|
||||
|
@ -81,7 +81,7 @@ protected:
|
||||
sal_uInt16 nError; // Error code
|
||||
short nRefs; // Count of cell references
|
||||
ScRecalcMode nMode; // Flags to indicate when to recalc this code
|
||||
sal_Bool bHyperLink; // If HYPERLINK() occurs in the formula.
|
||||
bool bHyperLink; // If HYPERLINK() occurs in the formula.
|
||||
|
||||
protected:
|
||||
void Assign( const FormulaTokenArray& );
|
||||
@ -128,10 +128,10 @@ public:
|
||||
FormulaToken* PrevRPN();
|
||||
|
||||
bool HasExternalRef() const;
|
||||
sal_Bool HasOpCode( OpCode ) const;
|
||||
sal_Bool HasOpCodeRPN( OpCode ) const;
|
||||
bool HasOpCode( OpCode ) const;
|
||||
bool HasOpCodeRPN( OpCode ) const;
|
||||
/// Token of type svIndex or opcode ocColRowName
|
||||
sal_Bool HasNameOrColRowName() const;
|
||||
bool HasNameOrColRowName() const;
|
||||
|
||||
FormulaToken** GetArray() const { return pCode; }
|
||||
FormulaToken** GetCode() const { return pRPN; }
|
||||
@ -142,8 +142,8 @@ public:
|
||||
void SetCodeError( sal_uInt16 n ) { nError = n; }
|
||||
short GetRefs() const { return nRefs; }
|
||||
void IncrementRefs() { ++nRefs; }
|
||||
void SetHyperLink( sal_Bool bVal ) { bHyperLink = bVal; }
|
||||
sal_Bool IsHyperLink() const { return bHyperLink; }
|
||||
void SetHyperLink( bool bVal ) { bHyperLink = bVal; }
|
||||
bool IsHyperLink() const { return bHyperLink; }
|
||||
|
||||
inline ScRecalcMode GetRecalcMode() const { return nMode; }
|
||||
/** Bits aren't set directly but validated and
|
||||
@ -168,17 +168,17 @@ public:
|
||||
{ nMode |= RECALCMODE_ONREFMOVE; }
|
||||
inline void ClearRecalcModeOnRefMove()
|
||||
{ nMode &= ~RECALCMODE_ONREFMOVE; }
|
||||
inline sal_Bool IsRecalcModeNormal() const
|
||||
inline bool IsRecalcModeNormal() const
|
||||
{ return (nMode & RECALCMODE_NORMAL) != 0; }
|
||||
inline sal_Bool IsRecalcModeAlways() const
|
||||
inline bool IsRecalcModeAlways() const
|
||||
{ return (nMode & RECALCMODE_ALWAYS) != 0; }
|
||||
inline sal_Bool IsRecalcModeOnLoad() const
|
||||
inline bool IsRecalcModeOnLoad() const
|
||||
{ return (nMode & RECALCMODE_ONLOAD) != 0; }
|
||||
inline sal_Bool IsRecalcModeOnLoadOnce() const
|
||||
inline bool IsRecalcModeOnLoadOnce() const
|
||||
{ return (nMode & RECALCMODE_ONLOAD_ONCE) != 0; }
|
||||
inline sal_Bool IsRecalcModeForced() const
|
||||
inline bool IsRecalcModeForced() const
|
||||
{ return (nMode & RECALCMODE_FORCED) != 0; }
|
||||
inline sal_Bool IsRecalcModeOnRefMove() const
|
||||
inline bool IsRecalcModeOnRefMove() const
|
||||
{ return (nMode & RECALCMODE_ONREFMOVE) != 0; }
|
||||
|
||||
/** Get OpCode of the most outer function */
|
||||
@ -186,7 +186,7 @@ public:
|
||||
|
||||
/** Operators +,-,*,/,^,&,=,<>,<,>,<=,>=
|
||||
with DoubleRef in Formula? */
|
||||
sal_Bool HasMatrixDoubleRefOps();
|
||||
bool HasMatrixDoubleRefOps();
|
||||
|
||||
virtual FormulaToken* AddOpCode(OpCode e);
|
||||
|
||||
|
@ -810,8 +810,8 @@ void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r )
|
||||
delete mpHashMap;
|
||||
mpHashMap = new OpCodeHashMap(mnSymbols);
|
||||
|
||||
USHORT n = r.getSymbolCount();
|
||||
for (USHORT i = 0; i < n; ++i)
|
||||
sal_uInt16 n = r.getSymbolCount();
|
||||
for (sal_uInt16 i = 0; i < n; ++i)
|
||||
{
|
||||
OpCode eOp = OpCode(i);
|
||||
const String& rSymbol = r.getSymbol(eOp);
|
||||
|
@ -79,12 +79,12 @@ FormulaToken::~FormulaToken()
|
||||
{
|
||||
}
|
||||
|
||||
sal_Bool FormulaToken::Is3DRef() const
|
||||
bool FormulaToken::Is3DRef() const
|
||||
{
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
sal_Bool FormulaToken::IsFunction() const
|
||||
bool FormulaToken::IsFunction() const
|
||||
{
|
||||
// OpCode eOp = GetOpCode();
|
||||
return (eOp != ocPush && eOp != ocBad && eOp != ocColRowName &&
|
||||
@ -130,7 +130,7 @@ sal_uInt8 FormulaToken::GetParamCount() const
|
||||
}
|
||||
|
||||
|
||||
sal_Bool FormulaToken::IsMatrixFunction() const
|
||||
bool FormulaToken::IsMatrixFunction() const
|
||||
{
|
||||
return formula::FormulaCompiler::IsMatrixFunction(GetOpCode());
|
||||
}
|
||||
@ -239,7 +239,8 @@ void FormulaToken::SetError( sal_uInt16 )
|
||||
{
|
||||
DBG_ERRORFILE( "FormulaToken::SetError: virtual dummy called" );
|
||||
}
|
||||
sal_Bool FormulaToken::TextEqual( const FormulaToken& rToken ) const
|
||||
|
||||
bool FormulaToken::TextEqual( const FormulaToken& rToken ) const
|
||||
{
|
||||
return *this == rToken;
|
||||
}
|
||||
@ -252,7 +253,7 @@ sal_uInt8 FormulaByteToken::GetByte() const { return nByte
|
||||
void FormulaByteToken::SetByte( sal_uInt8 n ) { nByte = n; }
|
||||
bool FormulaByteToken::HasForceArray() const { return bHasForceArray; }
|
||||
void FormulaByteToken::SetForceArray( bool b ) { bHasForceArray = b; }
|
||||
sal_Bool FormulaByteToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaByteToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r ) && nByte == r.GetByte() &&
|
||||
bHasForceArray == r.HasForceArray();
|
||||
@ -260,12 +261,12 @@ sal_Bool FormulaByteToken::operator==( const FormulaToken& r ) const
|
||||
|
||||
|
||||
FormulaToken* FormulaFAPToken::GetFAPOrigToken() const { return pOrigToken.get(); }
|
||||
sal_Bool FormulaFAPToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaFAPToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaByteToken::operator==( r ) && pOrigToken == r.GetFAPOrigToken();
|
||||
}
|
||||
short* FormulaJumpToken::GetJump() const { return pJump; }
|
||||
sal_Bool FormulaJumpToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaJumpToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r ) && pJump[0] == r.GetJump()[0] &&
|
||||
memcmp( pJump+1, r.GetJump()+1, pJump[0] * sizeof(short) ) == 0;
|
||||
@ -554,7 +555,7 @@ FormulaToken* FormulaTokenArray::PeekPrevNoSpaces()
|
||||
|
||||
bool FormulaTokenArray::HasExternalRef() const
|
||||
{
|
||||
for ( USHORT j=0; j < nLen; j++ )
|
||||
for ( sal_uInt16 j=0; j < nLen; j++ )
|
||||
{
|
||||
if (pCode[j]->IsExternalRef())
|
||||
return true;
|
||||
@ -572,7 +573,7 @@ bool FormulaTokenArray::HasOpCode( OpCode eOp ) const
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
sal_Bool FormulaTokenArray::HasOpCodeRPN( OpCode eOp ) const
|
||||
bool FormulaTokenArray::HasOpCodeRPN( OpCode eOp ) const
|
||||
{
|
||||
for ( sal_uInt16 j=0; j < nRPN; j++ )
|
||||
{
|
||||
@ -582,7 +583,7 @@ sal_Bool FormulaTokenArray::HasOpCodeRPN( OpCode eOp ) const
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
sal_Bool FormulaTokenArray::HasNameOrColRowName() const
|
||||
bool FormulaTokenArray::HasNameOrColRowName() const
|
||||
{
|
||||
for ( sal_uInt16 j=0; j < nLen; j++ )
|
||||
{
|
||||
@ -814,7 +815,7 @@ void FormulaTokenArray::AddRecalcMode( ScRecalcMode nBits )
|
||||
}
|
||||
|
||||
|
||||
sal_Bool FormulaTokenArray::HasMatrixDoubleRefOps()
|
||||
bool FormulaTokenArray::HasMatrixDoubleRefOps()
|
||||
{
|
||||
if ( pRPN && nRPN )
|
||||
{
|
||||
@ -1312,35 +1313,35 @@ bool FormulaTokenIterator::IsEndOfPath() const
|
||||
|
||||
double FormulaDoubleToken::GetDouble() const { return fDouble; }
|
||||
double & FormulaDoubleToken::GetDoubleAsReference() { return fDouble; }
|
||||
sal_Bool FormulaDoubleToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaDoubleToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r ) && fDouble == r.GetDouble();
|
||||
}
|
||||
|
||||
|
||||
const String& FormulaStringToken::GetString() const { return aString; }
|
||||
sal_Bool FormulaStringToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaStringToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r ) && aString == r.GetString();
|
||||
}
|
||||
|
||||
|
||||
const String& FormulaStringOpToken::GetString() const { return aString; }
|
||||
sal_Bool FormulaStringOpToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaStringOpToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaByteToken::operator==( r ) && aString == r.GetString();
|
||||
}
|
||||
|
||||
sal_uInt16 FormulaIndexToken::GetIndex() const { return nIndex; }
|
||||
void FormulaIndexToken::SetIndex( sal_uInt16 n ) { nIndex = n; }
|
||||
sal_Bool FormulaIndexToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaIndexToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r ) && nIndex == r.GetIndex();
|
||||
}
|
||||
const String& FormulaExternalToken::GetExternal() const { return aExternal; }
|
||||
sal_uInt8 FormulaExternalToken::GetByte() const { return nByte; }
|
||||
void FormulaExternalToken::SetByte( sal_uInt8 n ) { nByte = n; }
|
||||
sal_Bool FormulaExternalToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaExternalToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r ) && nByte == r.GetByte() &&
|
||||
aExternal == r.GetExternal();
|
||||
@ -1349,7 +1350,7 @@ sal_Bool FormulaExternalToken::operator==( const FormulaToken& r ) const
|
||||
|
||||
sal_uInt16 FormulaErrorToken::GetError() const { return nError; }
|
||||
void FormulaErrorToken::SetError( sal_uInt16 nErr ) { nError = nErr; }
|
||||
sal_Bool FormulaErrorToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaErrorToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r ) &&
|
||||
nError == static_cast< const FormulaErrorToken & >(r).GetError();
|
||||
@ -1360,13 +1361,13 @@ const String& FormulaMissingToken::GetString() const
|
||||
static String aDummyString;
|
||||
return aDummyString;
|
||||
}
|
||||
sal_Bool FormulaMissingToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaMissingToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r );
|
||||
}
|
||||
|
||||
|
||||
sal_Bool FormulaUnknownToken::operator==( const FormulaToken& r ) const
|
||||
bool FormulaUnknownToken::operator==( const FormulaToken& r ) const
|
||||
{
|
||||
return FormulaToken::operator==( r );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user