1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef CHART_SCATTERCHARTTYPETEMPLATE_HXX
24 #define CHART_SCATTERCHARTTYPETEMPLATE_HXX
25 
26 #include "ChartTypeTemplate.hxx"
27 #include "OPropertySet.hxx"
28 #include "MutexContainer.hxx"
29 #include <comphelper/uno3.hxx>
30 #include <com/sun/star/chart2/CurveStyle.hpp>
31 
32 namespace chart
33 {
34 
35 class ScatterChartTypeTemplate :
36         public MutexContainer,
37         public ChartTypeTemplate,
38         public ::property::OPropertySet
39 {
40 public:
41     explicit ScatterChartTypeTemplate(
42         ::com::sun::star::uno::Reference<
43             ::com::sun::star::uno::XComponentContext > const & xContext,
44         const ::rtl::OUString & rServiceName,
45         bool bSymbols,
46         bool bHasLines = true,
47         sal_Int32 nDim = 2 );
48 	virtual ~ScatterChartTypeTemplate();
49 
50     /// XServiceInfo declarations
51     APPHELPER_XSERVICEINFO_DECL()
52 
53     /// merge XInterface implementations
54  	DECLARE_XINTERFACE()
55     /// merge XTypeProvider implementations
56  	DECLARE_XTYPEPROVIDER()
57 
58 protected:
59     // ____ OPropertySet ____
60     virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
61         throw(::com::sun::star::beans::UnknownPropertyException);
62     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
63 
64     // ____ XPropertySet ____
65     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
66         getPropertySetInfo()
67         throw (::com::sun::star::uno::RuntimeException);
68 
69     // ____ XChartTypeTemplate ____
70     virtual sal_Bool SAL_CALL supportsCategories()
71         throw (::com::sun::star::uno::RuntimeException);
72     virtual sal_Bool SAL_CALL matchesTemplate(
73         const ::com::sun::star::uno::Reference<
74             ::com::sun::star::chart2::XDiagram >& xDiagram,
75         sal_Bool bAdaptProperties )
76         throw (::com::sun::star::uno::RuntimeException);
77     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > SAL_CALL
78         getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence<
79             ::com::sun::star::uno::Reference<
80                 ::com::sun::star::chart2::XChartType > >& aFormerlyUsedChartTypes )
81         throw (::com::sun::star::uno::RuntimeException);
82     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataInterpreter > SAL_CALL getDataInterpreter()
83         throw (::com::sun::star::uno::RuntimeException);
84     virtual void SAL_CALL applyStyle(
85         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries,
86         ::sal_Int32 nChartTypeGroupIndex,
87         ::sal_Int32 nSeriesIndex,
88         ::sal_Int32 nSeriesCount )
89         throw (::com::sun::star::uno::RuntimeException);
90 
91     // ____ ChartTypeTemplate ____
92     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >
93                 getChartTypeForIndex( sal_Int32 nChartTypeIndex );
94     virtual sal_Int32 getDimension() const;
95     virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
96 
97 private:
98     bool               m_bHasSymbols;
99     bool               m_bHasLines;
100     sal_Int32          m_nDim;
101 };
102 
103 } //  namespace chart
104 
105 // CHART_SCATTERCHARTTYPETEMPLATE_HXX
106 #endif
107