1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27#ifndef com_sun_star_chart2_XChartDocument_idl 28#define com_sun_star_chart2_XChartDocument_idl 29 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> 37 38module com 39{ 40module sun 41{ 42module star 43{ 44module chart2 45{ 46 47interface XChartDocument : ::com::sun::star::frame::XModel 48{ 49 /** @todo allow more than one diagram 50 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 55 other by random).</p> 56 */ 57 XDiagram getFirstDiagram(); 58 59 /** @todo allow more than one diagram 60 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 65 other by random).</p> 66 */ 67 void setFirstDiagram( [in] XDiagram xDiagram ); 68 69 /** creates an internal 70 <type scope="com::sun::star::chart2">XDataProvider</type> that 71 is handled by the chart document itself. 72 73 <p>When the model is stored, the data provider will also be 74 stored in a sub-storage.</p> 75 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> 81 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. 85 */ 86 void createInternalDataProvider( [in] boolean bCloneExistingData ) 87 raises( com::sun::star::util::CloseVetoException ); 88 89 /** @return <TRUE/> if the data provider set at the chart document 90 is an internal one. 91 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>. 97 </p> 98 */ 99 boolean hasInternalDataProvider(); 100 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 105 called. 106 */ 107 data::XDataProvider getDataProvider(); 108 109 /** sets a new component that is able to create different chart 110 type templates (components of type 111 <type>ChartTypeTemplate</type>) 112 */ 113 void setChartTypeManager( [in] XChartTypeManager xNewManager ); 114 115 /** retrieves the component that is able to create different chart 116 type templates (components of type 117 <type>ChartTypeTemplate</type>) 118 */ 119 XChartTypeManager getChartTypeManager(); 120 121 /** Gives access to the page background appearance. 122 123 @return 124 the properties of the background area of the chart 125 document. 126 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> 132 */ 133 com::sun::star::beans::XPropertySet getPageBackground(); 134}; 135 136} ; // chart2 137} ; // com 138} ; // sun 139} ; // star 140 141#endif 142