bump product version to 6.3.0.0.beta1
[LibreOffice.git] / reportdesign / source / ui / inc / ReportComponentHandler.hxx
blob98ea53743c4e3f56d6bb1e5c801e11dbf7c3b36f
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 #ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_REPORTCOMPONENTHANDLER_HXX
21 #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_REPORTCOMPONENTHANDLER_HXX
23 #include <sal/config.h>
24 #include <com/sun/star/uno/XComponentContext.hpp>
25 #include <cppuhelper/compbase.hxx>
26 #include <cppuhelper/basemutex.hxx>
27 #include <com/sun/star/inspection/XPropertyHandler.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <memory>
33 namespace rptui
37 class OPropertyInfoService;
39 typedef ::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler
40 , css::lang::XServiceInfo> ReportComponentHandler_Base;
42 class ReportComponentHandler:
43 private ::cppu::BaseMutex,
44 public ReportComponentHandler_Base
46 public:
47 // XServiceInfo - static versions
48 /// @throws css::uno::RuntimeException
49 static OUString getImplementationName_Static( );
50 /// @throws css::uno::RuntimeException
51 static css::uno::Sequence< OUString > getSupportedServiceNames_static( );
52 static css::uno::Reference< css::uno::XInterface >
53 create(const css::uno::Reference< css::uno::XComponentContext >&);
55 public:
56 explicit ReportComponentHandler(css::uno::Reference< css::uno::XComponentContext > const & context);
58 // XServiceInfo
59 virtual OUString SAL_CALL getImplementationName( ) override;
60 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
61 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
63 // css::lang::XComponent:
64 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & xListener) override;
65 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;
67 // css::inspection::XPropertyHandler:
68 virtual void SAL_CALL inspect(const css::uno::Reference< css::uno::XInterface > & Component) override;
69 virtual css::uno::Any SAL_CALL getPropertyValue(const OUString & PropertyName) override;
70 virtual void SAL_CALL setPropertyValue(const OUString & PropertyName, const css::uno::Any & Value) override;
71 virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString & PropertyName) override;
72 virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString& PropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory >& ControlFactory ) override;
73 virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString & PropertyName, const css::uno::Any & ControlValue) override;
74 virtual css::uno::Any SAL_CALL convertToControlValue(const OUString & PropertyName, const css::uno::Any & PropertyValue, const css::uno::Type & ControlValueType) override;
75 virtual void SAL_CALL addPropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > & Listener) override;
76 virtual void SAL_CALL removePropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > & _rxListener) override;
77 virtual css::uno::Sequence< css::beans::Property > SAL_CALL getSupportedProperties() override;
78 virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override;
79 virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override;
80 virtual sal_Bool SAL_CALL isComposable(const OUString & PropertyName) override;
81 virtual css::inspection::InteractiveSelectionResult SAL_CALL onInteractivePropertySelection(const OUString & PropertyName, sal_Bool Primary, css::uno::Any & out_Data, const css::uno::Reference< css::inspection::XObjectInspectorUI > & InspectorUI) override;
82 virtual void SAL_CALL actuatingPropertyChanged(const OUString & ActuatingPropertyName, const css::uno::Any & NewValue, const css::uno::Any & OldValue, const css::uno::Reference< css::inspection::XObjectInspectorUI > & InspectorUI, sal_Bool FirstTimeInit) override;
83 virtual sal_Bool SAL_CALL suspend(sal_Bool Suspend) override;
85 protected:
86 virtual ~ReportComponentHandler() override {}
87 private:
88 ReportComponentHandler(ReportComponentHandler const &) = delete;
89 void operator =(ReportComponentHandler const &) = delete;
92 // override WeakComponentImplHelperBase::disposing()
93 // This function is called upon disposing the component,
94 // if your component needs special work when it becomes
95 // disposed, do it here.
96 virtual void SAL_CALL disposing() override;
98 css::uno::Reference< css::uno::XComponentContext > m_xContext;
99 css::uno::Reference< css::inspection::XPropertyHandler > m_xFormComponentHandler; /// delegatee
100 css::uno::Reference< css::uno::XInterface > m_xFormComponent; /// inspectee
103 } // namespace rptui
106 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_REPORTCOMPONENTHANDLER_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */