ooo-build r14065 - in trunk: . patches/dev300



Author: kyoshida
Date: Wed Sep 24 18:19:00 2008
New Revision: 14065
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14065&view=rev

Log:
2008-09-24  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/calc-dp-drilldown-hidden-items.diff: forgot to pool
	cached cell contents also for the external database backend.  This 
	caused memory leak since non-pooled contents were not explicitly 
	freed.


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/calc-dp-drilldown-hidden-items.diff

Modified: trunk/patches/dev300/calc-dp-drilldown-hidden-items.diff
==============================================================================
--- trunk/patches/dev300/calc-dp-drilldown-hidden-items.diff	(original)
+++ trunk/patches/dev300/calc-dp-drilldown-hidden-items.diff	Wed Sep 24 18:19:00 2008
@@ -480,7 +480,7 @@
  extern const LocaleDataWrapper* GetScGlobalpLocaleData();
  
 diff --git sc/source/core/data/dpcachetable.cxx sc/source/core/data/dpcachetable.cxx
-index 1be291c..f04cc44 100644
+index 707b56d..04f14e9 100644
 --- sc/source/core/data/dpcachetable.cxx
 +++ sc/source/core/data/dpcachetable.cxx
 @@ -37,8 +37,7 @@
@@ -701,7 +701,7 @@
  {
  }
  
-@@ -300,7 +243,7 @@ void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const Sc
+@@ -295,7 +238,7 @@ void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const Sc
      {
          String aStr;
          pDoc->GetString(nCol + nStartCol, nStartRow, nTab, aStr);
@@ -710,7 +710,7 @@
          maHeader.push_back(nStrId);
      }
  
-@@ -339,24 +282,28 @@ void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const Sc
+@@ -334,24 +277,28 @@ void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const Sc
              Cell& rCell = maTable.back().back();
              rCell.mnCategoryRef = maTable.size()-1;
  
@@ -751,7 +751,7 @@
  
              if (!maFieldEntries[nCol]->Insert(pNew))
                  delete pNew;
-@@ -365,14 +312,15 @@ void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const Sc
+@@ -360,14 +307,15 @@ void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const Sc
  }
  
  void lcl_GetCellValue(const Reference<sdbc::XRow>& xRow, sal_Int32 nType, long nCol,
@@ -769,7 +769,7 @@
          rCell.mnType = SC_VALTYPE_STRING;
  
          switch (nType)
-@@ -487,7 +435,7 @@ void ScDPCacheTable::fillTable(const Reference<sdbc::XRowSet>& xRowSet, const Da
+@@ -482,7 +430,7 @@ void ScDPCacheTable::fillTable(const Reference<sdbc::XRowSet>& xRowSet, const Da
          {
              String aColTitle = xMeta->getColumnLabel(nCol+1);
              aColTypes[nCol]  = xMeta->getColumnType(nCol+1);
@@ -778,14 +778,15 @@
          }
  
          // Initialize field entries container.
-@@ -513,12 +461,13 @@ void ScDPCacheTable::fillTable(const Reference<sdbc::XRowSet>& xRowSet, const Da
+@@ -508,12 +456,14 @@ void ScDPCacheTable::fillTable(const Reference<sdbc::XRowSet>& xRowSet, const Da
              {
                  maTable.back().push_back( Cell() );
                  Cell& rCell = maTable.back().back();
-+                rCell.mpContent = new ScDPCacheCell;
++                ScDPCacheCell aCellContent;
                  String aStr;
 -                lcl_GetCellValue(xRow, aColTypes[nCol], nCol+1, rNullDate, rCell, aStr);
-+                lcl_GetCellValue(xRow, aColTypes[nCol], nCol+1, rNullDate, *rCell.mpContent, aStr, mrSharedString);
++                lcl_GetCellValue(xRow, aColTypes[nCol], nCol+1, rNullDate, aCellContent, aStr, mrSharedString);
++                rCell.mpContent = mpCollection->getCacheCellFromPool(aCellContent);
  
                  TypedStrData* pNew;
 -                if (rCell.mbNumeric)
@@ -795,7 +796,7 @@
                  else
                      pNew = new TypedStrData(aStr);
  
-@@ -557,20 +506,21 @@ void ScDPCacheTable::filterByPageDimension(const vector<Criterion>& rCriteria, b
+@@ -552,20 +502,21 @@ void ScDPCacheTable::filterByPageDimension(const vector<Criterion>& rCriteria, b
          maRowsVisible[nRow] = isRowQualified(nRow, rCriteria, bRepeatIfEmpty);
  }
  
@@ -823,7 +824,7 @@
  }
  
  const String* ScDPCacheTable::getFieldName(sal_Int32 nIndex) const
-@@ -578,12 +528,12 @@ const String* ScDPCacheTable::getFieldName(sal_Int32 nIndex) const
+@@ -573,12 +524,12 @@ const String* ScDPCacheTable::getFieldName(sal_Int32 nIndex) const
      if (nIndex >= static_cast<sal_Int32>(maHeader.size()))
          return NULL;
  
@@ -838,7 +839,7 @@
      if (nStrId < 0)
          // string not found.
          return nStrId;
-@@ -628,7 +578,7 @@ void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< S
+@@ -623,7 +574,7 @@ void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< S
      for (sal_Int32 nCol = 0; nCol < nColSize; ++nCol)
      {
          OUString str;
@@ -847,7 +848,7 @@
          if (pStr)
              str = *pStr;
  
-@@ -654,7 +604,7 @@ void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< S
+@@ -649,7 +600,7 @@ void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< S
          for (SCCOL nCol = 0; nCol < nColSize; ++nCol)
          {
              Any any;
@@ -856,7 +857,7 @@
              if (!pCell)
              {
                  // This should never happen, but in case this happens, just
-@@ -670,7 +620,7 @@ void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< S
+@@ -665,7 +616,7 @@ void ScDPCacheTable::filterTable(const vector<Criterion>& rCriteria, Sequence< S
              else
              {
                  OUString str;
@@ -865,7 +866,7 @@
                  if (pStr)
                      str = *pStr;
                  any <<= str;
-@@ -719,7 +669,7 @@ bool ScDPCacheTable::isRowQualified(sal_Int32 nRow, const vector<Criterion>& rCr
+@@ -714,7 +665,7 @@ bool ScDPCacheTable::isRowQualified(sal_Int32 nRow, const vector<Criterion>& rCr
              // use this criterion.
              continue;
  
@@ -874,7 +875,7 @@
          if (!pCell)
              // This should never happen, but just in case...
              return false;
-@@ -730,7 +680,7 @@ bool ScDPCacheTable::isRowQualified(sal_Int32 nRow, const vector<Criterion>& rCr
+@@ -725,7 +676,7 @@ bool ScDPCacheTable::isRowQualified(sal_Int32 nRow, const vector<Criterion>& rCr
      return true;
  }
  
@@ -883,7 +884,7 @@
  {
      ScBaseCell* pCell = pDoc->GetCell(rPos);
      if (!pCell)
-@@ -768,12 +718,3 @@ void ScDPCacheTable::getValueData(ScDocument* pDoc, const ScAddress& rPos, Cell&
+@@ -763,12 +714,3 @@ void ScDPCacheTable::getValueData(ScDocument* pDoc, const ScAddress& rPos, Cell&
      }
  }
  



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]