fix crash in ScColorScaleEntry's c'tor
Change-Id: I1cf60db16e5e6c82589b6b315680a6dff1761815
This commit is contained in:
parent
63bfed7bce
commit
596e40f9a2
1 changed files with 6 additions and 2 deletions
|
@ -43,7 +43,7 @@ ScColorScaleEntry::ScColorScaleEntry(double nVal, const Color& rCol):
|
|||
ScColorScaleEntry::ScColorScaleEntry(const ScColorScaleEntry& rEntry):
|
||||
mnVal(rEntry.mnVal),
|
||||
maColor(rEntry.maColor),
|
||||
mpCell(NULL),
|
||||
mpCell(),
|
||||
mbMin(rEntry.mbMin),
|
||||
mbMax(rEntry.mbMax),
|
||||
mbPercent(rEntry.mbPercent)
|
||||
|
@ -53,11 +53,15 @@ ScColorScaleEntry::ScColorScaleEntry(const ScColorScaleEntry& rEntry):
|
|||
ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& rEntry):
|
||||
mnVal(rEntry.mnVal),
|
||||
maColor(rEntry.maColor),
|
||||
mpCell(static_cast<ScFormulaCell*>(rEntry.mpCell->Clone(*pDoc))),
|
||||
mpCell(),
|
||||
mbMin(rEntry.mbMin),
|
||||
mbMax(rEntry.mbMax),
|
||||
mbPercent(rEntry.mbPercent)
|
||||
{
|
||||
if(rEntry.mpCell)
|
||||
{
|
||||
mpCell.reset(static_cast<ScFormulaCell*>(rEntry.mpCell->Clone(*pDoc)));
|
||||
}
|
||||
}
|
||||
|
||||
ScColorScaleEntry::~ScColorScaleEntry()
|
||||
|
|
Loading…
Reference in a new issue