LibreOffice Module sc (master)  1
vbachart.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SC_SOURCE_UI_VBA_VBACHART_HXX
21 #define INCLUDED_SC_SOURCE_UI_VBA_VBACHART_HXX
22 
23 #include <com/sun/star/uno/XComponentContext.hpp>
24 #include <com/sun/star/table/XTableChart.hpp>
25 #include <com/sun/star/chart/XChartDocument.hpp>
26 #include <com/sun/star/chart/XAxisXSupplier.hpp>
27 #include <com/sun/star/chart/XAxisYSupplier.hpp>
28 #include <com/sun/star/chart/XAxisZSupplier.hpp>
29 #include <com/sun/star/chart/XTwoAxisXSupplier.hpp>
30 #include <com/sun/star/chart/XTwoAxisYSupplier.hpp>
31 #include <ooo/vba/excel/XChart.hpp>
33 
35 
36 class ScVbaChart : public ChartImpl_BASE
37 {
38 friend class ScVbaAxis;
39 
40  css::uno::Reference< css::chart::XChartDocument > mxChartDocument;
41  css::uno::Reference< css::table::XTableChart > mxTableChart;
42  css::uno::Reference< css::beans::XPropertySet > mxDiagramPropertySet;
43  css::uno::Reference< css::beans::XPropertySet > mxChartPropertySet;
44  css::uno::Reference< css::chart::XAxisXSupplier > xAxisXSupplier;
45  css::uno::Reference< css::chart::XAxisYSupplier> xAxisYSupplier;
46  css::uno::Reference< css::chart::XAxisZSupplier > xAxisZSupplier;
47  css::uno::Reference< css::chart::XTwoAxisXSupplier > xTwoAxisXSupplier;
48  css::uno::Reference< css::chart::XTwoAxisYSupplier > xTwoAxisYSupplier;
49 
50  static css::uno::Sequence< OUString > getDefaultSeriesDescriptions( sal_Int32 nCount );
52  void setDefaultChartType() ;
54  void setDiagram( const OUString& _sDiagramType);
56  bool isStacked();
58  bool is100PercentStacked();
60  sal_Int32 getStackedType( sal_Int32 _nStacked, sal_Int32 _n100PercentStacked, sal_Int32 _nUnStacked );
62  sal_Int32 getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _nVerti100PercentStacked, sal_Int32 _nVertiUnStacked, sal_Int32 _nHoriStacked, sal_Int32 _nHori100PercentStacked, sal_Int32 _nHoriUnStacked);
64  sal_Int32 getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown);
66  bool hasMarkers();
68  sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers);
70 public:
71  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 );
72 
73  // Non-interface
74  const css::uno::Reference< css::beans::XPropertySet >& xDiagramPropertySet() const { return mxDiagramPropertySet; }
76  bool is3D();
79  css::uno::Reference< css::beans::XPropertySet > getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup);
80  // Methods
81  virtual OUString SAL_CALL getName() override;
82  virtual css::uno::Any SAL_CALL SeriesCollection(const css::uno::Any&) override;
83  virtual ::sal_Int32 SAL_CALL getChartType() override;
84  virtual void SAL_CALL setChartType( ::sal_Int32 _charttype ) override;
85  virtual void SAL_CALL Activate( ) override;
86  virtual void SAL_CALL setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange >& range, const css::uno::Any& PlotBy ) override;
87  virtual ::sal_Int32 SAL_CALL Location( ) override;
88  virtual ::sal_Int32 SAL_CALL getLocation( ) override;
89  virtual void SAL_CALL setLocation( ::sal_Int32 where, const css::uno::Any& Name ) override;
90  virtual sal_Bool SAL_CALL getHasTitle( ) override;
91  virtual void SAL_CALL setHasTitle( sal_Bool bTitle ) override;
92  virtual sal_Bool SAL_CALL getHasLegend( ) override;
93  virtual void SAL_CALL setHasLegend( sal_Bool bLegend ) override;
94  virtual void SAL_CALL setPlotBy( ::sal_Int32 xlRowCol ) override;
95  virtual ::sal_Int32 SAL_CALL getPlotBy( ) override;
96  virtual css::uno::Reference< ov::excel::XChartTitle > SAL_CALL getChartTitle( ) override;
97  virtual css::uno::Any SAL_CALL Axes( const css::uno::Any& Type, const css::uno::Any& AxisGroup ) override;
98  // XHelperInterface
99  virtual OUString getServiceImplName() override;
100  virtual css::uno::Sequence<OUString> getServiceNames() override;
101 
102 };
103 
104 #endif // INCLUDED_SC_SOURCE_UI_VBA_VBACHART_HXX
105 
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL setSourceData(const css::uno::Reference< ::ooo::vba::excel::XRange > &range, const css::uno::Any &PlotBy) override
Definition: vbachart.cxx:563
Type
virtual void SAL_CALL setHasLegend(sal_Bool bLegend) override
Definition: vbachart.cxx:851
virtual void SAL_CALL setPlotBy(::sal_Int32 xlRowCol) override
Definition: vbachart.cxx:642
css::uno::Reference< css::chart::XChartDocument > mxChartDocument
Definition: vbachart.hxx:40
css::uno::Reference< css::chart::XTwoAxisYSupplier > xTwoAxisYSupplier
Definition: vbachart.hxx:48
virtual OUString getServiceImplName() override
Definition: vbachart.cxx:1044
css::uno::Reference< css::table::XTableChart > mxTableChart
Definition: vbachart.hxx:41
virtual sal_Bool SAL_CALL getHasTitle() override
Definition: vbachart.cxx:807
css::uno::Reference< css::chart::XAxisZSupplier > xAxisZSupplier
Definition: vbachart.hxx:46
virtual ::sal_Int32 SAL_CALL getLocation() override
Definition: vbachart.cxx:713
bool hasMarkers()
Definition: vbachart.cxx:977
void assignDiagramAttributes()
Definition: vbachart.cxx:1002
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)
Definition: vbachart.cxx:69
void setDefaultChartType()
Definition: vbachart.cxx:636
css::uno::Reference< css::beans::XPropertySet > getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup)
Definition: vbachart.cxx:1012
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbachart.cxx:1050
sal_Int32 getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _nVerti100PercentStacked, sal_Int32 _nVertiUnStacked, sal_Int32 _nHoriStacked, sal_Int32 _nHori100PercentStacked, sal_Int32 _nHoriUnStacked)
Definition: vbachart.cxx:923
virtual ::sal_Int32 SAL_CALL getPlotBy() override
Definition: vbachart.cxx:667
virtual void SAL_CALL setLocation(::sal_Int32 where, const css::uno::Any &Name) override
Definition: vbachart.cxx:719
css::uno::Reference< css::chart::XAxisYSupplier > xAxisYSupplier
Definition: vbachart.hxx:45
sal_Int32 getStackedType(sal_Int32 _nStacked, sal_Int32 _n100PercentStacked, sal_Int32 _nUnStacked)
Definition: vbachart.cxx:890
static css::uno::Sequence< OUString > getDefaultSeriesDescriptions(sal_Int32 nCount)
Definition: vbachart.cxx:627
virtual ::sal_Int32 SAL_CALL Location() override
Definition: vbachart.cxx:707
virtual css::uno::Reference< ov::excel::XChartTitle > SAL_CALL getChartTitle() override
Definition: vbachart.cxx:864
unsigned char sal_Bool
css::uno::Reference< css::beans::XPropertySet > mxChartPropertySet
Definition: vbachart.hxx:43
css::uno::Reference< css::chart::XTwoAxisXSupplier > xTwoAxisXSupplier
Definition: vbachart.hxx:47
virtual void SAL_CALL Activate() override
Definition: vbachart.cxx:547
bool is3D()
Definition: vbachart.cxx:881
virtual css::uno::Any SAL_CALL SeriesCollection(const css::uno::Any &) override
Definition: vbachart.cxx:97
bool isStacked()
Definition: vbachart.cxx:905
sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers)
Definition: vbachart.cxx:994
virtual sal_Bool SAL_CALL getHasLegend() override
Definition: vbachart.cxx:836
virtual void SAL_CALL setHasTitle(sal_Bool bTitle) override
Definition: vbachart.cxx:822
css::uno::Reference< css::beans::XPropertySet > mxDiagramPropertySet
Definition: vbachart.hxx:42
const css::uno::Reference< css::beans::XPropertySet > & xDiagramPropertySet() const
Definition: vbachart.hxx:74
virtual void SAL_CALL setChartType(::sal_Int32 _charttype) override
Definition: vbachart.cxx:222
virtual OUString SAL_CALL getName() override
Definition: vbachart.cxx:82
InheritedHelperInterfaceWeakImpl< ov::excel::XChart > ChartImpl_BASE
Definition: vbachart.hxx:34
void setDiagram(const OUString &_sDiagramType)
Definition: vbachart.cxx:689
virtual ::sal_Int32 SAL_CALL getChartType() override
Definition: vbachart.cxx:103
css::uno::Reference< css::chart::XAxisXSupplier > xAxisXSupplier
Definition: vbachart.hxx:44
bool is100PercentStacked()
Definition: vbachart.cxx:914
sal_Int32 getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown)
Definition: vbachart.cxx:955
virtual css::uno::Any SAL_CALL Axes(const css::uno::Any &Type, const css::uno::Any &AxisGroup) override
Definition: vbachart.cxx:872