diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-02 09:41:07 +0000 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-12-02 13:12:34 +0000 |
commit | 14a5070149b84b804cf646780abf5962fa2dd401 (patch) | |
tree | 494320450d19222f6cbd27b4da74056f72332937 /sc | |
parent | 9c218858f1bd83ffdd72dd943a841cffa5a93b8c (diff) |
coverity#1394668 Inferred misuse of enum
just keep the current logic and silence coverity about it
Change-Id: I397632eab8ce983e362380b83bbf78c1fbf8e038
Reviewed-on: https://gerrit.libreoffice.org/31535
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/global.hxx | 11 | ||||
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 22 |
2 files changed, 22 insertions, 11 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 429a867709df..5c1bc6a01660 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -857,6 +857,17 @@ enum ScSubTotalFunc enum ScAggregateFunc { + AGGREGATE_FUNC_AVE = 1, + AGGREGATE_FUNC_CNT = 2, + AGGREGATE_FUNC_CNT2 = 3, + AGGREGATE_FUNC_MAX = 4, + AGGREGATE_FUNC_MIN = 5, + AGGREGATE_FUNC_PROD = 6, + AGGREGATE_FUNC_STD = 7, + AGGREGATE_FUNC_STDP = 8, + AGGREGATE_FUNC_SUM = 9, + AGGREGATE_FUNC_VAR = 10, + AGGREGATE_FUNC_VARP = 11, AGGREGATE_FUNC_MEDIAN = 12, AGGREGATE_FUNC_MODSNGL = 13, AGGREGATE_FUNC_LARGE = 14, diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 9a02b624df22..a91e00069e34 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -6755,17 +6755,17 @@ void ScInterpreter::ScAggregate() cPar = nParamCount - 2; switch ( nFunc ) { - case SUBTOTAL_FUNC_AVE : ScAverage(); break; - case SUBTOTAL_FUNC_CNT : ScCount(); break; - case SUBTOTAL_FUNC_CNT2 : ScCount2(); break; - case SUBTOTAL_FUNC_MAX : ScMax(); break; - case SUBTOTAL_FUNC_MIN : ScMin(); break; - case SUBTOTAL_FUNC_PROD : ScProduct(); break; - case SUBTOTAL_FUNC_STD : ScStDev(); break; - case SUBTOTAL_FUNC_STDP : ScStDevP(); break; - case SUBTOTAL_FUNC_SUM : ScSum(); break; - case SUBTOTAL_FUNC_VAR : ScVar(); break; - case SUBTOTAL_FUNC_VARP : ScVarP(); break; + case AGGREGATE_FUNC_AVE : ScAverage(); break; + case AGGREGATE_FUNC_CNT : ScCount(); break; + case AGGREGATE_FUNC_CNT2 : ScCount2(); break; + case AGGREGATE_FUNC_MAX : ScMax(); break; + case AGGREGATE_FUNC_MIN : ScMin(); break; + case AGGREGATE_FUNC_PROD : ScProduct(); break; + case AGGREGATE_FUNC_STD : ScStDev(); break; + case AGGREGATE_FUNC_STDP : ScStDevP(); break; + case AGGREGATE_FUNC_SUM : ScSum(); break; + case AGGREGATE_FUNC_VAR : ScVar(); break; + case AGGREGATE_FUNC_VARP : ScVarP(); break; case AGGREGATE_FUNC_MEDIAN : ScMedian(); break; case AGGREGATE_FUNC_MODSNGL : ScModalValue(); break; case AGGREGATE_FUNC_LARGE : ScLarge(); break; |