xref: /AOO41X/main/chart2/source/controller/inc/RegressionEquationItemConverter.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef CHART_REGRESSIONEQUATION_ITEMCONVERTER_HXX
28 #define CHART_REGRESSIONEQUATION_ITEMCONVERTER_HXX
29 
30 #include "ItemConverter.hxx"
31 #include "GraphicPropertyItemConverter.hxx"
32 
33 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/awt/Size.hpp>
36 
37 #include <memory>
38 #include <vector>
39 #include <boost/shared_ptr.hpp>
40 
41 class SdrModel;
42 
43 namespace chart
44 {
45 namespace wrapper
46 {
47 
48 class RegressionEquationItemConverter :
49         public ::comphelper::ItemConverter
50 {
51 public:
52     RegressionEquationItemConverter(
53         const ::com::sun::star::uno::Reference<
54         ::com::sun::star::beans::XPropertySet > & rPropertySet,
55         SfxItemPool& rItemPool,
56         SdrModel& rDrawModel,
57         const ::com::sun::star::uno::Reference<
58             ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
59         ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
60             ::std::auto_ptr< ::com::sun::star::awt::Size >() );
61     virtual ~RegressionEquationItemConverter();
62 
63     virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
64     virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
65 
66 protected:
67     virtual const sal_uInt16 * GetWhichPairs() const;
68     virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
69 
70     virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const
71         throw( ::com::sun::star::uno::Exception );
72     virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet )
73         throw( ::com::sun::star::uno::Exception );
74 
75 private:
76     ::std::vector< ItemConverter * >    m_aConverters;
77 };
78 
79 } //  namespace wrapper
80 } //  namespace chart
81 
82 // CHART_REGRESSIONEQUATION_ITEMCONVERTER_HXX
83 #endif
84