1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
35 class OPropertyInfoService
;
37 typedef ::cppu::WeakComponentImplHelper
< css::inspection::XPropertyHandler
38 , css::lang::XServiceInfo
> ReportComponentHandler_Base
;
40 class ReportComponentHandler
:
41 private ::cppu::BaseMutex
,
42 public ReportComponentHandler_Base
45 explicit ReportComponentHandler(css::uno::Reference
< css::uno::XComponentContext
> const & context
);
48 virtual OUString SAL_CALL
getImplementationName( ) override
;
49 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
50 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) override
;
52 // css::lang::XComponent:
53 virtual void SAL_CALL
addEventListener(const css::uno::Reference
< css::lang::XEventListener
> & xListener
) override
;
54 virtual void SAL_CALL
removeEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) override
;
56 // css::inspection::XPropertyHandler:
57 virtual void SAL_CALL
inspect(const css::uno::Reference
< css::uno::XInterface
> & Component
) override
;
58 virtual css::uno::Any SAL_CALL
getPropertyValue(const OUString
& PropertyName
) override
;
59 virtual void SAL_CALL
setPropertyValue(const OUString
& PropertyName
, const css::uno::Any
& Value
) override
;
60 virtual css::beans::PropertyState SAL_CALL
getPropertyState(const OUString
& PropertyName
) override
;
61 virtual css::inspection::LineDescriptor SAL_CALL
describePropertyLine(const OUString
& PropertyName
, const css::uno::Reference
< css::inspection::XPropertyControlFactory
>& ControlFactory
) override
;
62 virtual css::uno::Any SAL_CALL
convertToPropertyValue(const OUString
& PropertyName
, const css::uno::Any
& ControlValue
) override
;
63 virtual css::uno::Any SAL_CALL
convertToControlValue(const OUString
& PropertyName
, const css::uno::Any
& PropertyValue
, const css::uno::Type
& ControlValueType
) override
;
64 virtual void SAL_CALL
addPropertyChangeListener(const css::uno::Reference
< css::beans::XPropertyChangeListener
> & Listener
) override
;
65 virtual void SAL_CALL
removePropertyChangeListener(const css::uno::Reference
< css::beans::XPropertyChangeListener
> & _rxListener
) override
;
66 virtual css::uno::Sequence
< css::beans::Property
> SAL_CALL
getSupportedProperties() override
;
67 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupersededProperties() override
;
68 virtual css::uno::Sequence
< OUString
> SAL_CALL
getActuatingProperties() override
;
69 virtual sal_Bool SAL_CALL
isComposable(const OUString
& PropertyName
) override
;
70 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
;
71 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
;
72 virtual sal_Bool SAL_CALL
suspend(sal_Bool Suspend
) override
;
75 virtual ~ReportComponentHandler() override
{}
77 ReportComponentHandler(ReportComponentHandler
const &) = delete;
78 void operator =(ReportComponentHandler
const &) = delete;
81 // override WeakComponentImplHelperBase::disposing()
82 // This function is called upon disposing the component,
83 // if your component needs special work when it becomes
84 // disposed, do it here.
85 virtual void SAL_CALL
disposing() override
;
87 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
88 css::uno::Reference
< css::inspection::XPropertyHandler
> m_xFormComponentHandler
; /// delegatee
89 css::uno::Reference
< css::uno::XInterface
> m_xFormComponent
; /// inspectee
95 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_REPORTCOMPONENTHANDLER_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */