summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-16 13:47:31 +0100
committerAndras Timar <andras.timar@collabora.com>2022-06-24 13:42:27 +0200
commit9a3c00486abd9389de9fb32d2c115de656289763 (patch)
treeb1cde36b940627f3cc5ea184d593f4ef94c8f484 /sc/source
parent8efc97459576dccc253505bfbbdd667b187b14b2 (diff)
tdf#149529 crash on deref deleted ScDocument*
maybe a problem since commit 46419cd7a2d453c6f252c28dfb9dbfb08605e1c4 Date: Tue Jun 18 15:11:30 2013 -0400 ScFormulaCell is no longer a child class of ScBaseCell. Change-Id: Id33072f193045e2eaf51373b47dac803f9a5d52c presumably the cloned ScColorScaleEntry should end up with a ScFormulaCell for the destination document and not the source one Change-Id: I451d5827be183198b61116ab8c582cfda03b2031 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135998 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 10404751bcb643605c50d530e3855ae005e60a5e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135992
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/colorscale.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 52c7c6b55788..74b80ef2ecf3 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -191,7 +191,7 @@ ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry&
setListener();
if(rEntry.mpCell)
{
- mpCell.reset(new ScFormulaCell(*rEntry.mpCell, rEntry.mpCell->GetDocument(), rEntry.mpCell->aPos, ScCloneFlags::NoMakeAbsExternal));
+ mpCell.reset(new ScFormulaCell(*rEntry.mpCell, *pDoc, rEntry.mpCell->aPos, ScCloneFlags::NoMakeAbsExternal));
mpCell->StartListeningTo( *pDoc );
mpListener.reset(new ScFormulaListener(mpCell.get()));
if (mpFormat)