Update ooo320-m1
[ooovba.git] / extensions / source / propctrlr / propeventtranslation.hxx
blob99b30696caf85580cd3a6711a772bd7a54c801e7
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: propeventtranslation.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_PROPEVENTTRANSLATION_HXX
32 #define EXTENSIONS_SOURCE_PROPCTRLR_PROPEVENTTRANSLATION_HXX
34 /** === begin UNO includes === **/
35 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
36 /** === end UNO includes === **/
37 #include <cppuhelper/implbase1.hxx>
39 //........................................................................
40 namespace pcr
42 //........................................................................
44 //====================================================================
45 //= PropertyEventTranslation
46 //====================================================================
47 typedef ::cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener
48 > PropertyEventTranslation_Base;
50 class PropertyEventTranslation : public PropertyEventTranslation_Base
52 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >
53 m_xDelegator;
54 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
55 m_xTranslatedEventSource;
57 public:
58 /** constructs the object
59 @throws NullPointerException
60 if <arg>_rxDelegator</arg> is <NULL/>
62 PropertyEventTranslation(
63 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxDelegator,
64 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxTranslatedEventSource
67 inline const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >&
68 getDelegator() const { return m_xDelegator; }
70 protected:
71 // XPropertyChangeListener
72 virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
73 // XEventListener
74 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
76 private:
77 PropertyEventTranslation(); // never implemented
78 PropertyEventTranslation( const PropertyEventTranslation& ); // never implemented
79 PropertyEventTranslation& operator=( const PropertyEventTranslation& ); // never implemented
82 //........................................................................
83 } // namespace pcr
84 //........................................................................
86 #endif // EXTENSIONS_SOURCE_PROPCTRLR_PROPEVENTTRANSLATION_HXX