diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-22 13:03:23 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-22 21:49:24 -0400 |
commit | 73f66a092c16cf96f87cae14442cef8d8fd3a0ae (patch) | |
tree | 3450fbec2195980e3c7ea1fe08f0b94d6f48a213 /sc/inc/dociter.hxx | |
parent | bffe8b807ec2ac9e4749360151682591895778fd (diff) |
Simplify ScCellIterator.
Change-Id: I33b10e68434fe0047f8e7c3959b87a51f3460d29
Diffstat (limited to 'sc/inc/dociter.hxx')
-rw-r--r-- | sc/inc/dociter.hxx | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx index 36831113e591..c104a33a8186 100644 --- a/sc/inc/dociter.hxx +++ b/sc/inc/dociter.hxx @@ -214,19 +214,14 @@ class ScCellIterator // walk through all cells in an area { // for SubTotal no hidden and no sub-total lines private: ScDocument* pDoc; - SCCOL nStartCol; - SCROW nStartRow; - SCTAB nStartTab; - SCCOL nEndCol; - SCROW nEndRow; - SCTAB nEndTab; - SCCOL nCol; - SCROW nRow; - SCTAB nTab; + ScAddress maStartPos; + ScAddress maEndPos; + ScAddress maCurPos; SCSIZE nColRow; bool bSubTotal; ScBaseCell* GetThis(); + void init(); public: ScCellIterator(ScDocument* pDocument, SCCOL nSCol, SCROW nSRow, SCTAB nSTab, @@ -236,10 +231,7 @@ public: const ScRange& rRange, bool bSTotal = false); ScBaseCell* GetFirst(); ScBaseCell* GetNext(); - SCCOL GetCol() const { return nCol; } - SCROW GetRow() const { return nRow; } - SCTAB GetTab() const { return nTab; } - ScAddress GetPos() const { return ScAddress( nCol, nRow, nTab ); } + const ScAddress& GetPos() const { return maCurPos; } }; class ScQueryCellIterator // walk through all non-empty cells in an area |