summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-15 00:11:16 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-03-15 00:11:16 -0400
commit2db8d16be61abaf143c3976c323d40f030507331 (patch)
tree41889f813fdc96f0229a77642b7a65925824f090 /sc/source
parent4215f9c0241d7bd665e91492a6862ddef82ce431 (diff)
Fixed part of the linkage problem due to multiple definitions.
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/global2.cxx120
-rw-r--r--sc/source/core/data/pivot2.cxx77
2 files changed, 68 insertions, 129 deletions
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index d058fcc0b022..669d4024c8d9 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -546,126 +546,6 @@ void ScConsolidateParam::SetAreas( ScArea* const* ppAreas, sal_uInt16 nCount )
}
}
-// -----------------------------------------------------------------------
-
-PivotField::PivotField( SCsCOL nNewCol, sal_uInt16 nNewFuncMask ) :
- nCol( nNewCol ),
- nFuncMask( nNewFuncMask ),
- nFuncCount( 0 )
-{
-}
-
-PivotField::PivotField( const PivotField& r ) :
- nCol(r.nCol), nFuncMask(r.nFuncMask), nFuncCount(r.nFuncCount), maFieldRef(r.maFieldRef)
-{
-}
-
-bool PivotField::operator==( const PivotField& 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);
-}
-
-//------------------------------------------------------------------------
-// struct ScPivotParam:
-
-ScPivotParam::ScPivotParam()
- : nCol(0), nRow(0), nTab(0),
- bIgnoreEmptyRows(false), bDetectCategories(false),
- bMakeTotalCol(true), bMakeTotalRow(true)
-{
-}
-
-//------------------------------------------------------------------------
-
-ScPivotParam::ScPivotParam( const ScPivotParam& r )
- : nCol( r.nCol ), nRow( r.nRow ), nTab( r.nTab ),
- maPageFields(r.maPageFields),
- maColFields(r.maColFields),
- maRowFields(r.maRowFields),
- maDataFields(r.maDataFields),
- bIgnoreEmptyRows(r.bIgnoreEmptyRows),
- bDetectCategories(r.bDetectCategories),
- bMakeTotalCol(r.bMakeTotalCol),
- bMakeTotalRow(r.bMakeTotalRow)
-{
- SetLabelData(r.maLabelArray);
-}
-
-//------------------------------------------------------------------------
-
-ScPivotParam::~ScPivotParam()
-{
-}
-
-//------------------------------------------------------------------------
-
-void ScPivotParam::ClearPivotArrays()
-{
- maPageFields.clear();
- maColFields.clear();
- maRowFields.clear();
- maDataFields.clear();
-}
-
-void ScPivotParam::SetLabelData(const vector<ScDPLabelDataRef>& r)
-{
- vector<ScDPLabelDataRef> aNewArray;
- aNewArray.reserve(r.size());
- for (vector<ScDPLabelDataRef>::const_iterator itr = r.begin(), itrEnd = r.end();
- itr != itrEnd; ++itr)
- {
- ScDPLabelDataRef p(new ScDPLabelData(**itr));
- aNewArray.push_back(p);
- }
- maLabelArray.swap(aNewArray);
-}
-
-//------------------------------------------------------------------------
-
-ScPivotParam& ScPivotParam::operator=( const ScPivotParam& r )
-{
- nCol = r.nCol;
- nRow = r.nRow;
- nTab = r.nTab;
- bIgnoreEmptyRows = r.bIgnoreEmptyRows;
- bDetectCategories = r.bDetectCategories;
- bMakeTotalCol = r.bMakeTotalCol;
- bMakeTotalRow = r.bMakeTotalRow;
-
- maPageFields = r.maPageFields;
- maColFields = r.maColFields;
- maRowFields = r.maRowFields;
- maDataFields = r.maDataFields;
- SetLabelData(r.maLabelArray);
- return *this;
-}
-
-//------------------------------------------------------------------------
-
-bool ScPivotParam::operator==( const ScPivotParam& r ) const
-{
- sal_Bool bEqual = (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())
- && maPageFields == r.maPageFields
- && maColFields == r.maColFields
- && maRowFields == r.maRowFields
- && maDataFields == r.maDataFields;
-
- return bEqual;
-}
-
//------------------------------------------------------------------------
// struct ScSolveParam
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 7ee91d0db9f9..68033dca3ecb 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -58,6 +58,7 @@
using ::com::sun::star::sheet::DataPilotFieldReference;
using ::rtl::OUString;
+using ::std::vector;
// ============================================================================
@@ -99,16 +100,19 @@ OUString ScDPLabelData::getDisplayName() const
return maName;
}
-// ============================================================================
-
-ScPivotField::ScPivotField( SCCOL nNewCol, sal_uInt16 nNewFuncMask ) :
+PivotField::PivotField( SCsCOL nNewCol, sal_uInt16 nNewFuncMask ) :
nCol( nNewCol ),
nFuncMask( nNewFuncMask ),
nFuncCount( 0 )
{
}
-bool ScPivotField::operator==( const ScPivotField& r ) const
+PivotField::PivotField( const PivotField& r ) :
+ nCol(r.nCol), nFuncMask(r.nFuncMask), nFuncCount(r.nFuncCount), maFieldRef(r.maFieldRef)
+{
+}
+
+bool PivotField::operator==( const PivotField& r ) const
{
return (nCol == r.nCol)
&& (nFuncMask == r.nFuncMask)
@@ -119,13 +123,68 @@ bool ScPivotField::operator==( const ScPivotField& r ) const
&& (maFieldRef.ReferenceItemName == r.maFieldRef.ReferenceItemName);
}
-// ============================================================================
-
ScPivotParam::ScPivotParam()
- : nCol( 0 ), nRow( 0 ), nTab( 0 ),
- bIgnoreEmptyRows( false ), bDetectCategories( false ),
- bMakeTotalCol( true ), bMakeTotalRow( true )
+ : nCol(0), nRow(0), nTab(0),
+ bIgnoreEmptyRows(false), bDetectCategories(false),
+ bMakeTotalCol(true), bMakeTotalRow(true)
+{
+}
+
+ScPivotParam::ScPivotParam( const ScPivotParam& r )
+ : nCol( r.nCol ), nRow( r.nRow ), nTab( r.nTab ),
+ maPageFields(r.maPageFields),
+ maColFields(r.maColFields),
+ maRowFields(r.maRowFields),
+ maDataFields(r.maDataFields),
+ bIgnoreEmptyRows(r.bIgnoreEmptyRows),
+ bDetectCategories(r.bDetectCategories),
+ bMakeTotalCol(r.bMakeTotalCol),
+ bMakeTotalRow(r.bMakeTotalRow)
+{
+ SetLabelData(r.maLabelArray);
+}
+
+ScPivotParam::~ScPivotParam()
+{
+}
+
+void ScPivotParam::ClearPivotArrays()
+{
+ maPageFields.clear();
+ maColFields.clear();
+ maRowFields.clear();
+ maDataFields.clear();
+}
+
+void ScPivotParam::SetLabelData(const vector<ScDPLabelDataRef>& r)
+{
+ vector<ScDPLabelDataRef> aNewArray;
+ aNewArray.reserve(r.size());
+ for (vector<ScDPLabelDataRef>::const_iterator itr = r.begin(), itrEnd = r.end();
+ itr != itrEnd; ++itr)
+ {
+ ScDPLabelDataRef p(new ScDPLabelData(**itr));
+ aNewArray.push_back(p);
+ }
+ maLabelArray.swap(aNewArray);
+}
+
+ScPivotParam& ScPivotParam::operator=( const ScPivotParam& r )
{
+ nCol = r.nCol;
+ nRow = r.nRow;
+ nTab = r.nTab;
+ bIgnoreEmptyRows = r.bIgnoreEmptyRows;
+ bDetectCategories = r.bDetectCategories;
+ bMakeTotalCol = r.bMakeTotalCol;
+ bMakeTotalRow = r.bMakeTotalRow;
+
+ maPageFields = r.maPageFields;
+ maColFields = r.maColFields;
+ maRowFields = r.maRowFields;
+ maDataFields = r.maDataFields;
+ SetLabelData(r.maLabelArray);
+ return *this;
}
bool ScPivotParam::operator==( const ScPivotParam& r ) const