LibreOffice Module dbaccess (master) 1
subcomponentmanager.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
20#pragma once
21
22#include <AppElementType.hxx>
23
24#include <com/sun/star/beans/XPropertyChangeListener.hpp>
25#include <com/sun/star/lang/XComponent.hpp>
26
29
30#include <memory>
31
32namespace dbaui
33{
34
35 struct SubComponentManager_Data;
36 class OApplicationController;
37
38 // SubComponentManager
39 typedef ::cppu::WeakImplHelper< css::beans::XPropertyChangeListener
42 {
43 public:
44 SubComponentManager( OApplicationController& _rController, const ::comphelper::SharedMutex& _rMutex );
45 virtual ~SubComponentManager() override;
46
47 void disposing();
48
49 // XPropertyChangeListener
50 virtual void SAL_CALL propertyChange( const css::beans::PropertyChangeEvent& evt ) override;
51
52 // XEventListener
53 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
54
55 // XDatabaseDocumentUI helpers
56 css::uno::Sequence< css::uno::Reference< css::lang::XComponent> >
57 getSubComponents() const;
58 bool closeSubComponents();
59
60 // container access
62 const OUString& _rName,
63 const sal_Int32 _nComponentType,
64 const ElementOpenMode _eOpenMode,
65 const css::uno::Reference< css::lang::XComponent >&
66 _rxComponent
67 );
68 bool empty() const;
69
77 const OUString& _rName,
78 const sal_Int32 _nComponentType,
79 const ElementOpenMode _eOpenMode,
80 css::uno::Reference< css::lang::XComponent >& o_rComponent
81 ) const;
82
92 bool closeSubFrames(
93 std::u16string_view _rName,
94 const sal_Int32 _nComponentType
95 );
96
109 const css::uno::Reference< css::lang::XComponent >& i_rComponent,
110 OUString& o_rName,
111 sal_Int32& o_rComponentType
112 );
113
114 private:
115 std::unique_ptr< SubComponentManager_Data > m_pData;
116 };
117
118} // namespace dbaui
119
120/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool closeSubFrames(std::u16string_view _rName, const sal_Int32 _nComponentType)
closes all frames of the given component
bool lookupSubComponent(const css::uno::Reference< css::lang::XComponent > &i_rComponent, OUString &o_rName, sal_Int32 &o_rComponentType)
searches for the given sub component
void onSubComponentOpened(const OUString &_rName, const sal_Int32 _nComponentType, const ElementOpenMode _eOpenMode, const css::uno::Reference< css::lang::XComponent > &_rxComponent)
std::unique_ptr< SubComponentManager_Data > m_pData
virtual ~SubComponentManager() override
bool activateSubFrame(const OUString &_rName, const sal_Int32 _nComponentType, const ElementOpenMode _eOpenMode, css::uno::Reference< css::lang::XComponent > &o_rComponent) const
activates (i.e.
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
SubComponentManager(OApplicationController &_rController, const ::comphelper::SharedMutex &_rMutex)
css::uno::Sequence< css::uno::Reference< css::lang::XComponent > > getSubComponents() const
::cppu::WeakImplHelper< css::beans::XPropertyChangeListener > SubComponentManager_Base