summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen2.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-01-18 22:49:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-01-25 12:48:38 +0000
commit6c6528828c5ca1da6a1ccc98d1aa5b42d84152a4 (patch)
treee6b7fcc9a114da17a952c56e561739728f53943f /sc/source/core/data/documen2.cxx
parent033b47dd2ace4d43bf0be1a6983717adf044b0c2 (diff)
tdf#104967 preserve isolated notes data in clipboard when closing document
Change-Id: I0e263583e27c5103c0bb90e8fe00562e46a52d98 (cherry picked from commit b8b657123cc508c906622d20669507628c93e104) Reviewed-on: https://gerrit.libreoffice.org/33289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core/data/documen2.cxx')
-rw-r--r--sc/source/core/data/documen2.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index f884bcdd0b0e..7a41f14c01c2 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -379,13 +379,11 @@ ScDocument::~ScDocument()
// copied from this document, forget it as it references this
// document's drawing layer pages and what not, which otherwise when
// pasting to another document after this document was destructed would
- // attempt to access non-existing data.
- /* XXX this is only a workaround to prevent a crash, the actual note
- * content is lost, only a standard empty note caption will be pasted.
- * TODO: come up with a solution. */
+ // attempt to access non-existing data. Preserve the text data though.
ScDocument* pClipDoc = ScModule::GetClipDoc();
if (pClipDoc)
- pClipDoc->ForgetNoteCaptions( ScRangeList( ScRange( 0,0,0, MAXCOL, MAXROW, pClipDoc->GetTableCount()-1)));
+ pClipDoc->ForgetNoteCaptions(
+ ScRangeList( ScRange( 0,0,0, MAXCOL, MAXROW, pClipDoc->GetTableCount()-1)), true);
}
mxFormulaParserPool.reset();