From 189bfa9c9946fde2f8bc791aad501f72ca45db5b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 22 Feb 2017 21:05:27 +0100 Subject: All ScAxisPosition values that meAxisPosition can take on are covered ...so all of pInfo's members are initialized, so no need to first zero- initialize it Change-Id: I9cc7a0cc038aec59dca4121d16164843483737fc --- sc/source/core/data/colorscale.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sc') diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index dbce784686f4..d29e25f3dfce 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -20,6 +20,7 @@ #include #include +#include ScFormulaListener::ScFormulaListener(ScFormulaCell* pCell): mbDirty(false), @@ -770,7 +771,7 @@ ScDataBarInfo* ScDataBarFormat::GetDataBarInfo(const ScAddress& rAddr) const double nValue = rCell.getValue(); - ScDataBarInfo* pInfo = new ScDataBarInfo(); + ScDataBarInfo* pInfo = new ScDataBarInfo; if(mpFormatData->meAxisPosition == databar::NONE) { if(nValue <= nMin) @@ -849,6 +850,8 @@ ScDataBarInfo* ScDataBarFormat::GetDataBarInfo(const ScAddress& rAddr) const pInfo->mnLength = nMaxLength * (std::max(nValue, nMin)/nAbsMax); } } + else + assert(false); // set color if(mpFormatData->mbNeg && nValue < 0) -- cgit