1*d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d1766043SAndrew Rist * distributed with this work for additional information 6*d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9*d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10*d1766043SAndrew Rist * 11*d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d1766043SAndrew Rist * 13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d1766043SAndrew Rist * software distributed under the License is distributed on an 15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17*d1766043SAndrew Rist * specific language governing permissions and limitations 18*d1766043SAndrew Rist * under the License. 19*d1766043SAndrew Rist * 20*d1766043SAndrew Rist *************************************************************/ 21*d1766043SAndrew Rist 22*d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef com_sun_star_chart2_XChartDocument_idl 24cdf0e10cSrcweir#define com_sun_star_chart2_XChartDocument_idl 25cdf0e10cSrcweir 26cdf0e10cSrcweir#include <com/sun/star/chart2/XDiagram.idl> 27cdf0e10cSrcweir#include <com/sun/star/chart2/XChartTypeManager.idl> 28cdf0e10cSrcweir#include <com/sun/star/chart2/data/XDataProvider.idl> 29cdf0e10cSrcweir#include <com/sun/star/frame/XModel.idl> 30cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl> 31cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl> 32cdf0e10cSrcweir#include <com/sun/star/util/CloseVetoException.idl> 33cdf0e10cSrcweir 34cdf0e10cSrcweirmodule com 35cdf0e10cSrcweir{ 36cdf0e10cSrcweirmodule sun 37cdf0e10cSrcweir{ 38cdf0e10cSrcweirmodule star 39cdf0e10cSrcweir{ 40cdf0e10cSrcweirmodule chart2 41cdf0e10cSrcweir{ 42cdf0e10cSrcweir 43cdf0e10cSrcweirinterface XChartDocument : ::com::sun::star::frame::XModel 44cdf0e10cSrcweir{ 45cdf0e10cSrcweir /** @todo allow more than one diagram 46cdf0e10cSrcweir 47cdf0e10cSrcweir <p>Notes: this is preliminary, we need an API that supports 48cdf0e10cSrcweir more than one diagram. The method name getDiagram exists in 49cdf0e10cSrcweir the css.chart API, so there is would be no way to chose either 50cdf0e10cSrcweir this or the other method from Basic (it would chose one or the 51cdf0e10cSrcweir other by random).</p> 52cdf0e10cSrcweir */ 53cdf0e10cSrcweir XDiagram getFirstDiagram(); 54cdf0e10cSrcweir 55cdf0e10cSrcweir /** @todo allow more than one diagram 56cdf0e10cSrcweir 57cdf0e10cSrcweir <p>Notes: this is preliminary, we need an API that supports 58cdf0e10cSrcweir more than one diagram. The method name setDiagram exists in 59cdf0e10cSrcweir the css.chart API, so there is would be no way to chose either 60cdf0e10cSrcweir this or the other method from Basic (it would chose one or the 61cdf0e10cSrcweir other by random).</p> 62cdf0e10cSrcweir */ 63cdf0e10cSrcweir void setFirstDiagram( [in] XDiagram xDiagram ); 64cdf0e10cSrcweir 65cdf0e10cSrcweir /** creates an internal 66cdf0e10cSrcweir <type scope="com::sun::star::chart2">XDataProvider</type> that 67cdf0e10cSrcweir is handled by the chart document itself. 68cdf0e10cSrcweir 69cdf0e10cSrcweir <p>When the model is stored, the data provider will also be 70cdf0e10cSrcweir stored in a sub-storage.</p> 71cdf0e10cSrcweir 72cdf0e10cSrcweir @param bCloneExistingData 73cdf0e10cSrcweir if <TRUE/> and a data provider was previously attached, 74cdf0e10cSrcweir its referred data will be copied to the new internal data 75cdf0e10cSrcweir provider. Note, that the range representation set before 76cdf0e10cSrcweir will usually change after cloning.</p> 77cdf0e10cSrcweir 78cdf0e10cSrcweir @throws com::sun::star::util:CloseVetoException 79cdf0e10cSrcweir If the new data provider could not be created due to a 80cdf0e10cSrcweir failed removal of the former data provider. 81cdf0e10cSrcweir */ 82cdf0e10cSrcweir void createInternalDataProvider( [in] boolean bCloneExistingData ) 83cdf0e10cSrcweir raises( com::sun::star::util::CloseVetoException ); 84cdf0e10cSrcweir 85cdf0e10cSrcweir /** @return <TRUE/> if the data provider set at the chart document 86cdf0e10cSrcweir is an internal one. 87cdf0e10cSrcweir 88cdf0e10cSrcweir <p>This is the case directly after 89cdf0e10cSrcweir <member>createInternalDataProvider</member> has been called, 90cdf0e10cSrcweir but this is not necessary. The chart can also create an 91cdf0e10cSrcweir internal data provider by other means, e.g. a call to 92cdf0e10cSrcweir <member scope="com::sun::star::frame">XModel::initNew</member>. 93cdf0e10cSrcweir </p> 94cdf0e10cSrcweir */ 95cdf0e10cSrcweir boolean hasInternalDataProvider(); 96cdf0e10cSrcweir 97cdf0e10cSrcweir /** Returns the currently set data provider. This may be an 98cdf0e10cSrcweir internal one, if <member>createInternalDataProvider</member> 99cdf0e10cSrcweir has been called before, or an external one if 100cdf0e10cSrcweir <member>XDataReceiver::attachDataProvider</member> has been 101cdf0e10cSrcweir called. 102cdf0e10cSrcweir */ 103cdf0e10cSrcweir data::XDataProvider getDataProvider(); 104cdf0e10cSrcweir 105cdf0e10cSrcweir /** sets a new component that is able to create different chart 106cdf0e10cSrcweir type templates (components of type 107cdf0e10cSrcweir <type>ChartTypeTemplate</type>) 108cdf0e10cSrcweir */ 109cdf0e10cSrcweir void setChartTypeManager( [in] XChartTypeManager xNewManager ); 110cdf0e10cSrcweir 111cdf0e10cSrcweir /** retrieves the component that is able to create different chart 112cdf0e10cSrcweir type templates (components of type 113cdf0e10cSrcweir <type>ChartTypeTemplate</type>) 114cdf0e10cSrcweir */ 115cdf0e10cSrcweir XChartTypeManager getChartTypeManager(); 116cdf0e10cSrcweir 117cdf0e10cSrcweir /** Gives access to the page background appearance. 118cdf0e10cSrcweir 119cdf0e10cSrcweir @return 120cdf0e10cSrcweir the properties of the background area of the chart 121cdf0e10cSrcweir document. 122cdf0e10cSrcweir 123cdf0e10cSrcweir <p>The area's extent is equal to the document size. If you 124cdf0e10cSrcweir want to access properties of the background area of a single 125cdf0e10cSrcweir diagram (the part where data points are actually plotted in), 126cdf0e10cSrcweir you have to get its wall. You can get the wall by calling 127cdf0e10cSrcweir <member>XDiagram::getWall</member>.</p> 128cdf0e10cSrcweir */ 129cdf0e10cSrcweir com::sun::star::beans::XPropertySet getPageBackground(); 130cdf0e10cSrcweir}; 131cdf0e10cSrcweir 132cdf0e10cSrcweir} ; // chart2 133cdf0e10cSrcweir} ; // com 134cdf0e10cSrcweir} ; // sun 135cdf0e10cSrcweir} ; // star 136cdf0e10cSrcweir 137cdf0e10cSrcweir#endif 138