[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Tue Jun 25 20:28:53 PDT 2013


 sc/source/core/data/column.cxx |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 1bb5724be6e3e8844526a8d160013b25d6ce976f
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Jun 25 23:30:56 2013 -0400

    CopyUpdated() to use ParseBlock() instead of CopyCellsInRangeToColumn().
    
    Change-Id: I7f1456462ac3bb9d551d3d1bb303a68d74fa16f1

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 2ff8780..c561035 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1897,13 +1897,7 @@ void ScColumn::UndoToColumn(
 void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const
 {
     // Copy cells from this column to the destination column only for those
-    // rows that are present in the position column.
-
-    sc::CellBlockCloneHandler aHdl(*pDocument, *rDestCol.pDocument, rDestCol.maCells, rDestCol.maCellTextAttrs);
-    sc::ColumnBlockConstPosition aSrcPos;
-    sc::ColumnBlockPosition aDestPos;
-    InitBlockPosition(aSrcPos);
-    rDestCol.InitBlockPosition(aDestPos);
+    // rows that are present in the position column (rPosCol).
 
     // First, mark all the non-empty cell ranges from the position column.
     sc::SingleColumnSpanSet aRangeSet;
@@ -1913,9 +1907,17 @@ void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const
     // marked row ranges.
     sc::SingleColumnSpanSet::SpansType aRanges;
     aRangeSet.getSpans(aRanges);
+
+    CopyToClipHandler aFunc(*this, rDestCol, NULL);
+    sc::CellStoreType::const_iterator itPos = maCells.begin();
     sc::SingleColumnSpanSet::SpansType::const_iterator it = aRanges.begin(), itEnd = aRanges.end();
     for (; it != itEnd; ++it)
-        CopyCellsInRangeToColumn(&aSrcPos, &aDestPos, aHdl, it->mnRow1, it->mnRow2, rDestCol);
+    {
+        itPos = sc::ParseBlock(itPos, maCells, aFunc, it->mnRow1, it->mnRow2);
+        rDestCol.RegroupFormulaCells(it->mnRow1, it->mnRow2);
+    }
+
+    rDestCol.CellStorageModified();
 }
 
 


More information about the Libreoffice-commits mailing list