1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef com_sun_star_chart2_XDataInterpreter_idl
24#define com_sun_star_chart2_XDataInterpreter_idl
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29#ifndef __com_sun_star_beans_PropertyValue_idl__
30#include <com/sun/star/beans/PropertyValue.idl>
31#endif
32
33#include <com/sun/star/chart2/InterpretedData.idl>
34#include <com/sun/star/chart2/data/XDataSource.idl>
35#include <com/sun/star/chart2/XDataSeries.idl>
36
37module com
38{
39module sun
40{
41module star
42{
43module chart2
44{
45
46/** offers tooling to interpret different data sources in a structural
47    and chart-type-dependent way.
48 */
49interface XDataInterpreter  : ::com::sun::star::uno::XInterface
50{
51    /** Interprets the given data.
52
53        @param aArguments
54            Arguments that tell the template how to slice the given
55            range.  The properties should be defined in a separate
56            service.
57
58            <p>For standard parameters that may be used, see the
59            service <type>StandardDiagramCreationParameters</type>.
60            </p>
61
62        @param aSeriesToReUse
63            use all the data series given here for the result before
64            creating new ones.
65     */
66    InterpretedData interpretDataSource(
67        [in] data::XDataSource xSource,
68        [in] sequence< com::sun::star::beans::PropertyValue > aArguments,
69        [in] sequence< XDataSeries > aSeriesToReUse );
70
71    /** Re-interprets the data given in <code>aInterpretedData</code>
72        while keeping the number of data series and the categories.
73     */
74    InterpretedData reinterpretDataSeries( [in] InterpretedData aInterpretedData );
75
76    /** parses the given data and states, if a
77        <member>reinterpretDataSeries</member> call can be done
78        without data loss.
79
80        @return
81            <TRUE/>, if the data given in
82            <code>aInterpretedData</code> has a similar structure than
83            the one required is used as output of the data interpreter.
84     */
85    boolean isDataCompatible( [in] InterpretedData aInterpretedData );
86
87    /** Try to reverse the operation done in
88        <member>interpretDataSource</member>.
89
90        <p>In case <code>aInterpretedData</code> is the result of
91        <member>interpretDataSource</member>( <code>xSource</code> ),
92        the result of this method should be <code>xSource</code>.</p>
93     */
94    data::XDataSource mergeInterpretedData( [in] InterpretedData aInterpretedData );
95};
96
97} ; // chart2
98} ; // com
99} ; // sun
100} ; // star
101
102
103#endif
104