summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-01-10 13:16:20 +0100
committerEike Rathke <erack@redhat.com>2015-01-12 16:18:56 +0000
commit4b6c9a6918238441f63222d4fc9e9db94bed6f0d (patch)
treec767c8027b3380e79a8a1da91b6549c3214142f7 /sc/source
parent9efcdb9ef5e7a45d48b07bd91f2fe000baaf5fd6 (diff)
only delete cell content for CELLTYPE_NONE, fdo#88200
Change-Id: I43463b56cabfea4c9ee2b98445f7fb522221197d Reviewed-on: https://gerrit.libreoffice.org/13842 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/cellvalue.cxx4
-rw-r--r--sc/source/core/data/column3.cxx13
2 files changed, 14 insertions, 3 deletions
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);