LibreOffice Module sc (master)  1
dputil.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  */
9 
10 #ifndef INCLUDED_SC_INC_DPUTIL_HXX
11 #define INCLUDED_SC_INC_DPUTIL_HXX
12 
13 #include <rtl/ustring.hxx>
14 #include "scdllapi.h"
15 #include "global.hxx"
16 
17 class SvNumberFormatter;
18 struct ScDPNumGroupInfo;
19 enum class ScGeneralFunction;
20 
21 class ScDPUtil
22 {
23 public:
24  static bool isDuplicateDimension(const OUString& rName);
25 
26  SC_DLLPUBLIC static OUString getSourceDimensionName(const OUString& rName);
27 
32  sal_uInt8 static getDuplicateIndex(const OUString& rName);
33 
34  SC_DLLPUBLIC static OUString createDuplicateDimensionName(const OUString& rOriginal, size_t nDupCount);
35 
36  SC_DLLPUBLIC static OUString getDateGroupName(
37  sal_Int32 nDatePart, sal_Int32 nValue, SvNumberFormatter* pFormatter,
38  double fStart, double fEnd);
39 
40  static double getNumGroupStartValue(double fValue, const ScDPNumGroupInfo& rInfo);
41 
42  static OUString getNumGroupName(
43  double fValue, const ScDPNumGroupInfo& rInfo, sal_Unicode cDecSep,
44  SvNumberFormatter* pFormatter);
45 
46  static sal_Int32 getDatePartValue(
47  double fValue, const ScDPNumGroupInfo* pInfo, sal_Int32 nDatePart,
48  const SvNumberFormatter* pFormatter);
49 
50  SC_DLLPUBLIC static OUString getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc eFunc);
51 
53 };
54 
55 #endif
56 
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static SC_DLLPUBLIC OUString createDuplicateDimensionName(const OUString &rOriginal, size_t nDupCount)
Definition: dputil.cxx:90
static OUString getNumGroupName(double fValue, const ScDPNumGroupInfo &rInfo, sal_Unicode cDecSep, SvNumberFormatter *pFormatter)
Definition: dputil.cxx:266
sal_uInt16 sal_Unicode
static SC_DLLPUBLIC OUString getDateGroupName(sal_Int32 nDatePart, sal_Int32 nValue, SvNumberFormatter *pFormatter, double fStart, double fEnd)
Definition: dputil.cxx:102
static double getNumGroupStartValue(double fValue, const ScDPNumGroupInfo &rInfo)
Definition: dputil.cxx:153
static SC_DLLPUBLIC OUString getSourceDimensionName(const OUString &rName)
Definition: dputil.cxx:64
static bool isDuplicateDimension(const OUString &rName)
Definition: dputil.cxx:59
static sal_uInt8 getDuplicateIndex(const OUString &rName)
Get a duplicate index in case the dimension is a duplicate.
Definition: dputil.cxx:69
unsigned char sal_uInt8
ScGeneralFunction
the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2, which causes some type-safety issues.
static sal_Int32 getDatePartValue(double fValue, const ScDPNumGroupInfo *pInfo, sal_Int32 nDatePart, const SvNumberFormatter *pFormatter)
Definition: dputil.cxx:293
static SC_DLLPUBLIC OUString getDisplayedMeasureName(const OUString &rName, ScSubTotalFunc eFunc)
Definition: dputil.cxx:390
ScSubTotalFunc
Definition: global.hxx:846
#define SC_DLLPUBLIC
Definition: scdllapi.h:28
static SC_DLLPUBLIC ScSubTotalFunc toSubTotalFunc(ScGeneralFunction eGenFunc)
Definition: dputil.cxx:405
sal_Int16 nValue