1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef com_sun_star_chart2_XChartDocument_idl
28 #define com_sun_star_chart2_XChartDocument_idl
30 #include
<com
/sun
/star
/chart2
/XDiagram.idl
>
31 #include
<com
/sun
/star
/chart2
/XChartTypeManager.idl
>
32 #include
<com
/sun
/star
/chart2
/data
/XDataProvider.idl
>
33 #include
<com
/sun
/star
/frame
/XModel.idl
>
34 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
35 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
36 #include
<com
/sun
/star
/util
/CloseVetoException.idl
>
47 interface XChartDocument
: ::com
::sun
::star
::frame
::XModel
49 /** @todo allow more than one diagram
51 <p>Notes: this is preliminary, we need an API that supports
52 more than one diagram. The method name getDiagram exists in
53 the css.chart API, so there is would be no way to chose either
54 this or the other method from Basic (it would chose one or the
57 XDiagram getFirstDiagram
();
59 /** @todo allow more than one diagram
61 <p>Notes: this is preliminary, we need an API that supports
62 more than one diagram. The method name setDiagram exists in
63 the css.chart API, so there is would be no way to chose either
64 this or the other method from Basic (it would chose one or the
67 void setFirstDiagram
( [in] XDiagram xDiagram
);
69 /** creates an internal
70 <type scope="com::sun::star::chart2">XDataProvider</type> that
71 is handled by the chart document itself.
73 <p>When the model is stored, the data provider will also be
74 stored in a sub-storage.</p>
76 @param bCloneExistingData
77 if <TRUE/> and a data provider was previously attached,
78 its referred data will be copied to the new internal data
79 provider. Note, that the range representation set before
80 will usually change after cloning.</p>
82 @throws com::sun::star::util:CloseVetoException
83 If the new data provider could not be created due to a
84 failed removal of the former data provider.
86 void createInternalDataProvider
( [in] boolean bCloneExistingData
)
87 raises
( com
::sun
::star
::util
::CloseVetoException
);
89 /** @return <TRUE/> if the data provider set at the chart document
92 <p>This is the case directly after
93 <member>createInternalDataProvider</member> has been called,
94 but this is not necessary. The chart can also create an
95 internal data provider by other means, e.g. a call to
96 <member scope="com::sun::star::frame">XModel::initNew</member>.
99 boolean hasInternalDataProvider
();
101 /** Returns the currently set data provider. This may be an
102 internal one, if <member>createInternalDataProvider</member>
103 has been called before, or an external one if
104 <member>XDataReceiver::attachDataProvider</member> has been
107 data
::XDataProvider getDataProvider
();
109 /** sets a new component that is able to create different chart
110 type templates (components of type
111 <type>ChartTypeTemplate</type>)
113 void setChartTypeManager
( [in] XChartTypeManager xNewManager
);
115 /** retrieves the component that is able to create different chart
116 type templates (components of type
117 <type>ChartTypeTemplate</type>)
119 XChartTypeManager getChartTypeManager
();
121 /** Gives access to the page background appearance.
124 the properties of the background area of the chart
127 <p>The area's extent is equal to the document size. If you
128 want to access properties of the background area of a single
129 diagram (the part where data points are actually plotted in),
130 you have to get its wall. You can get the wall by calling
131 <member>XDiagram::getWall</member>.</p>
133 com
::sun
::star
::beans
::XPropertySet getPageBackground
();