LibreOffice Module framework (master) 1
uielementwrapperbase.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 <com/sun/star/ui/XUIElement.hpp>
23#include <com/sun/star/lang/XInitialization.hpp>
24#include <com/sun/star/lang/XComponent.hpp>
25#include <com/sun/star/frame/XFrame.hpp>
26#include <com/sun/star/util/XUpdatable.hpp>
27
28#include <rtl/ustring.hxx>
34
35namespace framework
36{
37
38typedef ::cppu::WeakImplHelper<
39 css::ui::XUIElement,
40 css::lang::XInitialization,
41 css::lang::XComponent,
42 css::util::XUpdatable > UIElementWrapperBase_BASE;
43
48{
49
50 // public methods
51
52 public:
53 UIElementWrapperBase( sal_Int16 nType );
54 virtual ~UIElementWrapperBase() override;
55
56 // XInterface
57 virtual void SAL_CALL acquire() noexcept override
58 { OWeakObject::acquire(); }
59 virtual void SAL_CALL release() noexcept override
60 { OWeakObject::release(); }
61 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& type) override;
62
63 // XTypeProvider
64 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
65
66 // XComponent
67 virtual void SAL_CALL dispose() override = 0;
68 virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
69 virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
70
71 // XInitialization
72 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
73
74 // XUpdatable
75 virtual void SAL_CALL update() override;
76
77 // XUIElement
78 virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getFrame() override;
79 virtual OUString SAL_CALL getResourceURL() override;
80 virtual ::sal_Int16 SAL_CALL getType() override;
81 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getRealInterface() override = 0;
82
83 // protected methods
84
85 protected:
86
87 // OPropertySetHelper
88 virtual sal_Bool SAL_CALL convertFastPropertyValue ( css::uno::Any& aConvertedValue ,
89 css::uno::Any& aOldValue ,
90 sal_Int32 nHandle ,
91 const css::uno::Any& aValue ) override;
92 virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle ,
93 const css::uno::Any& aValue ) override;
95 virtual void SAL_CALL getFastPropertyValue( css::uno::Any& aValue ,
96 sal_Int32 nHandle ) const override;
97 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
98 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
99
100 static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor();
101
104 css::uno::WeakReference< css::frame::XFrame > m_xWeakFrame;
105 sal_Int16 m_nType;
108};
109
110} // namespace framework
111
112/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) SAL_OVERRIDE
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &aValue, sal_Int32 nHandle) const override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor()
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &aConvertedValue, css::uno::Any &aOldValue, sal_Int32 nHandle, const css::uno::Any &aValue) override
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL update() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &type) override
virtual OUString SAL_CALL getResourceURL() override
virtual void SAL_CALL dispose() override=0
comphelper::OMultiTypeInterfaceContainerHelper2 m_aListenerContainer
virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getFrame() override
css::uno::WeakReference< css::frame::XFrame > m_xWeakFrame
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &aValue) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getRealInterface() override=0
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
OUString m_aResourceURL
container for ALL Listener
virtual ::sal_Int16 SAL_CALL getType() override
::cppu::WeakImplHelper< css::ui::XUIElement, css::lang::XInitialization, css::lang::XComponent, css::util::XUpdatable > UIElementWrapperBase_BASE
QPRO_FUNC_TYPE nType
unsigned char sal_Bool