diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-15 02:03:19 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-15 11:37:07 -0400 |
commit | feb5b164f6a371ee934049c89b3d02ca5308f68e (patch) | |
tree | aab89d114648f739ceb86bb18999ad77bfcbf312 /sc | |
parent | d71e44e78333111a02818b903699188bc372b382 (diff) |
Don't forget to set text widths here too.
Change-Id: Ieaa9bd0e4f8117e3bc7ceccc68d6f37daac61440
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index e778f964483d..a53c8a8db0bc 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -879,12 +879,12 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2) { // remove ColEntry at old position maItems.erase( maItems.begin() + nIndex1 ); + maTextWidths.set_empty(nRow1, nRow1); } // Empty text width at the cell 1 position. For now, we don't // transfer the old value to the cell 2 position since Insert() is // quite complicated. - maTextWidths.set_empty(nRow1, nRow1); CellStorageModified(); // insert ColEntry at new position. @@ -1284,6 +1284,7 @@ void ScColumn::CopyStaticToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol itEnd = std::find_if(it, rDestCol.maItems.end(), FindAboveRow(nRow2)); std::for_each(it, itEnd, DeleteCell()); rDestCol.maItems.erase(it, itEnd); + rDestCol.maTextWidths.set_empty(nRow1, nRow2); } // Determine the range of cells in the original column that need to be copied. @@ -1351,6 +1352,10 @@ void ScColumn::CopyStaticToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol // destination column shouldn't have any cells within the specified range. it = std::find_if(rDestCol.maItems.begin(), rDestCol.maItems.end(), FindAboveRow(nRow2)); rDestCol.maItems.insert(it, aCopied.begin(), aCopied.end()); + it = aCopied.begin(); + itEnd = aCopied.end(); + for (; it != itEnd; ++it) + rDestCol.maTextWidths.set<unsigned short>(it->nRow, TEXTWIDTH_DIRTY); } void ScColumn::CopyToColumn( |