diff options
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/column.hxx | 2 | ||||
-rw-r--r-- | sc/inc/formulacell.hxx | 4 | ||||
-rw-r--r-- | sc/inc/formulagroup.hxx | 22 | ||||
-rw-r--r-- | sc/inc/types.hxx | 3 |
4 files changed, 27 insertions, 4 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index e70f108e70f2..e0773aab3e1b 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -82,8 +82,6 @@ struct ScFormulaCellGroup; struct ScRefCellValue; class ScDocumentImport; -typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef; - struct ScNeededSizeOptions { const ScPatternAttr* pPattern; diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index e4f1cfa5fd0e..2a8546f28a2f 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -51,8 +51,6 @@ inline void intrusive_ptr_release(ScFormulaCellGroup *p) delete p; } -typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef; - enum ScMatrixMode { MM_NONE = 0, // No matrix formula MM_FORMULA = 1, // Upper left matrix formula cell @@ -282,6 +280,8 @@ public: */ void SetResultDouble( double n ) { aResult.SetDouble( n); } + void SetResultToken( const formula::FormulaToken* pToken ); + double GetResultDouble() const { return aResult.GetDouble(); } void SetErrCode( sal_uInt16 n ); diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx index 0a8e3f7aa7c1..55f6e0997ff8 100644 --- a/sc/inc/formulagroup.hxx +++ b/sc/inc/formulagroup.hxx @@ -10,9 +10,15 @@ #ifndef SC_FORMULAGROUP_HXX #define SC_FORMULAGROUP_HXX +#include "address.hxx" +#include "types.hxx" + #include <boost/noncopyable.hpp> #include <boost/ptr_container/ptr_vector.hpp> +class ScDocument; +class ScTokenArray; + namespace sc { struct FormulaGroupContext : boost::noncopyable @@ -23,6 +29,22 @@ struct FormulaGroupContext : boost::noncopyable ArrayStoreType maArrays; }; +/** + * All the vectorized formula calculation code should be collectd here. + */ +class FormulaGroupInterpreter +{ + ScDocument& mrDoc; + ScAddress maTopPos; + ScFormulaCellGroupRef mxGroup; + ScTokenArray& mrCode; +public: + FormulaGroupInterpreter( + ScDocument& rDoc, const ScAddress& rTopPos, const ScFormulaCellGroupRef& xGroup, ScTokenArray& rCode); + + bool interpret(); +}; + } #endif diff --git a/sc/inc/types.hxx b/sc/inc/types.hxx index 1af6e2d73b62..9654271c4887 100644 --- a/sc/inc/types.hxx +++ b/sc/inc/types.hxx @@ -20,6 +20,9 @@ typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef; class ScToken; typedef ::boost::intrusive_ptr<ScToken> ScTokenRef; +struct ScFormulaCellGroup; +typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef; + /** * When vectorization is enabled, we could potentially mass-calculate a * series of formula token arrays in adjacent formula cells in one step, |