summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table2.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-14 11:51:05 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-14 11:52:55 -0400
commit64073c45aac22696bed6b688bb34974d646f3c34 (patch)
tree4d3e4733e0438fe0117462e25e7c2491bc2647de /sc/source/core/data/table2.cxx
parent9a9ee66f0d9dd126ed31db096b77f9c67355411b (diff)
Do the same when inserting columns.
Change-Id: I387ef3c2c8345bb5be75909596f59af80b966443
Diffstat (limited to 'sc/source/core/data/table2.cxx')
-rw-r--r--sc/source/core/data/table2.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index d2174de1fb93..f60ed3f92d02 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -341,7 +341,8 @@ bool ScTable::TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ) cons
}
-void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize )
+void ScTable::InsertCol(
+ const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize )
{
if (nStartRow==0 && nEndRow==MAXROW)
{
@@ -388,6 +389,10 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE
aCol[MAXCOL - nSize - i].MoveTo(nStartRow, nEndRow, aCol[MAXCOL - i]);
}
+ std::vector<SCCOL> aRegroupCols;
+ rRegroupCols.getColumns(nTab, aRegroupCols);
+ std::for_each(aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(aCol));
+
// Transfer those notes that will get shifted into another container.
ScNotes aNotes(pDocument);
ScNotes::iterator itr = maNotes.begin();