diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-22 21:05:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-23 08:49:28 +0100 |
commit | 189bfa9c9946fde2f8bc791aad501f72ca45db5b (patch) | |
tree | 24d62fd1408adcff5de9ae63dd6fc4821ed93a4f /sc | |
parent | 6776fdc63bd4407ebec9267fb492cba9c1a40af2 (diff) |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/colorscale.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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 <o3tl/make_unique.hxx> #include <algorithm> +#include <cassert> 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) |