1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef SC_VBA_CHART_HXX 28*cdf0e10cSrcweir #define SC_VBA_CHART_HXX 29*cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 30*cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp> 31*cdf0e10cSrcweir #include <com/sun/star/table/XTableChart.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/chart/XChartDocument.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/chart/XAxisXSupplier.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/chart/XAxisYSupplier.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/chart/XAxisZSupplier.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/chart/XTwoAxisXSupplier.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/chart/XTwoAxisYSupplier.hpp> 38*cdf0e10cSrcweir #include <ooo/vba/excel/XChart.hpp> 39*cdf0e10cSrcweir #include <ooo/vba/excel/XDataLabels.hpp> 40*cdf0e10cSrcweir #include <ooo/vba/excel/XSeries.hpp> 41*cdf0e10cSrcweir #include <vbahelper/vbahelperinterface.hxx> 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir typedef InheritedHelperInterfaceImpl1<ov::excel::XChart > ChartImpl_BASE; 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir class ScVbaChart : public ChartImpl_BASE 46*cdf0e10cSrcweir { 47*cdf0e10cSrcweir friend class ScVbaAxis; 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir css::uno::Reference< css::chart::XChartDocument > mxChartDocument; 50*cdf0e10cSrcweir css::uno::Reference< css::table::XTableChart > mxTableChart; 51*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > mxDiagramPropertySet; 52*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > mxChartPropertySet; 53*cdf0e10cSrcweir css::uno::Reference< css::chart::XAxisXSupplier > xAxisXSupplier; 54*cdf0e10cSrcweir css::uno::Reference< css::chart::XAxisYSupplier> xAxisYSupplier; 55*cdf0e10cSrcweir css::uno::Reference< css::chart::XAxisZSupplier > xAxisZSupplier; 56*cdf0e10cSrcweir css::uno::Reference< css::chart::XTwoAxisXSupplier > xTwoAxisXSupplier; 57*cdf0e10cSrcweir css::uno::Reference< css::chart::XTwoAxisYSupplier > xTwoAxisYSupplier; 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir css::uno::Sequence< rtl::OUString > getDefaultSeriesDescriptions( sal_Int32 nCount ); 60*cdf0e10cSrcweir css::uno::Sequence< css::uno::Sequence< double > > dblValues; 61*cdf0e10cSrcweir void setDefaultChartType()throw ( css::script::BasicErrorException ) ; 62*cdf0e10cSrcweir void setDiagram( const rtl::OUString& _sDiagramType) throw( css::script::BasicErrorException ); 63*cdf0e10cSrcweir bool isStacked() throw ( css::uno::RuntimeException ); 64*cdf0e10cSrcweir bool is100PercentStacked() throw ( css::uno::RuntimeException ); 65*cdf0e10cSrcweir sal_Int32 getStackedType( sal_Int32 _nStacked, sal_Int32 _n100PercentStacked, sal_Int32 _nUnStacked ) throw ( css::uno::RuntimeException ); 66*cdf0e10cSrcweir sal_Int32 getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _nVerti100PercentStacked, sal_Int32 _nVertiUnStacked, sal_Int32 _nHoriStacked, sal_Int32 _nHori100PercentStacked, sal_Int32 _nHoriUnStacked) throw ( css::script::BasicErrorException ); 67*cdf0e10cSrcweir sal_Int32 getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) throw (css::script::BasicErrorException); 68*cdf0e10cSrcweir bool hasMarkers() throw ( css::script::BasicErrorException ); 69*cdf0e10cSrcweir sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers) throw ( css::script::BasicErrorException ); 70*cdf0e10cSrcweir void assignDiagramAttributes(); 71*cdf0e10cSrcweir void setDefaultSeriesDescriptionLabels(){} 72*cdf0e10cSrcweir public: 73*cdf0e10cSrcweir ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ); 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir // Non-interface 76*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > xDiagramPropertySet() { return mxDiagramPropertySet; } 77*cdf0e10cSrcweir bool isSeriesIndexValid(sal_Int32 _seriesindex) throw( css::script::BasicErrorException ); 78*cdf0e10cSrcweir bool areIndicesValid(sal_Int32 _seriesindex, sal_Int32 _valindex) throw ( css::script::BasicErrorException ); 79*cdf0e10cSrcweir void setSeriesName(sal_Int32 _index, rtl::OUString _sname) throw ( css::script::BasicErrorException ); 80*cdf0e10cSrcweir sal_Int32 getSeriesIndex(rtl::OUString _sseriesname) throw ( css::script::BasicErrorException ); 81*cdf0e10cSrcweir sal_Int32 getSeriesCount() throw ( css::script::BasicErrorException ); 82*cdf0e10cSrcweir rtl::OUString getSeriesName(sal_Int32 _index) throw ( css::script::BasicErrorException ); 83*cdf0e10cSrcweir double getValue(sal_Int32 _seriesIndex, sal_Int32 _valindex) throw ( css::script::BasicErrorException ); 84*cdf0e10cSrcweir sal_Int32 getValuesCount(sal_Int32 _seriesIndex) throw ( css::script::BasicErrorException ); 85*cdf0e10cSrcweir css::uno::Reference< ov::excel::XDataLabels > DataLabels( const css::uno::Reference< ov::excel::XSeries > _oSeries ) throw ( css::script::BasicErrorException ); 86*cdf0e10cSrcweir bool getHasDataCaption( const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet )throw ( css::script::BasicErrorException ); 87*cdf0e10cSrcweir void setHasDataCaption( const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, bool _bHasDataLabels )throw ( css::script::BasicErrorException ); 88*cdf0e10cSrcweir bool is3D() throw ( css::uno::RuntimeException ); 89*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) throw ( css::script::BasicErrorException ); 90*cdf0e10cSrcweir // Methods 91*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); 92*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL SeriesCollection(const css::uno::Any&) throw (css::uno::RuntimeException); 93*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getChartType() throw ( css::uno::RuntimeException, css::script::BasicErrorException); 94*cdf0e10cSrcweir virtual void SAL_CALL setChartType( ::sal_Int32 _charttype ) throw ( css::uno::RuntimeException, css::script::BasicErrorException); 95*cdf0e10cSrcweir virtual void SAL_CALL Activate( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 96*cdf0e10cSrcweir virtual void SAL_CALL setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange >& range, const css::uno::Any& PlotBy ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 97*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL Location( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 98*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getLocation( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 99*cdf0e10cSrcweir virtual void SAL_CALL setLocation( ::sal_Int32 where, const css::uno::Any& Name ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 100*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getHasTitle( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 101*cdf0e10cSrcweir virtual void SAL_CALL setHasTitle( ::sal_Bool bTitle ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 102*cdf0e10cSrcweir virtual ::sal_Bool SAL_CALL getHasLegend( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 103*cdf0e10cSrcweir virtual void SAL_CALL setHasLegend( ::sal_Bool bLegend ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 104*cdf0e10cSrcweir virtual void SAL_CALL setPlotBy( ::sal_Int32 xlRowCol ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 105*cdf0e10cSrcweir virtual ::sal_Int32 SAL_CALL getPlotBy( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 106*cdf0e10cSrcweir virtual css::uno::Reference< ov::excel::XChartTitle > SAL_CALL getChartTitle( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 107*cdf0e10cSrcweir virtual css::uno::Any SAL_CALL Axes( const css::uno::Any& Type, const css::uno::Any& AxisGroup ) throw (css::script::BasicErrorException, css::uno::RuntimeException); 108*cdf0e10cSrcweir // XHelperInterface 109*cdf0e10cSrcweir virtual rtl::OUString& getServiceImplName(); 110*cdf0e10cSrcweir virtual css::uno::Sequence<rtl::OUString> getServiceNames(); 111*cdf0e10cSrcweir 112*cdf0e10cSrcweir }; 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir #endif //SC_VBA_WINDOW_HXX 115