[Libreoffice-commits] core.git: sc/inc sc/source
Henry Castro
hcastro at collabora.com
Wed Apr 5 15:43:35 UTC 2017
sc/inc/column.hxx | 1 +
sc/source/core/data/column2.cxx | 7 ++++++-
sc/source/core/data/column3.cxx | 1 +
3 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 731146fc6d66497a51616f195c110092a90f01f5
Author: Henry Castro <hcastro at collabora.com>
Date: Tue Apr 4 22:50:56 2017 -0400
lok: notify cell note removes before erasing storage
Change-Id: I6181b27b6a969d94789c42ea0914b17328c5c8d5
Reviewed-on: https://gerrit.libreoffice.org/36109
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit f27f4dd900b50f15427f44f6d448e8e8e49ec2d5)
Reviewed-on: https://gerrit.libreoffice.org/36143
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index ae911e688c88..e7a81e877f13 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -699,6 +699,7 @@ private:
* Call this only from those methods where maCells is modified directly.
*/
void CellStorageModified();
+ void CellNotesDeleting(SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership );
void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol) const;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 4dbac3f1f19b..c6f911f6de0f 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1902,11 +1902,16 @@ namespace {
};
} // anonymous namespace
-void ScColumn::DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership )
+void ScColumn::CellNotesDeleting(SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership)
{
ScAddress aAddr(nCol, 0, nTab);
CellNoteHandler aFunc(pDocument, aAddr, bForgetCaptionOwnership);
sc::ParseNote(maCellNotes.begin(), maCellNotes, nRow1, nRow2, aFunc);
+}
+
+void ScColumn::DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership )
+{
+ CellNotesDeleting(nRow1, nRow2, bForgetCaptionOwnership);
rBlockPos.miCellNotePos =
maCellNotes.set_empty(rBlockPos.miCellNotePos, nRow1, nRow2);
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index a864f66958e9..c0a6e2923d38 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -179,6 +179,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize, std::vector<ScAddress>*
maBroadcasters.erase(nStartRow, nEndRow);
maBroadcasters.resize(MAXROWCOUNT);
+ CellNotesDeleting(nStartRow, nEndRow, false);
maCellNotes.erase(nStartRow, nEndRow);
maCellNotes.resize(MAXROWCOUNT);
More information about the Libreoffice-commits
mailing list