diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-01-10 13:16:20 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-01-24 16:54:33 +0100 |
commit | 793077a5dcc59ce0f1e6d34a688870bfb443f6df (patch) | |
tree | 96bd8badf325a8d965497196d576c41b0af6817c /sc | |
parent | 34b660c1e4b69c4aedcc5ab65ddb12027d4093c6 (diff) |
only delete cell content for CELLTYPE_NONE, fdo#88200
Change-Id: I43463b56cabfea4c9ee2b98445f7fb522221197d
Reviewed-on: https://gerrit.libreoffice.org/13843
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/column.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/cellvalue.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/column3.cxx | 13 |
3 files changed, 15 insertions, 3 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index dee712f0ede0..539c91692802 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -186,6 +186,7 @@ public: const sc::CellTextAttr* GetCellTextAttr( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const; void Delete( SCROW nRow ); + void DeleteContent( SCROW nRow, bool bBroadcast = true ); void FreeAll(); void FreeNotes(); void Swap( ScColumn& rOther, SCROW nRow1, SCROW nRow2, bool bPattern ); diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index b9eb32b2bc34..d1622116ffb5 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -123,7 +123,7 @@ static void commitToColumn( const ScCellValue& rCell, ScColumn& rColumn, SCROW n } break; default: - rColumn.Delete(nRow); + rColumn.DeleteContent(nRow); } } @@ -463,7 +463,7 @@ void ScCellValue::release( ScColumn& rColumn, SCROW nRow ) rColumn.SetFormulaCell(nRow, mpFormula); break; default: - rColumn.Delete(nRow); + rColumn.DeleteContent(nRow); } meType = CELLTYPE_NONE; diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 3c39880514b1..90f9b65f505e 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -108,7 +108,7 @@ void ScColumn::InterpretDirtyCells( SCROW nRow1, SCROW nRow2 ) sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aFunc); } -void ScColumn::Delete( SCROW nRow ) +void ScColumn::DeleteContent( SCROW nRow, bool bBroadcast ) { sc::CellStoreType::position_type aPos = maCells.position(nRow); sc::CellStoreType::iterator it = aPos.first; @@ -122,6 +122,17 @@ void ScColumn::Delete( SCROW nRow ) sc::SharedFormulaUtil::unshareFormulaCell(aPos, *p); } maCells.set_empty(nRow, nRow); + + if (bBroadcast) + { + Broadcast(nRow); + CellStorageModified(); + } +} + +void ScColumn::Delete( SCROW nRow ) +{ + DeleteContent(nRow, false); maCellTextAttrs.set_empty(nRow, nRow); maCellNotes.set_empty(nRow, nRow); |