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