1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef com_sun_star_chart2_XDataInterpreter_idl
28#define com_sun_star_chart2_XDataInterpreter_idl
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33#ifndef __com_sun_star_beans_PropertyValue_idl__
34#include <com/sun/star/beans/PropertyValue.idl>
35#endif
36
37#include <com/sun/star/chart2/InterpretedData.idl>
38#include <com/sun/star/chart2/data/XDataSource.idl>
39#include <com/sun/star/chart2/XDataSeries.idl>
40
41module com
42{
43module sun
44{
45module star
46{
47module chart2
48{
49
50/** offers tooling to interpret different data sources in a structural
51    and chart-type-dependent way.
52 */
53interface XDataInterpreter  : ::com::sun::star::uno::XInterface
54{
55    /** Interprets the given data.
56
57        @param aArguments
58            Arguments that tell the template how to slice the given
59            range.  The properties should be defined in a separate
60            service.
61
62            <p>For standard parameters that may be used, see the
63            service <type>StandardDiagramCreationParameters</type>.
64            </p>
65
66        @param aSeriesToReUse
67            use all the data series given here for the result before
68            creating new ones.
69     */
70    InterpretedData interpretDataSource(
71        [in] data::XDataSource xSource,
72        [in] sequence< com::sun::star::beans::PropertyValue > aArguments,
73        [in] sequence< XDataSeries > aSeriesToReUse );
74
75    /** Re-interprets the data given in <code>aInterpretedData</code>
76        while keeping the number of data series and the categories.
77     */
78    InterpretedData reinterpretDataSeries( [in] InterpretedData aInterpretedData );
79
80    /** parses the given data and states, if a
81        <member>reinterpretDataSeries</member> call can be done
82        without data loss.
83
84        @return
85            <TRUE/>, if the data given in
86            <code>aInterpretedData</code> has a similar structure than
87            the one required is used as output of the data interpreter.
88     */
89    boolean isDataCompatible( [in] InterpretedData aInterpretedData );
90
91    /** Try to reverse the operation done in
92        <member>interpretDataSource</member>.
93
94        <p>In case <code>aInterpretedData</code> is the result of
95        <member>interpretDataSource</member>( <code>xSource</code> ),
96        the result of this method should be <code>xSource</code>.</p>
97     */
98    data::XDataSource mergeInterpretedData( [in] InterpretedData aInterpretedData );
99};
100
101} ; // chart2
102} ; // com
103} ; // sun
104} ; // star
105
106
107#endif
108