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#pragma once
11
12#include <sal/config.h>
13
14#include <string_view>
15
16#include <rtl/ustring.hxx>
17#include "scdllapi.h"
18#include "global.hxx"
19
21struct ScDPNumGroupInfo;
22enum class ScGeneralFunction;
23
25{
26public:
27 static bool isDuplicateDimension(std::u16string_view rName);
28
29 SC_DLLPUBLIC static OUString getSourceDimensionName(std::u16string_view rName);
30
35 sal_uInt8 static getDuplicateIndex(const OUString& rName);
36
37 SC_DLLPUBLIC static OUString createDuplicateDimensionName(const OUString& rOriginal, size_t nDupCount);
38
39 SC_DLLPUBLIC static OUString getDateGroupName(
40 sal_Int32 nDatePart, sal_Int32 nValue, SvNumberFormatter* pFormatter,
41 double fStart, double fEnd);
42
43 static double getNumGroupStartValue(double fValue, const ScDPNumGroupInfo& rInfo);
44
45 static OUString getNumGroupName(
46 double fValue, const ScDPNumGroupInfo& rInfo, sal_Unicode cDecSep,
47 SvNumberFormatter* pFormatter);
48
49 static sal_Int32 getDatePartValue(
50 double fValue, const ScDPNumGroupInfo* pInfo, sal_Int32 nDatePart,
51 const SvNumberFormatter* pFormatter);
52
53 SC_DLLPUBLIC static OUString getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc eFunc);
54
56};
57
58/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static sal_uInt8 getDuplicateIndex(const OUString &rName)
Get a duplicate index in case the dimension is a duplicate.
Definition: dputil.cxx:71
static SC_DLLPUBLIC OUString getDateGroupName(sal_Int32 nDatePart, sal_Int32 nValue, SvNumberFormatter *pFormatter, double fStart, double fEnd)
Definition: dputil.cxx:104
static SC_DLLPUBLIC OUString getSourceDimensionName(std::u16string_view rName)
Definition: dputil.cxx:66
static sal_Int32 getDatePartValue(double fValue, const ScDPNumGroupInfo *pInfo, sal_Int32 nDatePart, const SvNumberFormatter *pFormatter)
Definition: dputil.cxx:287
static bool isDuplicateDimension(std::u16string_view rName)
Definition: dputil.cxx:61
static OUString getNumGroupName(double fValue, const ScDPNumGroupInfo &rInfo, sal_Unicode cDecSep, SvNumberFormatter *pFormatter)
Definition: dputil.cxx:260
static SC_DLLPUBLIC ScSubTotalFunc toSubTotalFunc(ScGeneralFunction eGenFunc)
Definition: dputil.cxx:395
static SC_DLLPUBLIC OUString createDuplicateDimensionName(const OUString &rOriginal, size_t nDupCount)
Definition: dputil.cxx:92
static SC_DLLPUBLIC OUString getDisplayedMeasureName(const OUString &rName, ScSubTotalFunc eFunc)
Definition: dputil.cxx:384
static double getNumGroupStartValue(double fValue, const ScDPNumGroupInfo &rInfo)
Definition: dputil.cxx:153
sal_Int16 nValue
ScGeneralFunction
the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2,...
ScSubTotalFunc
Definition: global.hxx:860
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
unsigned char sal_uInt8
sal_uInt16 sal_Unicode