diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-22 06:58:02 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-22 07:09:24 +0100 |
commit | b22b7d0c675304c3c7e6b49e7e10563a2dc737c5 (patch) | |
tree | d08626979c574a0f4e10266f2e6ab964436384e0 /sc/source | |
parent | 9263095cf6beb43b46a4feda359d84c66fdfd811 (diff) |
we need to copy the formula cell as well
Change-Id: If73ca17414a1aac1ce9efe5a56b0b1f499014fa0
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/colorscale.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index e4183e74a332..16a8575d023e 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -59,6 +59,11 @@ ScColorScaleEntry::ScColorScaleEntry(const ScColorScaleEntry& rEntry): mpCell(), meType(rEntry.meType) { + if(rEntry.mpCell) + { + mpCell.reset(static_cast<ScFormulaCell*>(rEntry.mpCell->Clone(*rEntry.mpCell->GetDocument(), SC_CLONECELL_NOMAKEABS_EXTERNAL))); + mpCell->StartListeningTo( mpCell->GetDocument() ); + } } ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& rEntry): @@ -76,6 +81,8 @@ ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& ScColorScaleEntry::~ScColorScaleEntry() { + if(mpCell) + mpCell->EndListeningTo(mpCell->GetDocument()); } void ScColorScaleEntry::SetFormula( const rtl::OUString& rFormula, ScDocument* pDoc, const ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar ) |