diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-06-25 23:30:56 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-06-27 15:47:56 -0400 |
commit | cbea3f5af0487ce6e88e40c6d5b1ad617731fd39 (patch) | |
tree | 2e4a5a5b8fdcce75021601a7201c2d389d28ae08 | |
parent | 9a5783112513c3eaf4928bc191d9112a67337da1 (diff) |
CopyUpdated() to use ParseBlock() instead of CopyCellsInRangeToColumn().
Change-Id: I7f1456462ac3bb9d551d3d1bb303a68d74fa16f1
-rw-r--r-- | sc/source/core/data/column.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 8b2f769fa0e9..01b4b89e8333 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(); } |