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_SERIESOPTIONSITEMCONVERTER_HXX
24 #define CHART_SERIESOPTIONSITEMCONVERTER_HXX
25 
26 #include "ItemConverter.hxx"
27 
28 
29 #include <com/sun/star/frame/XModel.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <com/sun/star/chart2/XCoordinateSystem.hpp>
32 
33 namespace chart
34 {
35 namespace wrapper
36 {
37 
38 class SeriesOptionsItemConverter :
39         public ::comphelper::ItemConverter
40 {
41 public:
42     SeriesOptionsItemConverter(
43         const ::com::sun::star::uno::Reference<
44             ::com::sun::star::frame::XModel > & xChartModel,
45         const ::com::sun::star::uno::Reference<
46             ::com::sun::star::uno::XComponentContext > & xContext,
47         const ::com::sun::star::uno::Reference<
48             ::com::sun::star::beans::XPropertySet > & rPropertySet,
49         SfxItemPool& rItemPool );
50     virtual ~SeriesOptionsItemConverter();
51 
52 protected:
53     virtual const sal_uInt16 * GetWhichPairs() const;
54     virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
55 
56     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const
57         throw( ::com::sun::star::uno::Exception );
58     virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet )
59         throw( ::com::sun::star::uno::Exception );
60 
61 private:
62     ::com::sun::star::uno::Reference<
63             ::com::sun::star::frame::XModel >  m_xChartModel;
64     ::com::sun::star::uno::Reference<
65             ::com::sun::star::uno::XComponentContext>	m_xCC;
66 
67     bool m_bAttachToMainAxis;
68     bool m_bSupportingOverlapAndGapWidthProperties;
69     bool m_bSupportingBarConnectors;
70 
71     sal_Int32 m_nBarOverlap;
72     sal_Int32 m_nGapWidth;
73     sal_Bool  m_bConnectBars;
74 
75     bool m_bSupportingAxisSideBySide;
76     bool m_bGroupBarsPerAxis;
77     bool m_bAllSeriesAttachedToSameAxis;
78     sal_Int32 m_nAllSeriesAxisIndex;
79 
80     bool m_bSupportingStartingAngle;
81     sal_Int32 m_nStartingAngle;
82 
83     bool m_bClockwise;
84     ::com::sun::star::uno::Reference<
85             ::com::sun::star::chart2::XCoordinateSystem > m_xCooSys;
86 
87     ::com::sun::star::uno::Sequence< sal_Int32 > m_aSupportedMissingValueTreatments;
88     sal_Int32 m_nMissingValueTreatment;
89 
90     bool m_bSupportingPlottingOfHiddenCells;
91     bool m_bIncludeHiddenCells;
92 };
93 
94 } //  namespace wrapper
95 } //  namespace chart
96 
97 // CHART_SERIESOPTIONSITEMCONVERTER_HXX
98 #endif
99