diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-06 21:38:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-07 09:41:19 +0200 |
commit | bc29aa9f4ceaa6060c7290607c65cf0cb6276ea8 (patch) | |
tree | 5f2ca418536b8a2af0e919126edab78e61e3995e | |
parent | 8d80832a91520ae43f420f244bba278ead7689bc (diff) |
coverity#1413006 Mixing enum types
Change-Id: I9dcaf17b75228ac409e88d9fddba717ba40c58ea
Reviewed-on: https://gerrit.libreoffice.org/39668
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/filter/excel/xepivotxml.cxx | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index a8ce9f886588..2cd292d9ec6a 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -79,34 +79,32 @@ const char* toOOXMLAxisType( sheet::DataPilotFieldOrientation eOrient ) return ""; } -const char* toOOXMLSubtotalType( sheet::GeneralFunction eFunc ) +const char* toOOXMLSubtotalType(ScGeneralFunction eFunc) { switch (eFunc) { - case sheet::GeneralFunction_SUM: + case ScGeneralFunction::SUM: return "sum"; - case sheet::GeneralFunction_COUNT: + case ScGeneralFunction::COUNT: return "count"; - case sheet::GeneralFunction_AVERAGE: + case ScGeneralFunction::AVERAGE: return "average"; - case sheet::GeneralFunction_MAX: + case ScGeneralFunction::MAX: return "max"; - case sheet::GeneralFunction_MIN: + case ScGeneralFunction::MIN: return "min"; - case sheet::GeneralFunction_PRODUCT: + case ScGeneralFunction::PRODUCT: return "product"; - case sheet::GeneralFunction_COUNTNUMS: + case ScGeneralFunction::COUNTNUMS: return "countNums"; - case sheet::GeneralFunction_STDEV: + case ScGeneralFunction::STDEV: return "stdDev"; - case sheet::GeneralFunction_STDEVP: + case ScGeneralFunction::STDEVP: return "stdDevp"; - case sheet::GeneralFunction_VAR: + case ScGeneralFunction::VAR: return "var"; - case sheet::GeneralFunction_VARP: + case ScGeneralFunction::VARP: return "varp"; - case sheet::GeneralFunction_NONE: - case sheet::GeneralFunction_AUTO: default: ; } @@ -800,7 +798,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP rStrm.WriteAttributes(XML_fld, OString::number(nDimIdx).getStr(), FSEND); - sheet::GeneralFunction eFunc = static_cast<sheet::GeneralFunction>(rDim.GetFunction()); + ScGeneralFunction eFunc = rDim.GetFunction(); const char* pSubtotal = toOOXMLSubtotalType(eFunc); if (pSubtotal) rStrm.WriteAttributes(XML_subtotal, pSubtotal, FSEND); |