Group a new formula cell in CopyCellToDocument.
Change-Id: I8a8a24f4d40210700979ef249636b85b6b81e8cd
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index ea48739..c69a3c1 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1535,7 +1535,7 @@ void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDes
ScAddress aDestPos = p->aPos;
aDestPos.SetRow(nDestRow);
ScFormulaCell* pNew = new ScFormulaCell(*p, *rDestCol.pDocument, aDestPos);
rDestCol.maCells.set(nDestRow, pNew);
rDestCol.SetFormulaCell(nDestRow, pNew);
}
break;
case sc::element_type_empty:
@@ -1550,7 +1550,6 @@ void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDes
else
rDestCol.maCellTextAttrs.set_empty(nDestRow, nDestRow);
rDestCol.RegroupFormulaCells(nDestRow);
rDestCol.CellStorageModified();
}