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