1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SC_INC_DPUTIL_HXX
11 #define INCLUDED_SC_INC_DPUTIL_HXX
13 #include <rtl/ustring.hxx>
17 #include <com/sun/star/sheet/GeneralFunction.hpp>
19 class SvNumberFormatter
;
20 struct ScDPNumGroupInfo
;
21 enum class ScGeneralFunction
;
26 static bool isDuplicateDimension(const OUString
& rName
);
28 SC_DLLPUBLIC
static OUString
getSourceDimensionName(const OUString
& rName
);
31 * Get a duplicate index in case the dimension is a duplicate. It returns
32 * 0 in case it's an original dimension.
34 sal_uInt8
static getDuplicateIndex(const OUString
& rName
);
36 SC_DLLPUBLIC
static OUString
createDuplicateDimensionName(const OUString
& rOriginal
, size_t nDupCount
);
38 static OUString
getDateGroupName(
39 sal_Int32 nDatePart
, sal_Int32 nValue
, SvNumberFormatter
* pFormatter
,
40 double fStart
, double fEnd
);
42 static double getNumGroupStartValue(double fValue
, const ScDPNumGroupInfo
& rInfo
);
44 static OUString
getNumGroupName(
45 double fValue
, const ScDPNumGroupInfo
& rInfo
, sal_Unicode cDecSep
,
46 SvNumberFormatter
* pFormatter
);
48 static sal_Int32
getDatePartValue(
49 double fValue
, const ScDPNumGroupInfo
* pInfo
, sal_Int32 nDatePart
,
50 const SvNumberFormatter
* pFormatter
);
52 static OUString
getDisplayedMeasureName(const OUString
& rName
, ScSubTotalFunc eFunc
);
54 static ScSubTotalFunc
toSubTotalFunc(ScGeneralFunction eGenFunc
);
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */