tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / reportdesign / inc / PropertyForward.hxx
bloba943eaa0e2802c3f7ccf6a07ed89275f0d390dce
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_REPORTDESIGN_INC_PROPERTYFORWARD_HXX
20 #define INCLUDED_REPORTDESIGN_INC_PROPERTYFORWARD_HXX
22 #include <config_options.h>
23 #include "dllapi.h"
24 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/beans/XPropertySetInfo.hpp>
27 #include <cppuhelper/compbase.hxx>
28 #include <cppuhelper/basemutex.hxx>
29 #include "RptDef.hxx"
32 namespace rptui
35 typedef ::cppu::WeakComponentImplHelper< css::beans::XPropertyChangeListener
36 > OPropertyForward_Base;
38 /** \class OPropertyMediator
39 * \brief This class ensures the communication between two XPropertySet instances.
40 * Identical properties will be set at the other propertyset.
41 * \ingroup reportdesign_source_ui_misc
43 class UNLESS_MERGELIBS_MORE(REPORTDESIGN_DLLPUBLIC) OPropertyMediator final : public ::cppu::BaseMutex
44 ,public OPropertyForward_Base
46 TPropertyNamePair m_aNameMap;
47 css::uno::Reference< css::beans::XPropertySet> m_xSource;
48 css::uno::Reference< css::beans::XPropertySetInfo> m_xSourceInfo;
49 css::uno::Reference< css::beans::XPropertySet> m_xDest;
50 css::uno::Reference< css::beans::XPropertySetInfo> m_xDestInfo;
51 bool m_bInChange;
52 OPropertyMediator(OPropertyMediator const &) = delete;
53 void operator =(OPropertyMediator const &) = delete;
55 virtual ~OPropertyMediator() override;
57 /** this function is called upon disposing the component
59 virtual void SAL_CALL disposing() override;
60 public:
61 OPropertyMediator(const css::uno::Reference< css::beans::XPropertySet>& _xSource
62 ,const css::uno::Reference< css::beans::XPropertySet>& _xDest
63 ,TPropertyNamePair&& _aNameMap
64 ,bool _bReverse = false);
66 // css::beans::XPropertyChangeListener
67 virtual void SAL_CALL propertyChange( const css::beans::PropertyChangeEvent& evt ) override;
69 // css::lang::XEventListener
70 virtual void SAL_CALL disposing( const css::lang::EventObject& _rSource ) override;
72 /** stop the listening mode.
74 void stopListening();
76 /** starts the listening mode again.
78 void startListening();
81 } // namespace rptui
83 #endif // INCLUDED_REPORTDESIGN_INC_PROPERTYFORWARD_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */