From 468edb6ac0cdc145a5b2a43339e5086b9f158b0e Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 15 Dec 2012 17:12:04 +0100 Subject: don't overwrite data bar data if already set, fdo#58336 Change-Id: Ied2d9a80ec96d25a1479c03ac4e925c3be9ac8d1 --- sc/source/ui/condformat/condformatdlgentry.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'sc/source/ui/condformat') diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 3c27da6e70ac..78ff04fd60af 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1076,12 +1076,15 @@ void ScDataBarFrmtEntry::Init() maBtOptions.SetClickHdl( LINK( this, ScDataBarFrmtEntry, OptionBtnHdl ) ); - mpDataBarData.reset(new ScDataBarFormatData()); - mpDataBarData->mpUpperLimit.reset(new ScColorScaleEntry()); - mpDataBarData->mpLowerLimit.reset(new ScColorScaleEntry()); - mpDataBarData->mpLowerLimit->SetType(COLORSCALE_AUTO); - mpDataBarData->mpUpperLimit->SetType(COLORSCALE_AUTO); - mpDataBarData->maPositiveColor = COL_LIGHTBLUE; + if(!mpDataBarData) + { + mpDataBarData.reset(new ScDataBarFormatData()); + mpDataBarData->mpUpperLimit.reset(new ScColorScaleEntry()); + mpDataBarData->mpLowerLimit.reset(new ScColorScaleEntry()); + mpDataBarData->mpLowerLimit->SetType(COLORSCALE_AUTO); + mpDataBarData->mpUpperLimit->SetType(COLORSCALE_AUTO); + mpDataBarData->maPositiveColor = COL_LIGHTBLUE; + } } ScFormatEntry* ScDataBarFrmtEntry::createDatabarEntry() const -- cgit