1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
29 interface XChartDocument
: ::com
::sun
::star
::frame
::XModel
31 /** @todo allow more than one diagram
33 <p>Notes: this is preliminary, we need an API that supports
34 more than one diagram. The method name getDiagram exists in
35 the css.chart API, so there is would be no way to choose either
36 this or the other method from Basic (it would chose one or the
39 XDiagram getFirstDiagram
();
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 setDiagram exists in
45 the css.chart API, so there is would be no way to choose either
46 this or the other method from Basic (it would chose one or the
49 void setFirstDiagram
( [in] XDiagram xDiagram
);
51 /** creates an internal
52 com::sun::star::chart2::XDataProvider that
53 is handled by the chart document itself.
55 <p>When the model is stored, the data provider will also be
56 stored in a sub-storage.</p>
58 @param bCloneExistingData
59 if `TRUE` and a data provider was previously attached,
60 its referred data will be copied to the new internal data
61 provider. Note, that the range representation set before
62 will usually change after cloning.</p>
64 @throws com::sun::star::util:CloseVetoException
65 If the new data provider could not be created due to a
66 failed removal of the former data provider.
68 void createInternalDataProvider
( [in] boolean bCloneExistingData
)
69 raises
( com
::sun
::star
::util
::CloseVetoException
);
71 /** @return `TRUE` if the data provider set at the chart document
74 <p>This is the case directly after
75 createInternalDataProvider() has been called,
76 but this is not necessary. The chart can also create an
77 internal data provider by other means, e.g. a call to
78 com::sun::star::frame::XModel::initNew().
81 boolean hasInternalDataProvider
();
83 /** Returns the currently set data provider. This may be an
84 internal one, if createInternalDataProvider()
85 has been called before, or an external one if
86 XDataReceiver::attachDataProvider() has been
89 com
::sun
::star
::chart2
::data
::XDataProvider getDataProvider
();
91 /** sets a new component that is able to create different chart
92 type templates (components of type
95 void setChartTypeManager
( [in] XChartTypeManager xNewManager
);
97 /** retrieves the component that is able to create different chart
98 type templates (components of type
101 XChartTypeManager getChartTypeManager
();
103 /** Gives access to the page background appearance.
106 the properties of the background area of the chart
109 <p>The area's extent is equal to the document size. If you
110 want to access properties of the background area of a single
111 diagram (the part where data points are actually plotted in),
112 you have to get its wall. You can get the wall by calling
113 XDiagram::getWall().</p>
115 com
::sun
::star
::beans
::XPropertySet getPageBackground
();
117 /** Creates a default chart type for a brand-new chart object.
119 void createDefaultChart
();
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */