sc/source/filter/excel/xepivotxml.cxx |   28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

New commits:
commit bc29aa9f4ceaa6060c7290607c65cf0cb6276ea8
Author: Caolán McNamara <caol...@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 <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to