LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sc / inc / generalfunction.hxx
blob083fc57ca0327769aafc56092053d5c78a899fcc
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 #pragma once
21 #include <com/sun/star/sheet/GeneralFunction.hpp>
22 #include <com/sun/star/sheet/GeneralFunction2.hpp>
24 /**
25 * the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2, which causes some type-safety issues.
26 * So abstract them behind the facade of this enum.
28 enum class ScGeneralFunction
30 /** nothing is calculated.
32 NONE = int(css::sheet::GeneralFunction_NONE),
34 /** function is determined automatically.
36 <p>If the values are all numerical, SUM is used, otherwise COUNT.</p>
38 AUTO = int(css::sheet::GeneralFunction_AUTO),
40 /** sum of all numerical values is calculated.
42 SUM = int(css::sheet::GeneralFunction_SUM),
44 /** all values, including non-numerical values, are counted.
46 COUNT = int(css::sheet::GeneralFunction_COUNT),
48 /** average of all numerical values is calculated.
50 AVERAGE = int(css::sheet::GeneralFunction_AVERAGE),
52 /** maximum value of all numerical values is calculated.
54 MAX = int(css::sheet::GeneralFunction_MAX),
56 /** minimum value of all numerical values is calculated.
58 MIN = int(css::sheet::GeneralFunction_MIN),
60 /** product of all numerical values is calculated.
62 PRODUCT = int(css::sheet::GeneralFunction_PRODUCT),
64 /** numerical values are counted.
66 COUNTNUMS = int(css::sheet::GeneralFunction_COUNTNUMS),
68 /** standard deviation is calculated based on a sample.
70 STDEV = int(css::sheet::GeneralFunction_STDEV),
72 /** standard deviation is calculated based on the entire population.
74 STDEVP = int(css::sheet::GeneralFunction_STDEVP),
76 /** variance is calculated based on a sample.
78 VAR = int(css::sheet::GeneralFunction_VAR),
80 /** variance is calculated based on the entire population.
82 VARP = int(css::sheet::GeneralFunction_VARP),
84 /**
85 * median of all numerical values is calculated.
86 * @since LibreOffice 5.3
88 MEDIAN = css::sheet::GeneralFunction2::MEDIAN