diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-24 00:32:41 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-24 00:48:02 +0100 |
commit | ae516fabd96a948b62c4d3a522555fc955750c3e (patch) | |
tree | 940342f47524f646f0ed7a3f2bc3efab487e2707 /sc/inc/token.hxx | |
parent | c3ea61ab29648bf93b3b4f809c7e98c40c1113f8 (diff) |
import inherited number formats with cached values, fdo#59724
Change-Id: I698f60daf4e591b57d8d99c130d2e524dc10c306
Diffstat (limited to 'sc/inc/token.hxx')
-rw-r--r-- | sc/inc/token.hxx | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index e08db6cb440c..a54055561bae 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -414,26 +414,37 @@ public: class SC_DLLPUBLIC ScHybridCellToken : public ScToken { private: - double fDouble; - String aString; - String aFormula; + double mfDouble; + String maString; + OUString maFormula; public: - ScHybridCellToken( double f, - const String & rStr, - const String & rFormula ) : - ScToken( formula::svHybridCell ), - fDouble( f ), aString( rStr ), - aFormula( rFormula ) {} - ScHybridCellToken( const ScHybridCellToken& r ) : - ScToken( r ), fDouble( r.fDouble), - aString( r.aString), aFormula( r.aFormula) {} - const String & GetFormula() const { return aFormula; } - virtual double GetDouble() const; - virtual const String & GetString() const; - virtual bool operator==( const formula::FormulaToken& rToken ) const; - virtual FormulaToken* Clone() const { return new ScHybridCellToken(*this); } + ScHybridCellToken( double f, + const OUString & rStr, + const OUString & rFormula ) : + ScToken( formula::svHybridCell ), + mfDouble( f ), maString( rStr ), + maFormula( rFormula ) {} + + const OUString& GetFormula() const { return maFormula; } + virtual double GetDouble() const; + virtual const String& GetString() const; + virtual bool operator==( const formula::FormulaToken& rToken ) const; + virtual FormulaToken* Clone() const { return new ScHybridCellToken(*this); } }; +class SC_DLLPUBLIC ScHybridValueCellToken : public ScToken +{ +private: + double mfValue; + String maString; +public: + ScHybridValueCellToken (double f, const OUString& rStr ): + ScToken( formula::svHybridValueCell ), + mfValue( f ), maString( rStr ) {} + + virtual double GetDouble() const { return mfValue; } + virtual const String & GetString() const { return maString; } +}; // Simplify argument passing to RefUpdate methods with ScSingleRefToken or // ScDoubleRefToken |