LibreOffice Module reportdesign (master)  1
PropertyForward.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_REPORTDESIGN_INC_PROPERTYFORWARD_HXX
20 #define INCLUDED_REPORTDESIGN_INC_PROPERTYFORWARD_HXX
21 
22 #include "dllapi.h"
23 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/beans/XPropertySetInfo.hpp>
26 #include <cppuhelper/compbase.hxx>
27 #include <cppuhelper/basemutex.hxx>
28 #include "RptDef.hxx"
29 
30 
31 namespace rptui
32 {
33 
34  typedef ::cppu::WeakComponentImplHelper< css::beans::XPropertyChangeListener
36 
43  ,public OPropertyForward_Base
44  {
46  css::uno::Reference< css::beans::XPropertySet> m_xSource;
47  css::uno::Reference< css::beans::XPropertySetInfo> m_xSourceInfo;
48  css::uno::Reference< css::beans::XPropertySet> m_xDest;
49  css::uno::Reference< css::beans::XPropertySetInfo> m_xDestInfo;
51  OPropertyMediator(OPropertyMediator const &) = delete;
52  void operator =(OPropertyMediator const &) = delete;
53 
54  virtual ~OPropertyMediator() override;
55 
58  virtual void SAL_CALL disposing() override;
59  public:
60  OPropertyMediator(const css::uno::Reference< css::beans::XPropertySet>& _xSource
61  ,const css::uno::Reference< css::beans::XPropertySet>& _xDest
62  ,TPropertyNamePair&& _aNameMap
63  ,bool _bReverse = false);
64 
65  // css::beans::XPropertyChangeListener
66  virtual void SAL_CALL propertyChange( const css::beans::PropertyChangeEvent& evt ) override;
67 
68  // css::lang::XEventListener
69  virtual void SAL_CALL disposing( const css::lang::EventObject& _rSource ) override;
70 
73  void stopListening();
74 
77  void startListening();
78  };
79 
80 } // namespace rptui
81 
82 #endif // INCLUDED_REPORTDESIGN_INC_PROPERTYFORWARD_HXX
83 
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::map< OUString, TPropertyConverter > TPropertyNamePair
Definition: RptDef.hxx:73
#define REPORTDESIGN_DLLPUBLIC
Definition: dllapi.h:28
::cppu::WeakComponentImplHelper< css::beans::XPropertyChangeListener > OPropertyForward_Base
css::uno::Reference< css::beans::XPropertySetInfo > m_xDestInfo
This class ensures the communication between two XPropertySet instances.
css::uno::Reference< css::beans::XPropertySet > m_xDest
css::uno::Reference< css::beans::XPropertySetInfo > m_xSourceInfo
TPropertyNamePair m_aNameMap
css::uno::Reference< css::beans::XPropertySet > m_xSource