sc/source/core/data/column.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
New commits: commit d2527107fa549061fe2e9db6a15ec2cbd90c0b29 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Tue Jul 9 22:56:30 2013 -0400 Grouping of formula cells during undo. Change-Id: I57693eee34a073cd3f39fdd4f5a74eafb12c9dc7 diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index c8fadce..0345684 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1572,7 +1572,6 @@ class CopyAsLinkHandler sc::ColumnBlockPosition maDestPos; sc::ColumnBlockPosition* mpDestPos; sal_uInt16 mnCopyFlags; - std::vector<ScFormulaCell*> maCellBuffer; void setDefaultAttrToDest(size_t nRow) { @@ -1602,13 +1601,12 @@ class CopyAsLinkHandler { size_t nTopRow = aNode.position + nOffset; - maCellBuffer.clear(); - maCellBuffer.reserve(nDataSize); - for (size_t i = 0; i < nDataSize; ++i) - maCellBuffer.push_back(createRefCell(nTopRow + i)); + { + SCROW nRow = nTopRow + i; + mrDestCol.SetFormulaCell(maDestPos, nRow, createRefCell(nRow)); + } - maDestPos.miCellPos = mrDestCol.GetCellStore().set(maDestPos.miCellPos, nTopRow, maCellBuffer.begin(), maCellBuffer.end()); setDefaultAttrsToDest(nTopRow, nDataSize); } @@ -1727,7 +1725,7 @@ class CopyByCloneHandler // Clone as formula cell. ScFormulaCell* pCell = new ScFormulaCell(rSrcCell, mrDestCol.GetDoc(), aDestPos); pCell->SetDirtyVar(); - maDestPos.miCellPos = mrDestCol.GetCellStore().set(maDestPos.miCellPos, nRow, pCell); + mrDestCol.SetFormulaCell(maDestPos, nRow, pCell); setDefaultAttrToDest(nRow); return; } @@ -1743,8 +1741,7 @@ class CopyByCloneHandler // error codes are cloned with values ScFormulaCell* pErrCell = new ScFormulaCell(&mrDestCol.GetDoc(), aDestPos); pErrCell->SetErrCode(nErr); - maDestPos.miCellPos = mrDestCol.GetCellStore().set( - maDestPos.miCellPos, nRow, new ScFormulaCell(rSrcCell, mrDestCol.GetDoc(), aDestPos)); + mrDestCol.SetFormulaCell(maDestPos, nRow, pErrCell); setDefaultAttrToDest(nRow); return; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits