xref: /aoo4110/main/chart2/source/model/main/Wall.hxx (revision b1cdbd2c)
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_WALL_HXX
24 #define CHART_WALL_HXX
25 
26 #include <com/sun/star/util/XCloneable.hpp>
27 #include <com/sun/star/util/XModifyBroadcaster.hpp>
28 #include <com/sun/star/util/XModifyListener.hpp>
29 #include "MutexContainer.hxx"
30 #include "OPropertySet.hxx"
31 #include <cppuhelper/weak.hxx>
32 
33 #include "ServiceMacros.hxx"
34 #include "ModifyListenerHelper.hxx"
35 #include <cppuhelper/implbase3.hxx>
36 #include <comphelper/uno3.hxx>
37 
38 namespace chart
39 {
40 
41 namespace impl
42 {
43 typedef ::cppu::WeakImplHelper3<
44         ::com::sun::star::util::XCloneable,
45         ::com::sun::star::util::XModifyBroadcaster,
46         ::com::sun::star::util::XModifyListener >
47     Wall_Base;
48 }
49 
50 class Wall :
51     public MutexContainer,
52     public impl::Wall_Base,
53     public ::property::OPropertySet
54 {
55 public:
56     Wall();
57 	virtual ~Wall();
58 
59     /// XServiceInfo declarations
60     APPHELPER_XSERVICEINFO_DECL()
61 
62     /// merge XInterface implementations
63  	DECLARE_XINTERFACE()
64 
65 protected:
66     explicit Wall( const Wall & rOther );
67 
68     // ____ OPropertySet ____
69     virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
70         throw(::com::sun::star::beans::UnknownPropertyException);
71 
72     // ____ OPropertySet ____
73 	virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
74 
75     // ____ XPropertySet ____
76     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
77         getPropertySetInfo()
78         throw (::com::sun::star::uno::RuntimeException);
79 
80 // 	virtual sal_Bool SAL_CALL convertFastPropertyValue
81 //         ( ::com::sun::star::uno::Any & rConvertedValue,
82 //           ::com::sun::star::uno::Any & rOldValue,
83 //           sal_Int32 nHandle,
84 //           const ::com::sun::star::uno::Any& rValue )
85 // 		throw (::com::sun::star::lang::IllegalArgumentException);
86 
87     // ____ XCloneable ____
88     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
89         throw (::com::sun::star::uno::RuntimeException);
90 
91     // ____ XModifyBroadcaster ____
92     virtual void SAL_CALL addModifyListener(
93         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
94         throw (::com::sun::star::uno::RuntimeException);
95     virtual void SAL_CALL removeModifyListener(
96         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
97         throw (::com::sun::star::uno::RuntimeException);
98 
99     // ____ XModifyListener ____
100     virtual void SAL_CALL modified(
101         const ::com::sun::star::lang::EventObject& aEvent )
102         throw (::com::sun::star::uno::RuntimeException);
103 
104     // ____ XEventListener (base of XModifyListener) ____
105     virtual void SAL_CALL disposing(
106         const ::com::sun::star::lang::EventObject& Source )
107         throw (::com::sun::star::uno::RuntimeException);
108 
109     // ____ OPropertySet ____
110     virtual void firePropertyChangeEvent();
111 	using OPropertySet::disposing;
112 
113     void fireModifyEvent();
114 
115 private:
116 
117     ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
118 };
119 
120 } //  namespace chart
121 
122 // CHART_WALL_HXX
123 #endif
124