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 f27f4dd900b50f15427f44f6d448e8e8e49ec2d5 Author: Henry Castro <hcas...@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 <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits