summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2017-04-04 22:50:56 -0400
committerJan Holesovsky <kendy@collabora.com>2017-04-05 12:29:30 +0000
commitf27f4dd900b50f15427f44f6d448e8e8e49ec2d5 (patch)
tree82dbefd1bf8cdec414109230c5a52984e2f712eb /sc
parent533a283eeda5d2751e49bbdadfdc673fcefb5e77 (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>
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 cfce9d6a4e50..82ef60773628 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 1fda6e22c81e..ba1af5e212a0 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 73da282cc1f2..55a2b36936f8 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -181,6 +181,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);