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_chart_XChartDocument_idl__
28#define __com_sun_star_chart_XChartDocument_idl__
29
30#ifndef __com_sun_star_frame_XModel_idl__
31#include <com/sun/star/frame/XModel.idl>
32#endif
33
34#ifndef __com_sun_star_drawing_XShape_idl__
35#include <com/sun/star/drawing/XShape.idl>
36#endif
37
38#ifndef __com_sun_star_beans_XPropertySet_idl__
39#include <com/sun/star/beans/XPropertySet.idl>
40#endif
41
42#ifndef __com_sun_star_chart_XDiagram_idl__
43#include <com/sun/star/chart/XDiagram.idl>
44#endif
45
46#ifndef __com_sun_star_chart_XChartData_idl__
47#include <com/sun/star/chart/XChartData.idl>
48#endif
49
50
51//=============================================================================
52
53 module com {  module sun {  module star {  module chart {
54
55//=============================================================================
56
57/** manages the chart document.
58
59	@see XDiagram
60    @see XChartData
61 */
62published interface XChartDocument: com::sun::star::frame::XModel
63{
64	//-------------------------------------------------------------------------
65
66	/** @returns
67			the shape of the main title of the chart document.
68
69		@see ChartTitle
70	 */
71	com::sun::star::drawing::XShape getTitle();
72
73	//-------------------------------------------------------------------------
74
75	/** @returns
76			the shape of the subtitle of the chart document.
77
78       <p>Usually the subtitle is smaller than the main title by
79       default.  And it is most commonly placed below the main title
80       by default.</p>
81
82		@see ChartTitle
83	 */
84	com::sun::star::drawing::XShape getSubTitle();
85
86	//-------------------------------------------------------------------------
87
88	/** @returns
89			the shape of the legend of the chart document.
90
91		@see ChartLegend
92	 */
93	com::sun::star::drawing::XShape getLegend();
94
95	//-------------------------------------------------------------------------
96
97	/** @returns
98			the properties of the background area of the chart document.
99
100        <p>The area's extent is equal to the document size.  If you
101        want to access properties of the background area of the
102        diagram, in which the actual data is represented, you have to
103        change the chart wall which you get from the
104        <type>X3DDisplay</type>.</p>
105
106		@see ChartArea
107        @see X3DDisplay
108	 */
109	com::sun::star::beans::XPropertySet getArea();
110
111	//-------------------------------------------------------------------------
112
113	/** @returns
114			the diagram of the chart document.
115
116		@see Diagram
117	 */
118	com::sun::star::chart::XDiagram getDiagram();
119
120	//-------------------------------------------------------------------------
121
122	/** sets the diagram for the chart document.
123
124		<p>Setting a new diagram implicitly disposes the previous
125		diagram.</p>
126
127        @param xDiagram
128        	the new diagram that should be set for the chart.  To
129            create such a diagram component, you can use the
130            <type scope="com::sun::star::lang">XMultiServiceFactory</type>,
131            which should be implemented by an
132            <type>XChartDocument</type>.
133	 */
134	void setDiagram( [in] com::sun::star::chart::XDiagram xDiagram );
135
136	//-------------------------------------------------------------------------
137
138	/** @returns
139            the data of the chart.
140
141        <p>The returned object supports interface <type>XChartDataArray</type>
142        which can be used to access the concrete data.</p>
143
144        <p>Since OOo 3.3 the returned object also supports interface <type>XComplexDescriptionAccess</type>
145        which can be used to access complex hierarchical axis descriptions.</p>
146
147        <p>Since OOo 3.4 the returned object also supports interface <type>XDateCategories</type>.</p>
148
149        @see XChartData
150        @see XChartDataArray
151        @see XComplexDescriptionAccess
152        @see XDateCategories
153	 */
154	com::sun::star::chart::XChartData getData();
155
156	//-------------------------------------------------------------------------
157
158	/** attaches data to the chart.
159
160        <p>The given object needs to support interface <type>XChartDataArray</type>.</p>
161
162        <p>Since OOo 3.3 if the given object might support interface <type>XComplexDescriptionAccess</type>
163        which allows to set complex hierarchical axis descriptions.</p>
164
165        <p>Since OOo 3.4 if the given object might support interface <type>XDateCategories</type>
166        which allows to set date values as x values for category charts.</p>
167
168        <p>The given data is copied before it is applied to the chart.
169        So changing xData after this call will have no effect on the chart.</p>
170
171        @see XChartData
172        @see XChartDataArray
173        @see XComplexDescriptionAccess
174        @see XDateCategories
175
176        @param xData
177        	the object that provides the new data.
178	 */
179	void attachData( [in] com::sun::star::chart::XChartData xData );
180
181};
182
183//=============================================================================
184
185}; }; }; };
186
187#endif
188