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