Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / chart2 / XChartDocument.idl
blob57bcfc9c259f054e2dc48451b7914faaca1d8668
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef com_sun_star_chart2_XChartDocument_idl
20 #define com_sun_star_chart2_XChartDocument_idl
22 #include <com/sun/star/chart2/XDiagram.idl>
23 #include <com/sun/star/chart2/XChartTypeManager.idl>
24 #include <com/sun/star/chart2/data/XDataProvider.idl>
25 #include <com/sun/star/frame/XModel.idl>
26 #include <com/sun/star/beans/XPropertySet.idl>
27 #include <com/sun/star/lang/IllegalArgumentException.idl>
28 #include <com/sun/star/util/CloseVetoException.idl>
30 module com
32 module sun
34 module star
36 module chart2
39 interface XChartDocument : ::com::sun::star::frame::XModel
41 /** @todo allow more than one diagram
43 <p>Notes: this is preliminary, we need an API that supports
44 more than one diagram. The method name getDiagram exists in
45 the css.chart API, so there is would be no way to chose either
46 this or the other method from Basic (it would chose one or the
47 other by random).</p>
49 XDiagram getFirstDiagram();
51 /** @todo allow more than one diagram
53 <p>Notes: this is preliminary, we need an API that supports
54 more than one diagram. The method name setDiagram exists in
55 the css.chart API, so there is would be no way to chose either
56 this or the other method from Basic (it would chose one or the
57 other by random).</p>
59 void setFirstDiagram( [in] XDiagram xDiagram );
61 /** creates an internal
62 com::sun::star::chart2::XDataProvider that
63 is handled by the chart document itself.
65 <p>When the model is stored, the data provider will also be
66 stored in a sub-storage.</p>
68 @param bCloneExistingData
69 if `TRUE` and a data provider was previously attached,
70 its referred data will be copied to the new internal data
71 provider. Note, that the range representation set before
72 will usually change after cloning.</p>
74 @throws com::sun::star::util:CloseVetoException
75 If the new data provider could not be created due to a
76 failed removal of the former data provider.
78 void createInternalDataProvider( [in] boolean bCloneExistingData )
79 raises( com::sun::star::util::CloseVetoException );
81 /** @return `TRUE` if the data provider set at the chart document
82 is an internal one.
84 <p>This is the case directly after
85 createInternalDataProvider() has been called,
86 but this is not necessary. The chart can also create an
87 internal data provider by other means, e.g. a call to
88 com::sun::star::frame::XModel::initNew().
89 </p>
91 boolean hasInternalDataProvider();
93 /** Returns the currently set data provider. This may be an
94 internal one, if createInternalDataProvider()
95 has been called before, or an external one if
96 XDataReceiver::attachDataProvider() has been
97 called.
99 com::sun::star::chart2::data::XDataProvider getDataProvider();
101 /** sets a new component that is able to create different chart
102 type templates (components of type
103 ChartTypeTemplate)
105 void setChartTypeManager( [in] XChartTypeManager xNewManager );
107 /** retrieves the component that is able to create different chart
108 type templates (components of type
109 ChartTypeTemplate)
111 XChartTypeManager getChartTypeManager();
113 /** Gives access to the page background appearance.
115 @return
116 the properties of the background area of the chart
117 document.
119 <p>The area's extent is equal to the document size. If you
120 want to access properties of the background area of a single
121 diagram (the part where data points are actually plotted in),
122 you have to get its wall. You can get the wall by calling
123 XDiagram::getWall().</p>
125 com::sun::star::beans::XPropertySet getPageBackground();
127 /** Creates a default chart type for a brand-new chart object.
129 void createDefaultChart();
131 /** Returns true if the chart is based on OpenGL
133 boolean isOpenGLChart();
136 } ; // chart2
137 } ; // com
138 } ; // sun
139 } ; // star
141 #endif
143 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */