summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-15 17:12:04 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-12-15 17:14:45 +0100
commit468edb6ac0cdc145a5b2a43339e5086b9f158b0e (patch)
tree6a24f21ca5b8dc8b0d773da10af0cbb26f8b54ef
parent41652990f29a775ddce784237c8b1044bf723d9d (diff)
don't overwrite data bar data if already set, fdo#58336
Change-Id: Ied2d9a80ec96d25a1479c03ac4e925c3be9ac8d1
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx15
1 files changed, 9 insertions, 6 deletions
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