diff options
Diffstat (limited to 'formula/source/core/api/token.cxx')
-rw-r--r-- | formula/source/core/api/token.cxx | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 8703fd8ba5fc..745d628be216 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -212,6 +212,17 @@ void FormulaToken::SetIndex( sal_uInt16 ) DBG_ERRORFILE( "FormulaToken::SetIndex: virtual dummy called" ); } +bool FormulaToken::IsGlobal() const +{ + DBG_ERRORFILE( "FormulaToken::IsGlobal: virtual dummy called" ); + return true; +} + +void FormulaToken::SetGlobal( bool ) +{ + DBG_ERRORFILE( "FormulaToken::SetGlobal: virtual dummy called" ); +} + short* FormulaToken::GetJump() const { DBG_ERRORFILE( "FormulaToken::GetJump: virtual dummy called" ); @@ -318,6 +329,8 @@ bool FormulaTokenArray::AddFormulaToken(const sheet::FormulaToken& _aToken,Exter AddString( aStrVal ); else if ( eOpCode == ocBad ) AddBad( aStrVal ); + else if ( eOpCode == ocStringXML ) + AddStringXML( aStrVal ); else if ( eOpCode == ocExternal || eOpCode == ocMacro ) AddToken( formula::FormulaExternalToken( eOpCode, aStrVal ) ); else @@ -797,6 +810,11 @@ FormulaToken* FormulaTokenArray::AddBad( const String& rStr ) return Add( new FormulaStringOpToken( ocBad, rStr ) ); } +FormulaToken* FormulaTokenArray::AddStringXML( const String& rStr ) +{ + return Add( new FormulaStringOpToken( ocStringXML, rStr ) ); +} + void FormulaTokenArray::AddRecalcMode( ScRecalcMode nBits ) @@ -1317,7 +1335,7 @@ const FormulaToken* FormulaTokenIterator::GetNonEndOfPathToken( short nIdx ) con bool FormulaTokenIterator::IsEndOfPath() const { - return GetNonEndOfPathToken( pCur->nPC + 1) != NULL; + return GetNonEndOfPathToken( pCur->nPC + 1) == NULL; } // ----------------------------------------------------------------------------- @@ -1346,12 +1364,14 @@ bool FormulaStringOpToken::operator==( const FormulaToken& r ) const return FormulaByteToken::operator==( r ) && aString == r.GetString(); } -sal_uInt16 FormulaIndexToken::GetIndex() const { return nIndex; } -sal_uInt8 FormulaIndexToken::GetByte() const {return static_cast<sal_uInt8>(mbGlobal); } -void FormulaIndexToken::SetIndex( sal_uInt16 n ) { nIndex = n; } +sal_uInt16 FormulaIndexToken::GetIndex() const { return nIndex; } +void FormulaIndexToken::SetIndex( sal_uInt16 n ) { nIndex = n; } +bool FormulaIndexToken::IsGlobal() const { return mbGlobal; } +void FormulaIndexToken::SetGlobal( bool b ) { mbGlobal = b; } bool FormulaIndexToken::operator==( const FormulaToken& r ) const { - return FormulaToken::operator==( r ) && nIndex == r.GetIndex(); + return FormulaToken::operator==( r ) && nIndex == r.GetIndex() && + mbGlobal == r.IsGlobal(); } const String& FormulaExternalToken::GetExternal() const { return aExternal; } sal_uInt8 FormulaExternalToken::GetByte() const { return nByte; } |