sc/source/filter/oox/pivottablebuffer.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 0a7b9ba8a49fe9f7ec9964864298f1994e81ff79 Author: Bogdan Buzea <buzea.bog...@libreoffice.org> AuthorDate: Thu Oct 31 21:22:46 2024 +0200 Commit: Eike Rathke <er...@redhat.com> CommitDate: Fri Dec 6 12:26:24 2024 +0100 tdf#163486: PVS: The 'eAggFunc' variable was assigned the same value V1048 The 'eAggFunc' variable was assigned the same value. Will be assigned after the switch. Change-Id: I21d4cb4b0e7427bea56598476ca176cc0a4f7124 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175902 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx index f128e27afd0e..b71652baadc2 100644 --- a/sc/source/filter/oox/pivottablebuffer.cxx +++ b/sc/source/filter/oox/pivottablebuffer.cxx @@ -608,7 +608,7 @@ void PivotTableField::convertDataField( const PTDataFieldModel& rDataField ) means 'count all', and 'countNum' means 'count numbers'. On the other hand, for subtotals, 'countA' means 'count all', and 'count' means 'count numbers' (see above). */ - GeneralFunction eAggFunc = GeneralFunction_SUM; + GeneralFunction eAggFunc; switch( rDataField.mnSubtotal ) { case XML_sum: eAggFunc = GeneralFunction_SUM; break; @@ -622,7 +622,10 @@ void PivotTableField::convertDataField( const PTDataFieldModel& rDataField ) case XML_stdDevp: eAggFunc = GeneralFunction_STDEVP; break; case XML_var: eAggFunc = GeneralFunction_VAR; break; case XML_varp: eAggFunc = GeneralFunction_VARP; break; - default: OSL_FAIL( "PivotTableField::convertDataField - unknown aggregation function" ); + default: + OSL_FAIL( "PivotTableField::convertDataField - unknown aggregation function" ); + eAggFunc = GeneralFunction_SUM; + break; } aPropSet.setProperty( PROP_Function, eAggFunc );