merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / core / inc / PropertyForward.hxx
blob0ca98fec65e08ddeac440e11d59b30a662dea261
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: PropertyForward.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
30 #ifndef DBA_PROPERTYSETFORWARD_HXX
31 #define DBA_PROPERTYSETFORWARD_HXX
33 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
34 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
35 #endif
36 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
37 #include <com/sun/star/beans/XPropertySet.hpp>
38 #endif
39 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
40 #include <com/sun/star/beans/XPropertySetInfo.hpp>
41 #endif
42 #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
43 #include <com/sun/star/container/XNameContainer.hpp>
44 #endif
45 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
46 #include <cppuhelper/implbase1.hxx>
47 #endif
48 #ifndef _COMPHELPER_BROADCASTHELPER_HXX_
49 #include <comphelper/broadcasthelper.hxx>
50 #endif
52 #include <vector>
54 //........................................................................
55 namespace dbaccess
57 //........................................................................
58 typedef ::cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener
59 > OPropertyForward_Base;
60 class OPropertyForward : public ::comphelper::OBaseMutex
61 ,public OPropertyForward_Base
63 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xSource;
64 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xDest;
65 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> m_xDestInfo;
66 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xDestContainer;
67 ::rtl::OUString m_sName;
68 sal_Bool m_bInInsert;
69 protected:
70 virtual ~OPropertyForward();
71 public:
72 OPropertyForward(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xSource
73 ,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xDestContainer
74 ,const ::rtl::OUString& _sName
75 ,const ::std::vector< ::rtl::OUString>& _aPropertyList = ::std::vector< ::rtl::OUString>());
77 // ::com::sun::star::beans::XPropertyChangeListener
78 virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw(::com::sun::star::uno::RuntimeException);
80 // ::com::sun::star::lang::XEventListener
81 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException);
83 inline void setName(const ::rtl::OUString& _sName) { m_sName = _sName; }
84 void setDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xDest);
85 inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getDefinition() const { return m_xDest;}
87 //........................................................................
88 } // namespace dbaccess
89 //........................................................................
90 #endif // DBA_PROPERTYSETFORWARD_HXX