summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-02-14 20:53:18 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-02-14 20:58:33 -0500
commit29267e940a5280e959ae50828839beeb9314a8da (patch)
tree7e05e1e59b5dfc6e5e349620ca3cefc7a3972188
parent4931d3e5cfc83827faa26377ee77b9839ab93b9c (diff)
This should be a struct & let's not put everything in header.
Change-Id: Ic9b56092d5dcc3f2dc48d8f0909cb1e3f967c3d5
-rw-r--r--sc/inc/dptabres.hxx9
-rw-r--r--sc/source/core/data/dptabres.cxx7
2 files changed, 11 insertions, 5 deletions
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index bd628d048b27..68d53f72c292 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -227,16 +227,15 @@ struct MemberHashIndexFunc : public std::unary_function< const SCROW &, size_t >
size_t operator() (const SCROW &rDataIndex) const { return rDataIndex; }
};
-class ScDPParentDimData
+struct ScDPParentDimData
{
-public:
- const SCROW mnOrder; //! Ref
+ const SCROW mnOrder; //! Ref
const ScDPDimension* mpParentDim; //! Ref
const ScDPLevel* mpParentLevel; //! Ref
const ScDPMember* mpMemberDesc; //! Ref
- ScDPParentDimData():mnOrder(-1), mpParentDim( NULL), mpParentLevel( NULL ), mpMemberDesc( NULL ){}
- ScDPParentDimData( const SCROW nIndex, ScDPDimension* pDim, const ScDPLevel* pLev, const ScDPMember* pMember ): mnOrder( nIndex ), mpParentDim( pDim), mpParentLevel( pLev ), mpMemberDesc( pMember ){}
+ ScDPParentDimData();
+ ScDPParentDimData(SCROW nIndex, const ScDPDimension* pDim, const ScDPLevel* pLev, const ScDPMember* pMember);
};
typedef std::vector <ScDPParentDimData *> DimMemberArray;
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 8fa53a42840c..e6f735638ea9 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -3909,6 +3909,13 @@ void ScDPResultDimension::InitWithMembers(
}
}
+ScDPParentDimData::ScDPParentDimData() :
+ mnOrder(-1), mpParentDim(NULL), mpParentLevel(NULL), mpMemberDesc(NULL) {}
+
+ScDPParentDimData::ScDPParentDimData(
+ SCROW nIndex, const ScDPDimension* pDim, const ScDPLevel* pLev, const ScDPMember* pMember) :
+ mnOrder(nIndex), mpParentDim(pDim), mpParentLevel(pLev), mpMemberDesc(pMember) {}
+
ScDPParentDimData* ResultMembers::FindMember( const SCROW& nIndex ) const
{
DimMemberHash::const_iterator aRes = maMemberHash.find( nIndex );