From 20d4db0fe3444e76b23ecdb058554c95eb311548 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 29 Apr 2013 14:14:43 -0400 Subject: Add method to allow fetching of double array, and store it in token. Change-Id: If094dbf139e18ad23c73d6cf5a78ac4844132b14 --- sc/inc/column.hxx | 9 +++++++++ sc/inc/document.hxx | 2 ++ sc/inc/table.hxx | 1 + 3 files changed, 12 insertions(+) (limited to 'sc/inc') diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 157bc173e98f..6b3202ae6f1c 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -106,6 +106,11 @@ struct ColDoubleEntry { SCROW mnStart; std::vector maData; + + struct LessByPtr : std::binary_function + { + bool operator() (const ColDoubleEntry* p1, const ColDoubleEntry* p2) const; + }; }; class ScColumn @@ -155,6 +160,9 @@ friend class ScDocumentImport; static void SwapScriptTypes( ScriptType& rSrc, SCROW nSrcRow, ScriptType& rDest, SCROW nDestRow ); + std::vector::iterator Search( SCROW nRow ); + std::vector::const_iterator Search( SCROW nRow ) const; + public: ScColumn(); ~ScColumn(); @@ -452,6 +460,7 @@ public: ScFormulaVectorState GetFormulaVectorState( SCROW nRow ) const; formula::FormulaTokenRef ResolveStaticReference( SCROW nRow ); bool ResolveStaticReference( ScMatrix& rMat, SCCOL nMatCol, SCROW nRow1, SCROW nRow2 ); + const double* FetchDoubleArray( SCROW nRow1, SCROW nRow2 ) const; ScRefCellValue GetRefCellValue( SCROW ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index cdb80e041e95..876c9d764eb0 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1944,6 +1944,8 @@ public: formula::FormulaTokenRef ResolveStaticReference( const ScAddress& rPos ); formula::FormulaTokenRef ResolveStaticReference( const ScRange& rRange ); + const double* FetchDoubleArray( const ScAddress& rPos, SCROW nLength ) const; + private: // CLOOK-Impl-methods /** diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index c04b902135d1..7c45a578274c 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -822,6 +822,7 @@ public: ScFormulaVectorState GetFormulaVectorState( SCCOL nCol, SCROW nRow ) const; formula::FormulaTokenRef ResolveStaticReference( SCCOL nCol, SCROW nRow ); formula::FormulaTokenRef ResolveStaticReference( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); + const double* FetchDoubleArray( SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const; ScRefCellValue GetRefCellValue( SCCOL nCol, SCROW nRow ); -- cgit