[Libreoffice-commits] .: Branch 'integration/dev300_m101' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Mar 14 21:14:53 PDT 2011


 sc/source/core/data/global2.cxx |  120 ----------------------------------------
 sc/source/core/data/pivot2.cxx  |   79 +++++++++++++++++++++++---
 2 files changed, 69 insertions(+), 130 deletions(-)

New commits:
commit 1a19b7feeac0c903db401daa6b0432a1daf276cb
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Mar 15 00:11:16 2011 -0400

    Fixed part of the linkage problem due to multiple definitions.

diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 894f8b4..0579f77 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 d1b5829..2f455f5 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,19 +123,74 @@ 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
 {
     bool bEqual = (nCol == r.nCol)
-                 &&	(nRow == r.nRow)
+                 && (nRow == r.nRow)
                  && (nTab == r.nTab)
                  && (bIgnoreEmptyRows  == r.bIgnoreEmptyRows)
                  && (bDetectCategories == r.bDetectCategories)


More information about the Libreoffice-commits mailing list