1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef com_sun_star_chart2_XChartDocument_idl
29 #define com_sun_star_chart2_XChartDocument_idl
31 #include
<com
/sun
/star
/chart2
/XDiagram.idl
>
32 #include
<com
/sun
/star
/chart2
/XChartTypeManager.idl
>
33 #include
<com
/sun
/star
/chart2
/data
/XDataProvider.idl
>
34 #include
<com
/sun
/star
/frame
/XModel.idl
>
35 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
36 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
37 #include
<com
/sun
/star
/util
/CloseVetoException.idl
>
48 interface XChartDocument
: ::com
::sun
::star
::frame
::XModel
50 /** @todo allow more than one diagram
52 <p>Notes: this is preliminary, we need an API that supports
53 more than one diagram. The method name getDiagram exists in
54 the css.chart API, so there is would be no way to chose either
55 this or the other method from Basic (it would chose one or the
58 XDiagram getFirstDiagram
();
60 /** @todo allow more than one diagram
62 <p>Notes: this is preliminary, we need an API that supports
63 more than one diagram. The method name setDiagram exists in
64 the css.chart API, so there is would be no way to chose either
65 this or the other method from Basic (it would chose one or the
68 void setFirstDiagram
( [in] XDiagram xDiagram
);
70 /** creates an internal
71 <type scope="com::sun::star::chart2">XDataProvider</type> that
72 is handled by the chart document itself.
74 <p>When the model is stored, the data provider will also be
75 stored in a sub-storage.</p>
77 @param bCloneExistingData
78 if <TRUE/> and a data provider was previously attached,
79 its referred data will be copied to the new internal data
80 provider. Note, that the range representation set before
81 will usually change after cloning.</p>
83 @throws com::sun::star::util:CloseVetoException
84 If the new data provider could not be created due to a
85 failed removal of the former data provider.
87 void createInternalDataProvider
( [in] boolean bCloneExistingData
)
88 raises
( com
::sun
::star
::util
::CloseVetoException
);
90 /** @return <TRUE/> if the data provider set at the chart document
93 <p>This is the case directly after
94 <member>createInternalDataProvider</member> has been called,
95 but this is not necessary. The chart can also create an
96 internal data provider by other means, e.g. a call to
97 <member scope="com::sun::star::frame">XModel::initNew</member>.
100 boolean hasInternalDataProvider
();
102 /** Returns the currently set data provider. This may be an
103 internal one, if <member>createInternalDataProvider</member>
104 has been called before, or an external one if
105 <member>XDataReceiver::attachDataProvider</member> has been
108 com
::sun
::star
::chart2
::data
::XDataProvider getDataProvider
();
110 /** sets a new component that is able to create different chart
111 type templates (components of type
112 <type>ChartTypeTemplate</type>)
114 void setChartTypeManager
( [in] XChartTypeManager xNewManager
);
116 /** retrieves the component that is able to create different chart
117 type templates (components of type
118 <type>ChartTypeTemplate</type>)
120 XChartTypeManager getChartTypeManager
();
122 /** Gives access to the page background appearance.
125 the properties of the background area of the chart
128 <p>The area's extent is equal to the document size. If you
129 want to access properties of the background area of a single
130 diagram (the part where data points are actually plotted in),
131 you have to get its wall. You can get the wall by calling
132 <member>XDiagram::getWall</member>.</p>
134 com
::sun
::star
::beans
::XPropertySet getPageBackground
();
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */