summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2017-04-04 22:50:56 -0400
committerHenry Castro <hcastro@collabora.com>2017-04-05 15:43:04 +0000
commit731146fc6d66497a51616f195c110092a90f01f5 (patch)
tree951623ec047a24a060206f21cfdfe2c649b37b06 /sc
parent25eb0899227830cca7f28006376962d84f8e9c7a (diff)
lok: notify cell note removes before erasing storage
Change-Id: I6181b27b6a969d94789c42ea0914b17328c5c8d5 Reviewed-on: https://gerrit.libreoffice.org/36109 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit f27f4dd900b50f15427f44f6d448e8e8e49ec2d5) Reviewed-on: https://gerrit.libreoffice.org/36143 Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/column.hxx1
-rw-r--r--sc/source/core/data/column2.cxx7
-rw-r--r--sc/source/core/data/column3.cxx1
3 files changed, 8 insertions, 1 deletions
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);