tdf#104816 sw: if non-section content, let all sections hide.
[LibreOffice.git] / sc / inc / generalfunction.hxx
blobfa0ae390d906c8226167e236199710c23898b6a5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SC_SHEET_GENERAL_FUNCTION_HXX
20 #define INCLUDED_SC_SHEET_GENERAL_FUNCTION_HXX
22 #include <com/sun/star/sheet/GeneralFunction.hpp>
23 #include <com/sun/star/sheet/GeneralFunction2.hpp>
25 /**
26 * the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2, which causes some type-safety issues.
27 * So abstract them behind the facade of this enum.
29 enum class ScGeneralFunction
31 /** nothing is calculated.
33 NONE = int(css::sheet::GeneralFunction_NONE),
36 /** function is determined automatically.
38 <p>If the values are all numerical, SUM is used, otherwise COUNT.</p>
40 AUTO = int(css::sheet::GeneralFunction_AUTO),
43 /** sum of all numerical values is calculated.
45 SUM = int(css::sheet::GeneralFunction_SUM),
48 /** all values, including non-numerical values, are counted.
50 COUNT = int(css::sheet::GeneralFunction_COUNT),
53 /** average of all numerical values is calculated.
55 AVERAGE = int(css::sheet::GeneralFunction_AVERAGE),
58 /** maximum value of all numerical values is calculated.
60 MAX = int(css::sheet::GeneralFunction_MAX),
63 /** minimum value of all numerical values is calculated.
65 MIN = int(css::sheet::GeneralFunction_MIN),
68 /** product of all numerical values is calculated.
70 PRODUCT = int(css::sheet::GeneralFunction_PRODUCT),
73 /** numerical values are counted.
75 COUNTNUMS = int(css::sheet::GeneralFunction_COUNTNUMS),
78 /** standard deviation is calculated based on a sample.
80 STDEV = int(css::sheet::GeneralFunction_STDEV),
83 /** standard deviation is calculated based on the entire population.
85 STDEVP = int(css::sheet::GeneralFunction_STDEVP),
88 /** variance is calculated based on a sample.
90 VAR = int(css::sheet::GeneralFunction_VAR),
93 /** variance is calculated based on the entire population.
95 VARP = int(css::sheet::GeneralFunction_VARP),
97 /**
98 * median of all numerical values is calculated.
99 * @since LibreOffice 5.3
101 MEDIAN = css::sheet::GeneralFunction2::MEDIAN
104 #endif