diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-06-13 10:09:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-15 13:34:14 +0200 |
commit | 4ea281a3ccb5bd21e1808d8cb127a91a1bb72691 (patch) | |
tree | 183a2ab634d770b7ef777323fa6851fc38e14011 /chart2 | |
parent | 943f4b4ff1c524c514584c459b899ba3e9dfb71f (diff) |
cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 3 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/res_ErrorBar.cxx | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 7082077c4097..9d3d891c3b1d 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -765,7 +765,6 @@ void Chart2ImportTest::testNumberFormatsXLSX() chart2::DataPointLabel aLabel; sal_Int32 nNumberFormat; bool bLinkNumberFormatToSource = false; - bool bSuccess = false; const sal_Int32 nChartDataNumberFormat = getNumberFormat( xChartDoc, "_(\"$\"* #,##0_);_(\"$\"* \\(#,##0\\);_(\"$\"* \"-\"??_);_(@_)"); @@ -775,7 +774,7 @@ void Chart2ImportTest::testNumberFormatsXLSX() CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); xPropertySet->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nNumberFormat; CPPUNIT_ASSERT_EQUAL(nChartDataNumberFormat, nNumberFormat); - bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; + bool bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; CPPUNIT_ASSERT_EQUAL(false, bSuccess); bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index a49be4491672..44377b08f22a 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -492,11 +492,10 @@ IMPL_LINK( ErrorBarResources, RangeChanged, Edit *, pEdit ) void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - SfxItemState aState = SfxItemState::UNKNOWN; // category - m_eErrorKind = CHERROR_NONE; - aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, true, &pPoolItem ); + m_eErrorKind = CHERROR_NONE; + SfxItemState aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, true, &pPoolItem ); m_bErrorKindUnique = ( aState != SfxItemState::DONTCARE ); if( aState == SfxItemState::SET ) |