summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-10-04 14:47:03 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-10-04 15:08:14 -0500
commit873f0e07087f80dac2f4a09633ccc3be72640dfd (patch)
tree871bb447f671c7b8638a9141662cde61c0ee2961 /sc
parent35f66cb2f2fb4316e52fa579c3629071088b3f40 (diff)
coverity#1242368: Unchecked return value
Change-Id: I6aaad60cf08349aee6c07621764a1a6c071ad2b6
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 5f92b615280c..ce1db4df3411 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -674,10 +674,6 @@ void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType,
void SetColorScaleEntry( ScColorScaleEntry* pEntry, const ListBox& rType, const Edit& rValue, ScDocument* pDoc, const ScAddress& rPos, bool bDataBar )
{
- sal_uInt32 nIndex = 0;
- double nVal = 0;
- SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable();
- pNumberFormatter->IsNumberFormat(rValue.GetText(), nIndex, nVal);
// color scale does not have the automatic entry
sal_Int32 nPos = rType.GetSelectEntryPos();
@@ -694,7 +690,13 @@ void SetColorScaleEntry( ScColorScaleEntry* pEntry, const ListBox& rType, const
case COLORSCALE_PERCENTILE:
case COLORSCALE_VALUE:
case COLORSCALE_PERCENT:
- pEntry->SetValue(nVal);
+ {
+ sal_uInt32 nIndex = 0;
+ double nVal = 0;
+ SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable();
+ (void)pNumberFormatter->IsNumberFormat(rValue.GetText(), nIndex, nVal);
+ pEntry->SetValue(nVal);
+ }
break;
case COLORSCALE_FORMULA:
pEntry->SetFormula(rValue.GetText(), pDoc, rPos);