[Libreoffice-commits] core.git: Branch 'libreoffice-4-4-0' - sc/inc sc/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Tue Jan 13 06:48:23 PST 2015
sc/inc/column.hxx | 1 +
sc/source/core/data/cellvalue.cxx | 4 ++--
sc/source/core/data/column3.cxx | 13 ++++++++++++-
3 files changed, 15 insertions(+), 3 deletions(-)
New commits:
commit cdffabbcb8458b65de9c740216cd0681247739c3
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Sat Jan 10 13:16:20 2015 +0100
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 at gmail.com>
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 4b6c9a6918238441f63222d4fc9e9db94bed6f0d)
Reviewed-on: https://gerrit.libreoffice.org/13886
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 9e66f8f..2644bf3 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -189,6 +189,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 8a69d12..8732926 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 44e3585..8173e67 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);
More information about the Libreoffice-commits
mailing list