diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-19 23:19:42 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-19 23:21:08 -0400 |
commit | 75c87c417b6fbb82d956a803f065c9c49d0d62f4 (patch) | |
tree | 9fb11583976eef94aa046c399a01045e20187553 | |
parent | WaE: variables set but not used (diff) | |
download | core-75c87c417b6fbb82d956a803f065c9c49d0d62f4.tar.gz core-75c87c417b6fbb82d956a803f065c9c49d0d62f4.zip |
Rename to ScDPResultTree.
It *is* a result tree. Let's call it that.
Change-Id: Ie8f3e4c4f6e54fd84d79b80ac98c0be0b0cc42d4
-rw-r--r-- | sc/inc/dpresfilter.hxx | 10 | ||||
-rw-r--r-- | sc/inc/dptabsrc.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpresfilter.cxx | 28 | ||||
-rw-r--r-- | sc/source/core/data/dptabsrc.cxx | 2 |
4 files changed, 21 insertions, 21 deletions
diff --git a/sc/inc/dpresfilter.hxx b/sc/inc/dpresfilter.hxx index a151bd3da4bd..bde3c02cb55e 100644 --- a/sc/inc/dpresfilter.hxx +++ b/sc/inc/dpresfilter.hxx @@ -46,7 +46,7 @@ struct ScDPResultFilter * <p>If the pivot table layout only consists of either column or row * dimensions, the root node only has one child node.</p> */ -class ScDPResultFilterSet : boost::noncopyable +class ScDPResultTree : boost::noncopyable { public: typedef std::vector<double> ValuesType; @@ -90,8 +90,8 @@ private: public: - ScDPResultFilterSet(); - ~ScDPResultFilterSet(); + ScDPResultTree(); + ~ScDPResultTree(); /** * Add a single value filter path. The filters are expected to be sorted @@ -106,7 +106,7 @@ public: */ void add(const std::vector<ScDPResultFilter>& rFilter, long nCol, long nRow, double fVal); - void swap(ScDPResultFilterSet& rOther); + void swap(ScDPResultTree& rOther); bool empty() const; void clear(); @@ -122,7 +122,7 @@ public: struct ScDPResultFilterContext { - ScDPResultFilterSet maFilterSet; + ScDPResultTree maFilterSet; std::vector<ScDPResultFilter> maFilters; long mnCol; long mnRow; diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 51b6759c8c1c..60f92121f930 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -104,7 +104,7 @@ private: std::vector<long> maRowDims; std::vector<long> maDataDims; std::vector<long> maPageDims; - ScDPResultFilterSet maResFilterSet; + ScDPResultTree maResFilterSet; bool bColumnGrand; bool bRowGrand; diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx index 81eb3d15d580..968be6b424e7 100644 --- a/sc/source/core/data/dpresfilter.cxx +++ b/sc/source/core/data/dpresfilter.cxx @@ -21,10 +21,10 @@ ScDPResultFilter::ScDPResultFilter(const OUString& rDimName, bool bDataLayout) : ScDPResultFilterContext::ScDPResultFilterContext() : mnCol(0), mnRow(0) {} -ScDPResultFilterSet::DimensionNode::DimensionNode(const MemberNode* pParent) : +ScDPResultTree::DimensionNode::DimensionNode(const MemberNode* pParent) : mpParent(pParent) {} -ScDPResultFilterSet::DimensionNode::~DimensionNode() +ScDPResultTree::DimensionNode::~DimensionNode() { MembersType::iterator it = maChildMembers.begin(), itEnd = maChildMembers.end(); for (; it != itEnd; ++it) @@ -32,7 +32,7 @@ ScDPResultFilterSet::DimensionNode::~DimensionNode() } #if DEBUG_PIVOT_TABLE -void ScDPResultFilterSet::DimensionNode::dump(int nLevel) const +void ScDPResultTree::DimensionNode::dump(int nLevel) const { string aIndent(nLevel*2, ' '); MembersType::const_iterator it = maChildMembers.begin(), itEnd = maChildMembers.end(); @@ -51,10 +51,10 @@ void ScDPResultFilterSet::DimensionNode::dump(int nLevel) const } #endif -ScDPResultFilterSet::MemberNode::MemberNode(const DimensionNode* pParent) : +ScDPResultTree::MemberNode::MemberNode(const DimensionNode* pParent) : mpParent(pParent) {} -ScDPResultFilterSet::MemberNode::~MemberNode() +ScDPResultTree::MemberNode::~MemberNode() { DimensionsType::iterator it = maChildDimensions.begin(), itEnd = maChildDimensions.end(); for (; it != itEnd; ++it) @@ -62,7 +62,7 @@ ScDPResultFilterSet::MemberNode::~MemberNode() } #if DEBUG_PIVOT_TABLE -void ScDPResultFilterSet::MemberNode::dump(int nLevel) const +void ScDPResultTree::MemberNode::dump(int nLevel) const { string aIndent(nLevel*2, ' '); ValuesType::const_iterator itVal = maValues.begin(), itValEnd = maValues.end(); @@ -78,13 +78,13 @@ void ScDPResultFilterSet::MemberNode::dump(int nLevel) const } #endif -ScDPResultFilterSet::ScDPResultFilterSet() : mpRoot(new MemberNode(NULL)) {} -ScDPResultFilterSet::~ScDPResultFilterSet() +ScDPResultTree::ScDPResultTree() : mpRoot(new MemberNode(NULL)) {} +ScDPResultTree::~ScDPResultTree() { delete mpRoot; } -void ScDPResultFilterSet::add( +void ScDPResultTree::add( const std::vector<ScDPResultFilter>& rFilters, long /*nCol*/, long /*nRow*/, double fVal) { // TODO: I'll work on the col / row to value node mapping later. @@ -141,25 +141,25 @@ void ScDPResultFilterSet::add( pMemNode->maValues.push_back(fVal); } -void ScDPResultFilterSet::swap(ScDPResultFilterSet& rOther) +void ScDPResultTree::swap(ScDPResultTree& rOther) { std::swap(maPrimaryDimName, rOther.maPrimaryDimName); std::swap(mpRoot, rOther.mpRoot); } -bool ScDPResultFilterSet::empty() const +bool ScDPResultTree::empty() const { return mpRoot->maChildDimensions.empty(); } -void ScDPResultFilterSet::clear() +void ScDPResultTree::clear() { maPrimaryDimName = EMPTY_OUSTRING; delete mpRoot; mpRoot = new MemberNode(NULL); } -const ScDPResultFilterSet::ValuesType* ScDPResultFilterSet::getResults( +const ScDPResultTree::ValuesType* ScDPResultTree::getResults( const uno::Sequence<sheet::DataPilotFieldFilter>& rFilters) const { const sheet::DataPilotFieldFilter* p = rFilters.getConstArray(); @@ -185,7 +185,7 @@ const ScDPResultFilterSet::ValuesType* ScDPResultFilterSet::getResults( } #if DEBUG_PIVOT_TABLE -void ScDPResultFilterSet::dump() const +void ScDPResultTree::dump() const { cout << "primary dimension name: " << maPrimaryDimName << endl; mpRoot->dump(0); diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 8efadd5544ea..6f83b9e1fa29 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -422,7 +422,7 @@ uno::Sequence<double> ScDPSource::getFilteredResults( getResults(); // Build result tree first. // Get result values from the tree. - const ScDPResultFilterSet::ValuesType* pVals = maResFilterSet.getResults(aFilters); + const ScDPResultTree::ValuesType* pVals = maResFilterSet.getResults(aFilters); if (!pVals) return uno::Sequence<double>(); |