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_NETCHARTTYPETEMPLATE_HXX
24 #define CHART_NETCHARTTYPETEMPLATE_HXX
25 
26 #include "ChartTypeTemplate.hxx"
27 #include "StackMode.hxx"
28 
29 namespace chart
30 {
31 
32 class NetChartTypeTemplate : public ChartTypeTemplate
33 {
34 public:
35     explicit NetChartTypeTemplate(
36         ::com::sun::star::uno::Reference<
37             ::com::sun::star::uno::XComponentContext > const & xContext,
38         const ::rtl::OUString & rServiceName,
39         StackMode eStackMode,
40         bool bSymbols,
41         bool bHasLines = true,
42         bool bHasFilledArea = false
43         );
44 	virtual ~NetChartTypeTemplate();
45 
46     APPHELPER_XSERVICEINFO_DECL()
47 
48 protected:
49     // ____ XChartTypeTemplate ____
50     virtual sal_Bool SAL_CALL matchesTemplate(
51         const ::com::sun::star::uno::Reference<
52             ::com::sun::star::chart2::XDiagram >& xDiagram,
53         sal_Bool bAdaptProperties )
54         throw (::com::sun::star::uno::RuntimeException);
55     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > SAL_CALL
56         getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence<
57             ::com::sun::star::uno::Reference<
58                 ::com::sun::star::chart2::XChartType > >& aFormerlyUsedChartTypes )
59         throw (::com::sun::star::uno::RuntimeException);
60     virtual void SAL_CALL applyStyle(
61         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries,
62         ::sal_Int32 nChartTypeGroupIndex,
63         ::sal_Int32 nSeriesIndex,
64         ::sal_Int32 nSeriesCount )
65         throw (::com::sun::star::uno::RuntimeException);
66 
67     // ____ ChartTypeTemplate ____
68     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >
69                 getChartTypeForIndex( sal_Int32 nChartTypeIndex );
70     virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
71 
72 
73 private:
74     StackMode  m_eStackMode;
75     bool                                 m_bHasSymbols;
76     bool                                 m_bHasLines;
77     bool                                 m_bHasFilledArea;
78 };
79 
80 } //  namespace chart
81 
82 // CHART_NETCHARTTYPETEMPLATE_HXX
83 #endif
84