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 
28 #ifndef _SBA_MULTIPLEX_HXX
29 #define _SBA_MULTIPLEX_HXX
30 
31 //#ifndef _SDB_TOOLS_HXX
32 //#include <sdb/tools.hxx>
33 //#endif
34 
35 #ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_
36 #include <com/sun/star/beans/XVetoableChangeListener.hpp>
37 #endif
38 #ifndef _COM_SUN_STAR_FORM_XUPDATELISTENER_HPP_
39 #include <com/sun/star/form/XUpdateListener.hpp>
40 #endif
41 #ifndef _COM_SUN_STAR_FORM_XERRORLISTENER_HPP_
42 #include <com/sun/star/form/XErrorListener.hpp>
43 #endif
44 #ifndef _COM_SUN_STAR_FORM_XRESTORELISTENER_HPP_
45 #include <com/sun/star/form/XRestoreListener.hpp>
46 #endif
47 #ifndef _COM_SUN_STAR_FORM_XINSERTLISTENER_HPP_
48 #include <com/sun/star/form/XInsertListener.hpp>
49 #endif
50 #ifndef _COM_SUN_STAR_FORM_XDELETELISTENER_HPP_
51 #include <com/sun/star/form/XDeleteListener.hpp>
52 #endif
53 #ifndef _COM_SUN_STAR_FORM_XPOSITIONINGLISTENER_HPP_
54 #include <com/sun/star/form/XPositioningListener.hpp>
55 #endif
56 #ifndef _COM_SUN_STAR_FORM_XDATABASEPARAMETERLISTENER_HPP_
57 #include <com/sun/star/form/XDatabaseParameterListener.hpp>
58 #endif
59 #ifndef _COM_SUN_STAR_FORM_XLOADLISTENER_HPP_
60 #include <com/sun/star/form/XLoadListener.hpp>
61 #endif
62 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HPP_
63 #include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
64 #endif
65 #ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HPP_
66 #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
67 #endif
68 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
69 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
70 #endif
71 #ifndef _COM_SUN_STAR_FORM_XSUBMITLISTENER_HPP_
72 #include <com/sun/star/form/XSubmitListener.hpp>
73 #endif
74 #ifndef _COM_SUN_STAR_FORM_XRESETLISTENER_HPP_
75 #include <com/sun/star/form/XResetListener.hpp>
76 #endif
77 #ifndef _COM_SUN_STAR_UTIL_XREFRESHLISTENER_HPP_
78 #include <com/sun/star/util/XRefreshListener.hpp>
79 #endif
80 #ifndef _COM_SUN_STAR_SDBC_XSQLERRORLISTENER_HPP_
81 #include <com/sun/star/sdb/XSQLErrorListener.hpp>
82 #endif
83 #ifndef _COM_SUN_STAR_SDB_XROWSETAPPROVELISTENER_HPP_
84 #include <com/sun/star/sdb/XRowSetApproveListener.hpp>
85 #endif
86 #ifndef _COM_SUN_STAR_SDBC_XROWSETLISTENER_HPP_
87 #include <com/sun/star/sdbc/XRowSetListener.hpp>
88 #endif
89 #ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
90 #include <com/sun/star/frame/XStatusListener.hpp>
91 #endif
92 #ifndef _COMPHELPER_STLTYPES_HXX_
93 #include <comphelper/stl_types.hxx>
94 #endif
95 #ifndef _COMPHELPER_UNO3_HXX_
96 #include <comphelper/uno3.hxx>
97 #endif
98 #ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
99 #include <cppuhelper/interfacecontainer.hxx>
100 #endif
101 #ifndef _CPPUHELPER_QUERYINTERFACE_HXX_
102 #include <cppuhelper/queryinterface.hxx>
103 #endif
104 #ifndef _CPPUHELPER_WEAK_HXX_
105 #include <cppuhelper/weak.hxx>
106 #endif
107 
108 namespace dbaui
109 {
110 	//------------------------------------------------------------------
111 	// TODO : replace this class if MM provides an WeakSubObject in cppu
112 	class OSbaWeakSubObject : public ::cppu::OWeakObject
113 	{
114 	protected:
115 		::cppu::OWeakObject&	m_rParent;
116 
117 	public:
118 		OSbaWeakSubObject(::cppu::OWeakObject& rParent) : m_rParent(rParent) { }
119 
120 		virtual void SAL_CALL acquire() throw() { m_rParent.acquire(); }
121 		virtual void SAL_CALL release() throw() { m_rParent.release(); }
122 	};
123 
124 	//------------------------------------------------------------------
125 	// declaration of a listener multiplexer class
126 	#define BEGIN_DECLARE_LISTENER_MULTIPLEXER(classname, listenerclass)					\
127 	class classname																			\
128 			:public OSbaWeakSubObject															\
129 			,public listenerclass															\
130 			,public ::cppu::OInterfaceContainerHelper										\
131 	{																						\
132 	public:																					\
133 		classname( ::cppu::OWeakObject& rSource,											\
134 			::osl::Mutex& rMutex);															\
135 		DECLARE_UNO3_DEFAULTS(classname, OSbaWeakSubObject);									\
136 		virtual ::com::sun::star::uno::Any	SAL_CALL queryInterface(						\
137 			const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); \
138 																							\
139 		/* ::com::sun::star::lang::XEventListener */										\
140 		virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);	\
141 
142 
143 	#define DECLARE_MULTIPLEXER_VOID_METHOD(methodname, eventtype)							\
144 		virtual void SAL_CALL methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException); \
145 
146 	#define DECLARE_MULTIPLEXER_BOOL_METHOD(methodname, eventtype)							\
147 		virtual sal_Bool SAL_CALL methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException);	\
148 
149 
150 	#define END_DECLARE_LISTENER_MULTIPLEXER()												\
151 	/* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators */	\
152 		void * SAL_CALL operator new( size_t size ) throw() { return OSbaWeakSubObject::operator new(size); }	\
153 		void SAL_CALL operator delete( void * p ) throw() { OSbaWeakSubObject::operator delete(p); }	\
154 	};																						\
155 
156 	//------------------------------------------------------------------
157 	// implementation of a listener multiplexer class
158 
159 	#define IMPLEMENT_LISTENER_MULTIPLEXER_CORE(classname, listenerclass)					\
160 																							\
161 	/*................................................................*/					\
162 	classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& _rMutex)				\
163 			:OSbaWeakSubObject(rSource)														\
164 			,OInterfaceContainerHelper(_rMutex)												\
165 	{																						\
166 	}																						\
167 																							\
168 	::com::sun::star::uno::Any	SAL_CALL classname::queryInterface(							\
169 		const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException) \
170 	{																						\
171 		::com::sun::star::uno::Any aReturn = 												\
172 			OSbaWeakSubObject::queryInterface(_rType);											\
173 		if (!aReturn.hasValue())															\
174 			aReturn = ::cppu::queryInterface(_rType,										\
175 				static_cast< listenerclass* >(this),										\
176 				static_cast< ::com::sun::star::lang::XEventListener* >(static_cast< listenerclass* >(this))	\
177 			);																				\
178 																							\
179 		return aReturn;																		\
180 	}																						\
181 	/*................................................................*/					\
182 	void SAL_CALL classname::disposing(const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::uno::RuntimeException)\
183 	{																						\
184 	}																						\
185 
186 
187 	#define IMPLEMENT_LISTENER_MULTIPLEXER_VOID_METHOD(classname, listenerclass, methodname, eventtype)	\
188 	void SAL_CALL classname::methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException)	\
189 	{																						\
190 		eventtype aMulti(e);																\
191 		aMulti.Source = &m_rParent;															\
192 		::cppu::OInterfaceIteratorHelper aIt(*this);										\
193 		while (aIt.hasMoreElements())														\
194 			static_cast< listenerclass*>(aIt.next())->methodname(aMulti);				\
195 	}																						\
196 
197 	#define IMPLEMENT_LISTENER_MULTIPLEXER_BOOL_METHOD(classname, listenerclass, methodname, eventtype)	\
198 	/*................................................................*/					\
199 	sal_Bool SAL_CALL classname::methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException)	\
200 	{																						\
201 		eventtype aMulti(e);																\
202 		aMulti.Source = &m_rParent;															\
203 		::cppu::OInterfaceIteratorHelper aIt(*this);										\
204 		sal_Bool bResult = sal_True;														\
205 		while (bResult && aIt.hasMoreElements())											\
206 			bResult = static_cast< listenerclass*>(aIt.next())->methodname(aMulti);		\
207 		return bResult;																		\
208 	}																						\
209 
210 	//------------------------------------------------------------------
211 	// helper for classes which do event multiplexing
212 	#define IMPLEMENT_LISTENER_ADMINISTRATION(classname, listenernamespace, listenerdesc, multiplexer, braodcasterclass, broadcaster) \
213 	/*................................................................*/					\
214 	void SAL_CALL classname::add##listenerdesc(const ::com::sun::star::uno::Reference< ::com::sun::star::listenernamespace::X##listenerdesc >& l) throw(::com::sun::star::uno::RuntimeException)\
215 	{																						\
216 		multiplexer.addInterface(l);															\
217 		if (multiplexer.getLength() == 1)													\
218 		{																					\
219 			::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY);	\
220 			if (xBroadcaster.is())															\
221 				xBroadcaster->add##listenerdesc(&multiplexer);								\
222 		}																					\
223 	}																						\
224 	/*................................................................*/					\
225 	void SAL_CALL classname::remove##listenerdesc(const ::com::sun::star::uno::Reference< ::com::sun::star::listenernamespace::X##listenerdesc >& l) throw(::com::sun::star::uno::RuntimeException)\
226 	{																						\
227 		if (multiplexer.getLength() == 1)													\
228 		{																					\
229 			::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY);	\
230 			if (xBroadcaster.is())															\
231 				xBroadcaster->remove##listenerdesc(&multiplexer);							\
232 		}																					\
233 		multiplexer.removeInterface(l);														\
234 	}																						\
235 
236 
237 	#define STOP_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \
238 	if (multiplexer.getLength())															\
239 	{																					\
240 		::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY);	\
241 		if (xBroadcaster.is())															\
242 			xBroadcaster->remove##listenerdesc(&multiplexer);							\
243 	}																					\
244 
245 	#define START_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \
246 	if (multiplexer.getLength())														\
247 	{																					\
248 		::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY);	\
249 		if (xBroadcaster.is())															\
250 			xBroadcaster->add##listenerdesc(&multiplexer);								\
251 	}																					\
252 
253 
254 
255 	//------------------------------------------------------------------
256 	// declaration of property listener multiplexers
257 	// (with support for specialized and unspecialized property listeners)
258 
259 	#define DECLARE_PROPERTY_MULTIPLEXER(classname, listenerclass, methodname, eventtype, exceptions)	\
260 	class classname																			\
261 			:public OSbaWeakSubObject															\
262 			,public listenerclass															\
263 	{																						\
264 		typedef ::cppu::OMultiTypeInterfaceContainerHelperVar<								\
265 				::rtl::OUString, ::comphelper::UStringHash, ::comphelper::UStringEqual >	ListenerContainerMap;	\
266 		ListenerContainerMap	m_aListeners;												\
267 																							\
268 	public:																					\
269 		classname( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );					\
270 		DECLARE_UNO3_DEFAULTS(classname, OSbaWeakSubObject);									\
271 		virtual ::com::sun::star::uno::Any	SAL_CALL queryInterface(						\
272 			const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); \
273 																							\
274 		/* ::com::sun::star::lang::XEventListener */										\
275 		virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);	\
276 																							\
277 		virtual void SAL_CALL methodname(const eventtype& e)  throw exceptions;				\
278 																							\
279 	public:																					\
280 		void addInterface(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rListener);	\
281 		void removeInterface(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rListener);	\
282 																							\
283 		void disposeAndClear();																\
284 																							\
285 		sal_Int32 getOverallLen() const;													\
286 																							\
287 		::cppu::OInterfaceContainerHelper* getContainer(const ::rtl::OUString& rName)		\
288 			{ return m_aListeners.getContainer(rName); }									\
289 																							\
290 	protected:																				\
291 		void Notify(::cppu::OInterfaceContainerHelper& rListeners, const eventtype& e);		\
292 	};																						\
293 
294 
295 	//------------------------------------------------------------------
296 	// implementation of property listener multiplexers
297 	#define IMPLEMENT_PROPERTY_MULTIPLEXER(classname, listenerclass, methodname, eventtype, exceptions)	\
298 	/*................................................................*/					\
299 	classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex)				\
300 			:OSbaWeakSubObject(rSource)														\
301 			,m_aListeners(rMutex)															\
302 	{																						\
303 	}																						\
304 																							\
305 	::com::sun::star::uno::Any	SAL_CALL classname::queryInterface(							\
306 		const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException) \
307 	{																						\
308 		::com::sun::star::uno::Any aReturn = 												\
309 			OSbaWeakSubObject::queryInterface(_rType);											\
310 		if (!aReturn.hasValue())															\
311 			aReturn = ::cppu::queryInterface(_rType,										\
312 				static_cast< listenerclass* >(this),										\
313 				static_cast< ::com::sun::star::lang::XEventListener* >(static_cast< listenerclass* >(this))	\
314 			);																				\
315 																							\
316 		return aReturn;																		\
317 	}																						\
318 	/*................................................................*/					\
319 	void SAL_CALL classname::disposing(const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::uno::RuntimeException)\
320 	{																						\
321 	}																						\
322 																							\
323 	void SAL_CALL classname::methodname(const eventtype& e) throw exceptions				\
324 	{																						\
325 		::cppu::OInterfaceContainerHelper* pListeners = m_aListeners.getContainer(e.PropertyName);	\
326 		if (pListeners)																		\
327 			Notify(*pListeners, e);															\
328 																							\
329 		/* do the notification for the unspecialized listeners, too */						\
330 		pListeners = m_aListeners.getContainer(::rtl::OUString());							\
331 		if (pListeners)																		\
332 			Notify(*pListeners, e);															\
333 	}																						\
334 																							\
335 	void classname::addInterface(const ::rtl::OUString& rName,								\
336 			const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener)	\
337 	{																						\
338 		m_aListeners.addInterface(rName, rListener);										\
339 	}																						\
340 																							\
341 	void classname::removeInterface(const ::rtl::OUString& rName,							\
342 			const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener)	\
343 	{																						\
344 		m_aListeners.removeInterface(rName, rListener);										\
345 	}																						\
346 																							\
347 	void classname::disposeAndClear()														\
348 	{																						\
349 		::com::sun::star::lang::EventObject aEvt(m_rParent);								\
350 		m_aListeners.disposeAndClear(aEvt);																\
351 	}																						\
352 																							\
353 	sal_Int32 classname::getOverallLen() const												\
354 	{																						\
355 		sal_Int32 nLen = 0;																	\
356 		::com::sun::star::uno::Sequence< ::rtl::OUString > aContained = m_aListeners.getContainedTypes();	\
357 		const ::rtl::OUString* pContained = aContained.getConstArray();						\
358 		for (	sal_Int32 i=0; i<aContained.getLength(); ++i, ++pContained)					\
359 			nLen += m_aListeners.getContainer(*pContained)->getLength();					\
360 		return nLen;																		\
361 	}																						\
362 																							\
363 	void classname::Notify(::cppu::OInterfaceContainerHelper& rListeners, const eventtype& e)	\
364 	{																						\
365 		eventtype aMulti(e);																\
366 		aMulti.Source = &m_rParent;															\
367 		::cppu::OInterfaceIteratorHelper aIt(rListeners);									\
368 		while (aIt.hasMoreElements())														\
369 			static_cast< listenerclass*>(aIt.next())->methodname(aMulti);				\
370 	}																						\
371 
372 	//------------------------------------------------------------------
373 	// helper for classes which do property event multiplexing
374 	#define IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION(classname, listenerdesc, multiplexer, braodcasterclass, broadcaster) \
375 	/*................................................................*/					\
376 	void SAL_CALL classname::add##listenerdesc(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::X##listenerdesc >& l ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)\
377 	{																						\
378 		multiplexer.addInterface(rName, l);													\
379 		if (multiplexer.getOverallLen() == 1)												\
380 		{																					\
381 			::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY);	\
382 			if (xBroadcaster.is())															\
383 				xBroadcaster->add##listenerdesc(::rtl::OUString(), &multiplexer);							\
384 		}																					\
385 	}																						\
386 	/*................................................................*/					\
387 	void SAL_CALL classname::remove##listenerdesc(const ::rtl::OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::X##listenerdesc >& l ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)\
388 	{																						\
389 		if (multiplexer.getOverallLen() == 1)												\
390 		{																					\
391 			::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY);	\
392 			if (xBroadcaster.is())															\
393 				xBroadcaster->remove##listenerdesc(::rtl::OUString(), &multiplexer);						\
394 		}																					\
395 		multiplexer.removeInterface(rName, l);												\
396 	}																						\
397 
398 	#define STOP_PROPERTY_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \
399 	if (multiplexer.getOverallLen())														\
400 	{																						\
401 		::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY);	\
402 		if (xBroadcaster.is())																\
403 			xBroadcaster->remove##listenerdesc(::rtl::OUString(), &multiplexer);							\
404 	}																						\
405 
406 	#define START_PROPERTY_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \
407 	if (multiplexer.getOverallLen())														\
408 	{																						\
409 		::com::sun::star::uno::Reference< braodcasterclass > xBroadcaster(broadcaster, ::com::sun::star::uno::UNO_QUERY);	\
410 		if (xBroadcaster.is())																\
411 			xBroadcaster->add##listenerdesc(::rtl::OUString(), &multiplexer);								\
412 	}																						\
413 
414 
415 
416 	//==================================================================
417 	// some listener multiplexers
418 	//==================================================================
419 	// ::com::sun::star::frame::XStatusListener
420 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXStatusMultiplexer, ::com::sun::star::frame::XStatusListener)
421 		DECLARE_MULTIPLEXER_VOID_METHOD(statusChanged, ::com::sun::star::frame::FeatureStateEvent)
422 
423 	private:
424 		::com::sun::star::frame::FeatureStateEvent	m_aLastKnownStatus;
425 	public:																					\
426 		inline ::com::sun::star::frame::FeatureStateEvent getLastEvent( ) const { return m_aLastKnownStatus; }
427 	END_DECLARE_LISTENER_MULTIPLEXER()
428 
429 	// ::com::sun::star::form::XLoadListener
430 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXLoadMultiplexer, ::com::sun::star::form::XLoadListener)
431 		DECLARE_MULTIPLEXER_VOID_METHOD(loaded, ::com::sun::star::lang::EventObject)
432 		DECLARE_MULTIPLEXER_VOID_METHOD(unloaded, ::com::sun::star::lang::EventObject)
433 		DECLARE_MULTIPLEXER_VOID_METHOD(unloading, ::com::sun::star::lang::EventObject)
434 		DECLARE_MULTIPLEXER_VOID_METHOD(reloading, ::com::sun::star::lang::EventObject)
435 		DECLARE_MULTIPLEXER_VOID_METHOD(reloaded, ::com::sun::star::lang::EventObject)
436 	END_DECLARE_LISTENER_MULTIPLEXER()
437 
438 	// ::com::sun::star::form::XDatabaseParameterListener
439 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXParameterMultiplexer, ::com::sun::star::form::XDatabaseParameterListener)
440 		DECLARE_MULTIPLEXER_BOOL_METHOD(approveParameter, ::com::sun::star::form::DatabaseParameterEvent)
441 	END_DECLARE_LISTENER_MULTIPLEXER()
442 
443 	// ::com::sun::star::form::XSubmitListener
444 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXSubmitMultiplexer, ::com::sun::star::form::XSubmitListener)
445 		DECLARE_MULTIPLEXER_BOOL_METHOD(approveSubmit, ::com::sun::star::lang::EventObject)
446 	END_DECLARE_LISTENER_MULTIPLEXER()
447 
448 	// ::com::sun::star::form::XResetListener
449 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXResetMultiplexer, ::com::sun::star::form::XResetListener)
450 		DECLARE_MULTIPLEXER_BOOL_METHOD(approveReset, ::com::sun::star::lang::EventObject)
451 		DECLARE_MULTIPLEXER_VOID_METHOD(resetted, ::com::sun::star::lang::EventObject)
452 	END_DECLARE_LISTENER_MULTIPLEXER()
453 
454 	// ::com::sun::star::sdbc::XRowSetListener
455 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXRowSetMultiplexer, ::com::sun::star::sdbc::XRowSetListener)
456 		DECLARE_MULTIPLEXER_VOID_METHOD(cursorMoved, ::com::sun::star::lang::EventObject)
457 		DECLARE_MULTIPLEXER_VOID_METHOD(rowChanged, ::com::sun::star::lang::EventObject)
458 		DECLARE_MULTIPLEXER_VOID_METHOD(rowSetChanged, ::com::sun::star::lang::EventObject)
459 	END_DECLARE_LISTENER_MULTIPLEXER()
460 
461 	// ::com::sun::star::sdb::XRowSetApproveListener
462 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXRowSetApproveMultiplexer, ::com::sun::star::sdb::XRowSetApproveListener)
463 		DECLARE_MULTIPLEXER_BOOL_METHOD(approveCursorMove, ::com::sun::star::lang::EventObject)
464 		DECLARE_MULTIPLEXER_BOOL_METHOD(approveRowChange, ::com::sun::star::sdb::RowChangeEvent)
465 		DECLARE_MULTIPLEXER_BOOL_METHOD(approveRowSetChange, ::com::sun::star::lang::EventObject)
466 	END_DECLARE_LISTENER_MULTIPLEXER()
467 
468 	// ::com::sun::star::sdb::XSQLErrorListener
469 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXSQLErrorMultiplexer, ::com::sun::star::sdb::XSQLErrorListener)
470 		DECLARE_MULTIPLEXER_VOID_METHOD(errorOccured, ::com::sun::star::sdb::SQLErrorEvent)
471 	END_DECLARE_LISTENER_MULTIPLEXER()
472 
473 	// ::com::sun::star::beans::XPropertyChangeListener
474 	DECLARE_PROPERTY_MULTIPLEXER(SbaXPropertyChangeMultiplexer, ::com::sun::star::beans::XPropertyChangeListener, propertyChange, ::com::sun::star::beans::PropertyChangeEvent, (::com::sun::star::uno::RuntimeException))
475 
476 	// ::com::sun::star::beans::XVetoableChangeListener
477 	DECLARE_PROPERTY_MULTIPLEXER(SbaXVetoableChangeMultiplexer, ::com::sun::star::beans::XVetoableChangeListener, vetoableChange, ::com::sun::star::beans::PropertyChangeEvent, (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException))
478 
479 	// ::com::sun::star::beans::XPropertiesChangeListener
480 	BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXPropertiesChangeMultiplexer, ::com::sun::star::beans::XPropertiesChangeListener)
481 		DECLARE_MULTIPLEXER_VOID_METHOD(propertiesChange, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >)
482 	END_DECLARE_LISTENER_MULTIPLEXER()
483 	// the SbaXPropertiesChangeMultiplexer doesn't care about the property names a listener logs on for, it simply
484 	// forwards _all_ changes to _all_ listeners
485 }
486 
487 #endif // _SBA_MULTIPLEXER_HXX
488 
489