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_STATISTICSITEMCONVERTER_HXX
24 #define CHART_STATISTICSITEMCONVERTER_HXX
25 
26 #include <com/sun/star/frame/XModel.hpp>
27 
28 #include "ItemConverter.hxx"
29 #include "GraphicPropertyItemConverter.hxx"
30 #include "NumberFormatterWrapper.hxx"
31 
32 #include <vector>
33 
34 class SdrModel;
35 
36 namespace chart
37 {
38 namespace wrapper
39 {
40 
41 class StatisticsItemConverter :
42         public ::comphelper::ItemConverter
43 {
44 public:
45     StatisticsItemConverter(
46         const ::com::sun::star::uno::Reference<
47             ::com::sun::star::frame::XModel > & xChartModel,
48         const ::com::sun::star::uno::Reference<
49             ::com::sun::star::beans::XPropertySet > & rPropertySet,
50         SfxItemPool& rItemPool );
51     virtual ~StatisticsItemConverter();
52 
53 protected:
54     virtual const sal_uInt16 * GetWhichPairs() const;
55     virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
56 
57     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const
58         throw( ::com::sun::star::uno::Exception );
59     virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet )
60         throw( ::com::sun::star::uno::Exception );
61 
62 private:
63     ::com::sun::star::uno::Reference<
64             ::com::sun::star::frame::XModel >  m_xModel;
65 };
66 
67 } //  namespace wrapper
68 } //  namespace chart
69 
70 // CHART_STATISTICSITEMCONVERTER_HXX
71 #endif
72