xref: /trunk/main/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx (revision 9d37da743abb7db0a497688391f6e55a19f27c44)
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_MINMAXLINEWRAPPER_HXX
24 #define CHART_MINMAXLINEWRAPPER_HXX
25 
26 #include "ServiceMacros.hxx"
27 #include "MutexContainer.hxx"
28 #include "WrappedIgnoreProperty.hxx"
29 #include <cppuhelper/interfacecontainer.hxx>
30 
31 
32 #include <com/sun/star/chart2/XDiagram.hpp>
33 
34 // header for class OPropertyArrayHelper
35 #include <cppuhelper/propshlp.hxx>
36 #include <cppuhelper/implbase6.hxx>
37 #include <com/sun/star/beans/XMultiPropertySet.hpp>
38 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
39 #include <com/sun/star/beans/XPropertyState.hpp>
40 #include <com/sun/star/lang/XComponent.hpp>
41 #include <com/sun/star/lang/XServiceInfo.hpp>
42 #include <com/sun/star/uno/XComponentContext.hpp>
43 
44 #include <boost/shared_ptr.hpp>
45 
46 namespace chart
47 {
48 
49 namespace wrapper
50 {
51 
52 class Chart2ModelContact;
53 
54 class MinMaxLineWrapper : public MutexContainer
55                         , public ::cppu::WeakImplHelper6
56                         < ::com::sun::star::lang::XComponent
57                         , ::com::sun::star::lang::XServiceInfo
58                         , ::com::sun::star::beans::XPropertySet
59                         , ::com::sun::star::beans::XMultiPropertySet
60                         , ::com::sun::star::beans::XPropertyState
61                         , ::com::sun::star::beans::XMultiPropertyStates
62                         //  , ::com::sun::star::uno::XWeak          // implemented by WeakImplHelper(optional interface)
63                         //  , ::com::sun::star::uno::XInterface     // implemented by WeakImplHelper
64                         //  , ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper
65                         >
66 {
67 public:
68     MinMaxLineWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
69     virtual ~MinMaxLineWrapper();
70 
71     /// XServiceInfo declarations
72     APPHELPER_XSERVICEINFO_DECL()
73 
74     // ____ XComponent ____
75     virtual void SAL_CALL dispose();
76     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference<
77                                             ::com::sun::star::lang::XEventListener >& xListener );
78     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference<
79                                                ::com::sun::star::lang::XEventListener >& aListener );
80 
81     //XPropertySet
82     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  );
83 
84     virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue );
85     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName );
86 
87     virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener );
88     virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener );
89     virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener );
90     virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener );
91 
92     //XMultiPropertySet
93     //getPropertySetInfo() already declared in XPropertySet
94     virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues );
95     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames );
96     virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener );
97     virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener );
98     virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener );
99 
100     //XPropertyState
101     virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName );
102     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName );
103     virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName );
104     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName );
105 
106     //XMultiPropertyStates
107     //getPropertyStates() already declared in XPropertyState
108     virtual void SAL_CALL setAllPropertiesToDefault(  );
109     virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames );
110     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames );
111 
112 private: //methods
113     ::cppu::IPropertyArrayHelper&   getInfoHelper();
114 
115 private: //member
116     ::boost::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
117     ::cppu::OInterfaceContainerHelper           m_aEventListenerContainer;
118 
119     WrappedIgnoreProperty               m_aWrappedLineJointProperty;
120 };
121 
122 } //  namespace wrapper
123 } //  namespace chart
124 
125 // CHART_MINMAXLINEWRAPPER_HXX
126 #endif
127