Files
libreoffice/dbaccess/source/core/inc/PropertyForward.hxx

75 lines
3.5 KiB
C++
Raw Normal View History

2010-10-27 12:33:13 +01:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-06-14 17:39:53 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef DBA_PROPERTYSETFORWARD_HXX
#define DBA_PROPERTYSETFORWARD_HXX
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/broadcasthelper.hxx>
#include <vector>
namespace dbaccess
{
2009-11-03 14:53:24 +01:00
// ===================================================================
// = OPropertyForward
// ===================================================================
typedef ::cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener
> OPropertyForward_Base;
2009-11-03 14:53:24 +01:00
class OPropertyForward :public ::comphelper::OBaseMutex
,public OPropertyForward_Base
{
2009-11-03 14:53:24 +01:00
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSource;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xDest;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > m_xDestInfo;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xDestContainer;
OUString m_sName;
2009-11-03 14:53:24 +01:00
sal_Bool m_bInInsert;
protected:
virtual ~OPropertyForward();
2009-11-03 14:53:24 +01:00
public:
2009-11-03 14:53:24 +01:00
OPropertyForward( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xSource,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xDestContainer,
const OUString& _sName,
const ::std::vector< OUString >& _aPropertyList
2009-11-03 14:53:24 +01:00
);
// ::com::sun::star::beans::XPropertyChangeListener
virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XEventListener
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException);
inline void setName( const OUString& _sName ) { m_sName = _sName; }
2009-11-03 14:53:24 +01:00
void setDefinition( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xDest);
inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getDefinition() const { return m_xDest; }
};
2009-11-03 14:53:24 +01:00
} // namespace dbaccess
#endif // DBA_PROPERTYSETFORWARD_HXX
2010-10-27 12:33:13 +01:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */