diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-21 19:43:59 -0500 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2017-12-24 17:09:30 +0100 |
commit | de7392c4967f76d958dd7f2be8ef9e5af90624e2 (patch) | |
tree | 1a1bbabc0c23711b16ec7d66931b50fd41514881 /sc/inc/column.hxx | |
parent | 653736fb23346e07e8c0e6e0125689ae1f49f0f7 (diff) |
sc: compact ScColumn
Remove ScDocument* member from ScColumn
and re-use the one in ScAttrArray.
This saves 8 bytes and makes the code more
homogenious by using GetDoc() member everywhere.
(cherry picked from commit 1168a11278ed3c2a00058e1f802f6e44cb925318)
Reviewed-on: https://gerrit.libreoffice.org/46680
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit dc3f0bde0bdef2a1e94055be146b433cb9fc54ba)
Change-Id: I16a94b7ef7c45ef3af14e812b45f255f39939a6e
Reviewed-on: https://gerrit.libreoffice.org/46990
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'sc/inc/column.hxx')
-rw-r--r-- | sc/inc/column.hxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 5c34279ad3c4..ff65fbc3b3a0 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -29,6 +29,7 @@ #include "mtvelements.hxx" #include <formula/types.hxx> #include <svl/zforlist.hxx> +#include "attarray.hxx" #include <set> #include <vector> @@ -139,14 +140,13 @@ class ScColumn // Cell values. sc::CellStoreType maCells; - SCCOL nCol; - SCTAB nTab; - - ScAttrArray* pAttrArray; - ScDocument* pDocument; + ScAttrArray* pAttrArray; size_t mnBlkCountFormula; + SCCOL nCol; + SCTAB nTab; + friend class ScDocument; // for FillInfo friend class ScTable; friend class ScValueIterator; @@ -190,8 +190,7 @@ public: void Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc, bool bEmptyAttrArray); - ScDocument& GetDoc() { return *pDocument;} - const ScDocument& GetDoc() const { return *pDocument;} + ScDocument* GetDoc() const { return pAttrArray->GetDoc(); } SCTAB GetTab() const { return nTab; } SCCOL GetCol() const { return nCol; } sc::CellStoreType& GetCellStore() { return maCells; } |