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 DBA_PROPERTYSETFORWARD_HXX 24 #define DBA_PROPERTYSETFORWARD_HXX 25 26 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_ 27 #include <com/sun/star/beans/XPropertyChangeListener.hpp> 28 #endif 29 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ 30 #include <com/sun/star/beans/XPropertySet.hpp> 31 #endif 32 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_ 33 #include <com/sun/star/beans/XPropertySetInfo.hpp> 34 #endif 35 #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ 36 #include <com/sun/star/container/XNameContainer.hpp> 37 #endif 38 #ifndef _CPPUHELPER_IMPLBASE1_HXX_ 39 #include <cppuhelper/implbase1.hxx> 40 #endif 41 #ifndef _COMPHELPER_BROADCASTHELPER_HXX_ 42 #include <comphelper/broadcasthelper.hxx> 43 #endif 44 45 #include <vector> 46 47 //........................................................................ 48 namespace dbaccess 49 { 50 //........................................................................ 51 52 // =================================================================== 53 // = OPropertyForward 54 // =================================================================== 55 typedef ::cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener 56 > OPropertyForward_Base; 57 class OPropertyForward :public ::comphelper::OBaseMutex 58 ,public OPropertyForward_Base 59 { 60 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSource; 61 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xDest; 62 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > m_xDestInfo; 63 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xDestContainer; 64 ::rtl::OUString m_sName; 65 sal_Bool m_bInInsert; 66 67 protected: 68 virtual ~OPropertyForward(); 69 70 public: 71 OPropertyForward( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xSource, 72 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xDestContainer, 73 const ::rtl::OUString& _sName, 74 const ::std::vector< ::rtl::OUString >& _aPropertyList 75 ); 76 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); 79 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); 82 setName(const::rtl::OUString & _sName)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); getDefinition() const85 inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getDefinition() const { return m_xDest; } 86 }; 87 88 //........................................................................ 89 } // namespace dbaccess 90 //........................................................................ 91 #endif // DBA_PROPERTYSETFORWARD_HXX 92 93