tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / UnoControls / source / inc / framecontrol.hxx
blobf8b5cd423582600e10685e05bf6050d1f1fcac1a
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 .
20 #pragma once
22 #include <com/sun/star/lang/XConnectionPointContainer.hpp>
23 #include <cppuhelper/propshlp.hxx>
24 #include <rtl/ref.hxx>
26 #include <basecontrol.hxx>
28 namespace com::sun::star::beans { struct PropertyValue; }
29 namespace com::sun::star::frame { class XFrame2; }
30 namespace unocontrols { class OConnectionPointContainerHelper; }
32 namespace unocontrols {
34 using FrameControl_BASE = cppu::ImplInheritanceHelper<BaseControl, css::awt::XControlModel,
35 css::lang::XConnectionPointContainer>;
37 class FrameControl final : public FrameControl_BASE // This order is necessary for right initialization of m_aMutex!
38 , public ::cppu::OBroadcastHelper
39 , public ::cppu::OPropertySetHelper
41 public:
43 FrameControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
45 virtual ~FrameControl() override;
47 // XInterface
49 virtual css::uno::Any SAL_CALL queryInterface(
50 const css::uno::Type& aType
51 ) override;
53 /**
54 @short increment refcount
55 @seealso XInterface
56 @seealso release()
57 @onerror A RuntimeException is thrown.
60 virtual void SAL_CALL acquire() noexcept override;
62 /**
63 @short decrement refcount
64 @seealso XInterface
65 @seealso acquire()
66 @onerror A RuntimeException is thrown.
69 virtual void SAL_CALL release() noexcept override;
71 // XTypeProvider
73 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
75 OUString SAL_CALL getImplementationName() override;
77 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
79 // XControl
81 virtual void SAL_CALL createPeer(
82 const css::uno::Reference< css::awt::XToolkit >& xToolkit ,
83 const css::uno::Reference< css::awt::XWindowPeer >& xParent
84 ) override;
86 virtual sal_Bool SAL_CALL setModel(
87 const css::uno::Reference< css::awt::XControlModel >& xModel
88 ) override;
90 virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override;
92 // XComponent
94 virtual void SAL_CALL dispose() override;
96 // XView
98 virtual sal_Bool SAL_CALL setGraphics(
99 const css::uno::Reference< css::awt::XGraphics >& xDevice
100 ) override;
102 virtual css::uno::Reference< css::awt::XGraphics > SAL_CALL getGraphics() override;
104 // XConnectionPointContainer
106 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getConnectionPointTypes() override;
108 virtual css::uno::Reference< css::lang::XConnectionPoint > SAL_CALL queryConnectionPoint(
109 const css::uno::Type& aType
110 ) override;
112 virtual void SAL_CALL advise(
113 const css::uno::Type& aType ,
114 const css::uno::Reference< css::uno::XInterface >& xListener
115 ) override;
117 virtual void SAL_CALL unadvise(
118 const css::uno::Type& aType ,
119 const css::uno::Reference< css::uno::XInterface >& xListener
120 ) override;
122 private:
124 using OPropertySetHelper::getFastPropertyValue;
126 // OPropertySetHelper
128 virtual sal_Bool SAL_CALL convertFastPropertyValue(
129 css::uno::Any& rConvertedValue ,
130 css::uno::Any& rOldValue ,
131 sal_Int32 nHandle ,
132 const css::uno::Any& rValue
133 ) override;
135 virtual void SAL_CALL setFastPropertyValue_NoBroadcast(
136 sal_Int32 nHandle ,
137 const css::uno::Any& rValue
138 ) override;
140 virtual void SAL_CALL getFastPropertyValue( css::uno::Any& rValue ,
141 sal_Int32 nHandle ) const override;
143 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
145 // XPropertySet
147 css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
149 // BaseControl
151 virtual css::awt::WindowDescriptor impl_getWindowDescriptor(
152 const css::uno::Reference< css::awt::XWindowPeer >& xParentPeer
153 ) override;
155 void impl_createFrame( const css::uno::Reference< css::awt::XWindowPeer >& xPeer ,
156 const OUString& sURL ,
157 const css::uno::Sequence< css::beans::PropertyValue >& seqArguments );
159 css::uno::Reference< css::frame::XFrame2 > m_xFrame;
160 OUString m_sComponentURL;
161 css::uno::Sequence< css::beans::PropertyValue > m_seqLoaderArguments;
162 rtl::Reference<OConnectionPointContainerHelper> m_aConnectionPointContainer;
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */