xref: /trunk/main/chart2/source/model/template/NetChartTypeTemplate.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > SAL_CALL
55         getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence<
56             ::com::sun::star::uno::Reference<
57                 ::com::sun::star::chart2::XChartType > >& aFormerlyUsedChartTypes );
58     virtual void SAL_CALL applyStyle(
59         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries,
60         ::sal_Int32 nChartTypeGroupIndex,
61         ::sal_Int32 nSeriesIndex,
62         ::sal_Int32 nSeriesCount );
63 
64     // ____ ChartTypeTemplate ____
65     virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >
66                 getChartTypeForIndex( sal_Int32 nChartTypeIndex );
67     virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
68 
69 
70 private:
71     StackMode  m_eStackMode;
72     bool                                 m_bHasSymbols;
73     bool                                 m_bHasLines;
74     bool                                 m_bHasFilledArea;
75 };
76 
77 } //  namespace chart
78 
79 // CHART_NETCHARTTYPETEMPLATE_HXX
80 #endif
81