1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XChartDocument.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef com_sun_star_chart2_XChartDocument_idl
31 #define com_sun_star_chart2_XChartDocument_idl
33 #include
<com
/sun
/star
/chart2
/XDiagram.idl
>
34 #include
<com
/sun
/star
/chart2
/XChartTypeManager.idl
>
35 #include
<com
/sun
/star
/chart2
/data
/XDataProvider.idl
>
36 #include
<com
/sun
/star
/frame
/XModel.idl
>
37 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
38 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
39 #include
<com
/sun
/star
/util
/CloseVetoException.idl
>
50 interface XChartDocument
: ::com
::sun
::star
::frame
::XModel
52 /** @todo allow more than one diagram
54 <p>Notes: this is preliminary, we need an API that supports
55 more than one diagram. The method name getDiagram exists in
56 the css.chart API, so there is would be no way to chose either
57 this or the other method from Basic (it would chose one or the
60 XDiagram getFirstDiagram
();
62 /** @todo allow more than one diagram
64 <p>Notes: this is preliminary, we need an API that supports
65 more than one diagram. The method name setDiagram exists in
66 the css.chart API, so there is would be no way to chose either
67 this or the other method from Basic (it would chose one or the
70 void setFirstDiagram
( [in] XDiagram xDiagram
);
72 /** creates an internal
73 <type scope="com::sun::star::chart2">XDataProvider</type> that
74 is handled by the chart document itself.
76 <p>When the model is stored, the data provider will also be
77 stored in a sub-storage.</p>
79 @param bCloneExistingData
80 if <TRUE/> and a data provider was previously attached,
81 its referred data will be copied to the new internal data
82 provider. Note, that the range representation set before
83 will usually change after cloning.</p>
85 @throws com::sun::star::util:CloseVetoException
86 If the new data provider could not be created due to a
87 failed removal of the former data provider.
89 void createInternalDataProvider
( [in] boolean bCloneExistingData
)
90 raises
( com
::sun
::star
::util
::CloseVetoException
);
92 /** @return <TRUE/> if the data provider set at the chart document
95 <p>This is the case directly after
96 <member>createInternalDataProvider</member> has been called,
97 but this is not necessary. The chart can also create an
98 internal data provider by other means, e.g. a call to
99 <member scope="com::sun::star::frame">XModel::initNew</member>.
102 boolean hasInternalDataProvider
();
104 /** Returns the currently set data provider. This may be an
105 internal one, if <member>createInternalDataProvider</member>
106 has been called before, or an external one if
107 <member>XDataReceiver::attachDataProvider</member> has been
110 data
::XDataProvider getDataProvider
();
112 /** sets a new component that is able to create different chart
113 type templates (components of type
114 <type>ChartTypeTemplate</type>)
116 void setChartTypeManager
( [in] XChartTypeManager xNewManager
);
118 /** retrieves the component that is able to create different chart
119 type templates (components of type
120 <type>ChartTypeTemplate</type>)
122 XChartTypeManager getChartTypeManager
();
124 /** Gives access to the page background appearance.
127 the properties of the background area of the chart
130 <p>The area's extent is equal to the document size. If you
131 want to access properties of the background area of a single
132 diagram (the part where data points are actually plotted in),
133 you have to get its wall. You can get the wall by calling
134 <member>XDiagram::getWall</member>.</p>
136 com
::sun
::star
::beans
::XPropertySet getPageBackground
();