Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sc / inc / dputil.hxx
blobb2539a159bceefb011517af82445f896398047e4
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/.
8 */
10 #ifndef INCLUDED_SC_INC_DPUTIL_HXX
11 #define INCLUDED_SC_INC_DPUTIL_HXX
13 #include <rtl/ustring.hxx>
14 #include "scdllapi.h"
15 #include "global.hxx"
17 class SvNumberFormatter;
18 struct ScDPNumGroupInfo;
19 enum class ScGeneralFunction;
21 class ScDPUtil
23 public:
24 static bool isDuplicateDimension(const OUString& rName);
26 SC_DLLPUBLIC static OUString getSourceDimensionName(const OUString& rName);
28 /**
29 * Get a duplicate index in case the dimension is a duplicate. It returns
30 * 0 in case it's an original dimension.
32 sal_uInt8 static getDuplicateIndex(const OUString& rName);
34 SC_DLLPUBLIC static OUString createDuplicateDimensionName(const OUString& rOriginal, size_t nDupCount);
36 static OUString getDateGroupName(
37 sal_Int32 nDatePart, sal_Int32 nValue, SvNumberFormatter* pFormatter,
38 double fStart, double fEnd);
40 static double getNumGroupStartValue(double fValue, const ScDPNumGroupInfo& rInfo);
42 static OUString getNumGroupName(
43 double fValue, const ScDPNumGroupInfo& rInfo, sal_Unicode cDecSep,
44 SvNumberFormatter* pFormatter);
46 static sal_Int32 getDatePartValue(
47 double fValue, const ScDPNumGroupInfo* pInfo, sal_Int32 nDatePart,
48 const SvNumberFormatter* pFormatter);
50 static OUString getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc eFunc);
52 static ScSubTotalFunc toSubTotalFunc(ScGeneralFunction eGenFunc);
55 #endif
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */