summaryrefslogtreecommitdiff
path: root/sc/source/core/data/pivot2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/pivot2.cxx')
-rw-r--r--sc/source/core/data/pivot2.cxx55
1 files changed, 49 insertions, 6 deletions
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index dc1ac56438f7..6b540781b66d 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -28,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
#ifdef _MSC_VER
#pragma optimize("",off)
#endif
@@ -60,7 +58,6 @@
using ::com::sun::star::sheet::DataPilotFieldReference;
using ::rtl::OUString;
-// STATIC DATA -----------------------------------------------------------
// ============================================================================
ScDPLabelData::Member::Member() :
@@ -77,7 +74,7 @@ OUString ScDPLabelData::Member::getDisplayName() const
return maName;
}
-ScDPLabelData::ScDPLabelData( const String& rName, short nCol, bool bIsValue ) :
+ScDPLabelData::ScDPLabelData( const String& rName, SCCOL nCol, bool bIsValue ) :
maName( rName ),
mnCol( nCol ),
mnFuncMask( PIVOT_FUNC_NONE ),
@@ -98,13 +95,59 @@ OUString ScDPLabelData::getDisplayName() const
// ============================================================================
-ScDPFuncData::ScDPFuncData( short nCol, sal_uInt16 nFuncMask ) :
+ScPivotField::ScPivotField( SCCOL nNewCol, sal_uInt16 nNewFuncMask ) :
+ nCol( nNewCol ),
+ nFuncMask( nNewFuncMask ),
+ nFuncCount( 0 )
+{
+}
+
+bool ScPivotField::operator==( const ScPivotField& r ) const
+{
+ return (nCol == r.nCol)
+ && (nFuncMask == r.nFuncMask)
+ && (nFuncCount == r.nFuncCount)
+ && (maFieldRef.ReferenceType == r.maFieldRef.ReferenceType)
+ && (maFieldRef.ReferenceField == r.maFieldRef.ReferenceField)
+ && (maFieldRef.ReferenceItemType == r.maFieldRef.ReferenceItemType)
+ && (maFieldRef.ReferenceItemName == r.maFieldRef.ReferenceItemName);
+}
+
+// ============================================================================
+
+ScPivotParam::ScPivotParam()
+ : nCol( 0 ), nRow( 0 ), nTab( 0 ),
+ bIgnoreEmptyRows( false ), bDetectCategories( false ),
+ bMakeTotalCol( true ), bMakeTotalRow( true )
+{
+}
+
+bool ScPivotParam::operator==( const ScPivotParam& r ) const
+{
+ return
+ (nCol == r.nCol)
+ && (nRow == r.nRow)
+ && (nTab == r.nTab)
+ && (bIgnoreEmptyRows == r.bIgnoreEmptyRows)
+ && (bDetectCategories == r.bDetectCategories)
+ && (bMakeTotalCol == r.bMakeTotalCol)
+ && (bMakeTotalRow == r.bMakeTotalRow)
+ && (maLabelArray.size() == r.maLabelArray.size()) // ! only size??
+ && (maPageArr == r.maPageArr)
+ && (maColArr == r.maColArr)
+ && (maRowArr == r.maRowArr)
+ && (maDataArr == r.maDataArr);
+}
+
+// ============================================================================
+
+ScPivotFuncData::ScPivotFuncData( SCCOL nCol, sal_uInt16 nFuncMask ) :
mnCol( nCol ),
mnFuncMask( nFuncMask )
{
}
-ScDPFuncData::ScDPFuncData( short nCol, sal_uInt16 nFuncMask, const DataPilotFieldReference& rFieldRef ) :
+ScPivotFuncData::ScPivotFuncData( SCCOL nCol, sal_uInt16 nFuncMask, const DataPilotFieldReference& rFieldRef ) :
mnCol( nCol ),
mnFuncMask( nFuncMask ),
maFieldRef( rFieldRef )