Kaydet (Commit) bc29aa9f authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1413006 Mixing enum types

Change-Id: I9dcaf17b75228ac409e88d9fddba717ba40c58ea
Reviewed-on: https://gerrit.libreoffice.org/39668Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8d80832a
...@@ -79,34 +79,32 @@ const char* toOOXMLAxisType( sheet::DataPilotFieldOrientation eOrient ) ...@@ -79,34 +79,32 @@ const char* toOOXMLAxisType( sheet::DataPilotFieldOrientation eOrient )
return ""; return "";
} }
const char* toOOXMLSubtotalType( sheet::GeneralFunction eFunc ) const char* toOOXMLSubtotalType(ScGeneralFunction eFunc)
{ {
switch (eFunc) switch (eFunc)
{ {
case sheet::GeneralFunction_SUM: case ScGeneralFunction::SUM:
return "sum"; return "sum";
case sheet::GeneralFunction_COUNT: case ScGeneralFunction::COUNT:
return "count"; return "count";
case sheet::GeneralFunction_AVERAGE: case ScGeneralFunction::AVERAGE:
return "average"; return "average";
case sheet::GeneralFunction_MAX: case ScGeneralFunction::MAX:
return "max"; return "max";
case sheet::GeneralFunction_MIN: case ScGeneralFunction::MIN:
return "min"; return "min";
case sheet::GeneralFunction_PRODUCT: case ScGeneralFunction::PRODUCT:
return "product"; return "product";
case sheet::GeneralFunction_COUNTNUMS: case ScGeneralFunction::COUNTNUMS:
return "countNums"; return "countNums";
case sheet::GeneralFunction_STDEV: case ScGeneralFunction::STDEV:
return "stdDev"; return "stdDev";
case sheet::GeneralFunction_STDEVP: case ScGeneralFunction::STDEVP:
return "stdDevp"; return "stdDevp";
case sheet::GeneralFunction_VAR: case ScGeneralFunction::VAR:
return "var"; return "var";
case sheet::GeneralFunction_VARP: case ScGeneralFunction::VARP:
return "varp"; return "varp";
case sheet::GeneralFunction_NONE:
case sheet::GeneralFunction_AUTO:
default: default:
; ;
} }
...@@ -800,7 +798,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP ...@@ -800,7 +798,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
rStrm.WriteAttributes(XML_fld, OString::number(nDimIdx).getStr(), FSEND); 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); const char* pSubtotal = toOOXMLSubtotalType(eFunc);
if (pSubtotal) if (pSubtotal)
rStrm.WriteAttributes(XML_subtotal, pSubtotal, FSEND); rStrm.WriteAttributes(XML_subtotal, pSubtotal, FSEND);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment