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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef __com_sun_star_sheet_DataPilotSourceDimension_idl__
21#define __com_sun_star_sheet_DataPilotSourceDimension_idl__
22
23#include <com/sun/star/container/XNamed.idl>
24#include <com/sun/star/sheet/XHierarchiesSupplier.idl>
25#include <com/sun/star/util/XCloneable.idl>
26#include <com/sun/star/beans/XPropertySet.idl>
27#include <com/sun/star/sheet/DataPilotFieldOrientation.idl>
28#include <com/sun/star/sheet/GeneralFunction.idl>
29#include <com/sun/star/sheet/TableFilterField.idl>
30
31
32 module com {  module sun {  module star {  module sheet {
33
34
35/** represents a dimension in a data pilot source.
36
37    <p>A dimension is equivalent to a column of a cell range in a spreadsheet
38    used for a data pilot field.</p>
39
40    <p>In more complex data sources, a dimension may contain several
41    hierarchies, which consolidate items of a complex data type, called
42    levels.</p>
43
44    <p>Example: In a database, a column contains date values. This column
45    will be a dimension of the data pilot source. One hierarchy may contain
46    the 3 levels year, month, day. Another hierarchy may contain the 2 levels
47    year and week number.</p>
48
49    @see com::sun::star::sheet::DataPilotSource
50    @see com::sun::star::sheet::DataPilotTable
51 */
52service DataPilotSourceDimension
53{
54
55    /** provides access to the name of the dimension, i.e. used in
56        collections.
57     */
58    interface com::sun::star::container::XNamed;
59
60
61    /** provides access to the collection of hierarchies of this dimension.
62     */
63    interface com::sun::star::sheet::XHierarchiesSupplier;
64
65
66    /** supports duplicating the dimension.
67
68        <p>A dimension may be used several times in a data pilot table,
69        i.e. as row field and data field.</p>
70     */
71    interface com::sun::star::util::XCloneable;
72
73
74//!published service PropertySet
75    /** provides access to the properties.
76     */
77    interface com::sun::star::beans::XPropertySet;
78
79
80    /** returns the name of the dimension from which this dimension was
81        cloned, or `NULL` if it was not cloned.
82     */
83    [readonly, property] com::sun::star::container::XNamed Original;
84
85
86    /** contains `TRUE` if this is the dimension used to layout the
87        different data dimensions.
88     */
89    [readonly, property] boolean IsDataLayoutDimension;
90
91
92    /** specifies where the dimension is used.
93     */
94    [property] com::sun::star::sheet::DataPilotFieldOrientation Orientation;
95
96
97    /** specifies the position of the dimension within its orientation.
98     */
99    [property] long Position;
100
101
102    /** specifies how data are aggregated.
103     */
104    [property] com::sun::star::sheet::GeneralFunction Function;
105
106
107    /** specifies which hierarchy of the dimension is used.
108
109        @see com::sun::star::sheet::DataPilotSourceHierarchies
110     */
111    [property] long UsedHierarchy;
112
113
114    /** specifies which values are used.
115     */
116    [property] sequence< com::sun::star::sheet::TableFilterField > Filter;
117
118
119    /** contains flags that control the usage of the dimension.
120
121        @see com::sun::star::sheet::DimensionFlags
122     */
123    [readonly, property, optional] long Flags;
124
125
126    /** specifies how data are aggregated.
127        @since LibreOffice 5.3
128     */
129    [property, optional] short Function2;
130
131};
132
133
134}; }; }; };
135
136#endif
137
138/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
139