[Libreoffice-commits] .: Branch 'libreoffice-3-4' - formula/inc formula/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu Jul 7 22:18:39 PDT 2011
formula/inc/formula/token.hxx | 10 ++++++----
formula/source/core/api/token.cxx | 3 ++-
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 58cf0f84601756399c6f8ba4ca976d402aeb99e4
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Jun 22 15:51:02 2011 +0200
fix for fdo#37880
we need to save the information if we have a global range name or a
local range name in the uno api too
Signed-off-by: Kohei Yoshida <kyoshida at novell.com>
diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx
index f82dc2c..24b56ac 100644
--- a/formula/inc/formula/token.hxx
+++ b/formula/inc/formula/token.hxx
@@ -299,14 +299,16 @@ class FORMULA_DLLPUBLIC FormulaIndexToken : public FormulaToken
{
private:
sal_uInt16 nIndex;
+ bool mbGlobal;
public:
- FormulaIndexToken( OpCode e, sal_uInt16 n ) :
- FormulaToken( svIndex, e ), nIndex( n ) {}
+ FormulaIndexToken( OpCode e, sal_uInt16 n, bool bGlobal = true ) :
+ FormulaToken( svIndex, e ), nIndex( n ), mbGlobal( bGlobal ) {}
FormulaIndexToken( const FormulaIndexToken& r ) :
- FormulaToken( r ), nIndex( r.nIndex ) {}
+ FormulaToken( r ), nIndex( r.nIndex ), mbGlobal( r.mbGlobal ) {}
virtual FormulaToken* Clone() const { return new FormulaIndexToken(*this); }
- virtual sal_uInt16 GetIndex() const;
+ virtual sal_uInt16 GetIndex() const;
+ virtual sal_uInt8 GetByte() const;
virtual void SetIndex( sal_uInt16 n );
virtual bool operator==( const FormulaToken& rToken ) const;
};
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 182459d..0034466 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -298,7 +298,7 @@ bool FormulaTokenArray::AddFormulaToken(const sheet::FormulaToken& _aToken,Exter
{
// long is svIndex, used for name / database area, or "byte" for spaces
sal_Int32 nValue = _aToken.Data.get<sal_Int32>();
- if ( eOpCode == ocName || eOpCode == ocDBArea )
+ if ( eOpCode == ocDBArea )
AddToken( formula::FormulaIndexToken( eOpCode, static_cast<sal_uInt16>(nValue) ) );
else if ( eOpCode == ocSpaces )
AddToken( formula::FormulaByteToken( ocSpaces, static_cast<sal_uInt8>(nValue) ) );
@@ -1326,6 +1326,7 @@ bool FormulaStringOpToken::operator==( const FormulaToken& r ) const
}
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; }
bool FormulaIndexToken::operator==( const FormulaToken& r ) const
{
More information about the Libreoffice-commits
mailing list