diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-01-10 13:16:20 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-01-10 13:47:11 +0100 |
commit | 8449e43255c0929af9c9a205e60db2bb0f4fbde8 (patch) | |
tree | ba907d4ab68c30254f69a254adf707ed90afe9c7 | |
parent | 90d8f4fca566e46171b260ee3aadc655871c92ba (diff) |
only delete cell content for CELLTYPE_NONE, fdo#88200
Change-Id: I43463b56cabfea4c9ee2b98445f7fb522221197d
-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 7eaf60c9e24c..f36f7fc4a60c 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -199,6 +199,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 8a69d12dafbe..8732926dd272 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, sc::StartListeningType rColumn.SetFormulaCell(nRow, mpFormula, eListenType); 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 44e35856dd21..8173e676e802 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); |