diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-18 22:00:19 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-19 00:30:11 -0400 |
commit | 77c84dd59f438c10d559393e9cc7b63551529203 (patch) | |
tree | 6f0b07ca7065993ddcb2670ee95a9dfc873aef99 /sc/inc/dpsave.hxx | |
parent | d6cfe8de74969928af13a04ebc5ae9dbc9274196 (diff) |
Move the dimension order calculation into ScDPSaveData.
To build the dim order map only once.
Change-Id: Ibea5cbfc4f5d335ac7fc5893cda255b06336d8c2
Diffstat (limited to 'sc/inc/dpsave.hxx')
-rw-r--r-- | sc/inc/dpsave.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx index 099f4cb763c1..770349ff5ce9 100644 --- a/sc/inc/dpsave.hxx +++ b/sc/inc/dpsave.hxx @@ -229,6 +229,7 @@ class ScDPSaveData { typedef boost::unordered_map<OUString, size_t, OUStringHash> DupNameCountType; public: + typedef boost::unordered_map<OUString, size_t, OUStringHash> DimOrderType; typedef boost::ptr_vector<ScDPSaveDimension> DimsType; private: @@ -247,6 +248,7 @@ private: bool mbDimensionMembersBuilt; boost::scoped_ptr<OUString> mpGrandTotalName; + mutable boost::scoped_ptr<DimOrderType> mpDimOrder; // dimension order for row and column dimensions, to traverse result tree. public: SC_DLLPUBLIC ScDPSaveData(); @@ -262,6 +264,8 @@ public: SC_DLLPUBLIC const DimsType& GetDimensions() const; + const DimOrderType& GetDimensionSortOrder() const; + /** * Get all dimensions in a given orientation. The order represents the * actual order of occurrence. The returned list also includes data @@ -363,6 +367,8 @@ private: * @return pointer to the new dimension just inserted. */ ScDPSaveDimension* AppendNewDimension(const OUString& rName, bool bDataLayout); + + void DimensionChanged(); }; #endif |