[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Fri Jul 7 07:41:51 UTC 2017
sc/source/filter/excel/xepivotxml.cxx | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
New commits:
commit bc29aa9f4ceaa6060c7290607c65cf0cb6276ea8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 6 21:38:40 2017 +0100
coverity#1413006 Mixing enum types
Change-Id: I9dcaf17b75228ac409e88d9fddba717ba40c58ea
Reviewed-on: https://gerrit.libreoffice.org/39668
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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);
More information about the Libreoffice-commits
mailing list