LibreOffice Module reportdesign (master) 1
ReportControllerObserver.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_SOURCE_UI_INC_REPORTCONTROLLEROBSERVER_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_REPORTCONTROLLEROBSERVER_HXX
21
22#include <com/sun/star/beans/XPropertyChangeListener.hpp>
23#include <com/sun/star/beans/PropertyChangeEvent.hpp>
24#include <com/sun/star/container/XChild.hpp>
26#include <osl/mutex.hxx>
27#include <tools/link.hxx>
29#include "FixedTextColor.hxx"
30#include <memory>
31#include <vector>
32
33
34class VclSimpleEvent;
35
36namespace rptui
37{
38 class OReportController;
39 class OXReportControllerObserverImpl;
40
41
43 : public ::cppu::WeakImplHelper< css::beans::XPropertyChangeListener
44 , css::container::XContainerListener
45 , css::util::XModifyListener
46 >
47 {
48
49 ::std::vector< css::uno::Reference< css::container::XChild> > m_aSections;
50 ::osl::Mutex m_aMutex;
51 oslInterlockedCount m_nLocks;
54
55 // do not allow copy
58 virtual ~OXReportControllerObserver() override; // UNO Object must have private destructor!
59 public:
61
62 // XPropertyChangeListener
63 virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override;
64
65 // XEventListener
66 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
67
68 // XContainerListener
69 virtual void SAL_CALL elementInserted(const css::container::ContainerEvent& rEvent) override;
70 virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& rEvent) override;
71 virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent& rEvent) override;
72
73 // XModifyListener
74 virtual void SAL_CALL modified( const css::lang::EventObject& aEvent ) override;
75
76
77 void AddElement(const css::uno::Reference< css::uno::XInterface>& Element);
78 void RemoveElement(const css::uno::Reference< css::uno::XInterface>& Element);
79
80 void AddSection( const css::uno::Reference< css::report::XSection>& _xSection);
81 void RemoveSection( const css::uno::Reference< css::report::XSection>& _xSection );
82
88 {
90 public:
93 };
94
95 void Lock();
96 void UnLock();
97
98 void Clear();
99 private:
100
101 void switchListening( const css::uno::Reference< css::container::XIndexAccess >& _rxContainer, bool _bStartListening );
102 void switchListening( const css::uno::Reference< css::uno::XInterface >& _rxObject, bool _bStartListening );
103
104 DECL_LINK(SettingsChanged, VclSimpleEvent&, void );
105 };
106
107} // namespace rptui
108
109#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_REPORTCONTROLLEROBSERVER_HXX
110
111
112/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Create an object ob OUndoEnvLock locks the undo possibility As long as in the OUndoEnvLock scope,...
OEnvLock(OXReportControllerObserver &_rObserver)
::std::vector< css::uno::Reference< css::container::XChild > > m_aSections
OXReportControllerObserver(const OXReportControllerObserver &)=delete
void AddSection(const css::uno::Reference< css::report::XSection > &_xSection)
void RemoveSection(const css::uno::Reference< css::report::XSection > &_xSection)
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &rEvent) override
void AddElement(const css::uno::Reference< css::uno::XInterface > &Element)
FormattedFieldBeautifier m_aFormattedFieldBeautifier
void switchListening(const css::uno::Reference< css::container::XIndexAccess > &_rxContainer, bool _bStartListening)
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &rEvent) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
DECL_LINK(SettingsChanged, VclSimpleEvent &, void)
OXReportControllerObserver & operator=(const OXReportControllerObserver &)=delete
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
void RemoveElement(const css::uno::Reference< css::uno::XInterface > &Element)
void switchListening(const css::uno::Reference< css::uno::XInterface > &_rxObject, bool _bStartListening)
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &rEvent) override