LibreOffice Module reportdesign (master) 1
DataProviderHandler.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#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATAPROVIDERHANDLER_HXX
21#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATAPROVIDERHANDLER_HXX
22
23#include <sal/config.h>
24
27
28#include <com/sun/star/uno/XComponentContext.hpp>
29#include <com/sun/star/inspection/XPropertyHandler.hpp>
30#include <com/sun/star/chart2/XChartDocument.hpp>
31#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
32#include <com/sun/star/report/XReportComponent.hpp>
33#include <com/sun/star/script/XTypeConverter.hpp>
34#include <com/sun/star/lang/XServiceInfo.hpp>
35
36
37namespace rptui
38{
39
40
41 class OPropertyInfoService;
42
43 typedef ::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler
44 , css::lang::XServiceInfo> DataProviderHandler_Base;
45
47 private ::cppu::BaseMutex,
49 {
50 public:
51 explicit DataProviderHandler(css::uno::Reference< css::uno::XComponentContext > context);
52 private:
53
54 // XServiceInfo
55 virtual OUString SAL_CALL getImplementationName( ) override;
56 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
57 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
58
59 // css::lang::XComponent:
60 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & xListener) override;
61 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;
62
63 // css::inspection::XPropertyHandler:
64 virtual void SAL_CALL inspect(const css::uno::Reference< css::uno::XInterface > & Component) override;
65 virtual css::uno::Any SAL_CALL getPropertyValue(const OUString & PropertyName) override;
66 virtual void SAL_CALL setPropertyValue(const OUString & PropertyName, const css::uno::Any & Value) override;
67 virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString & PropertyName) override;
68 virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString& PropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory >& ControlFactory ) override;
69 virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString & PropertyName, const css::uno::Any & ControlValue) override;
70 virtual css::uno::Any SAL_CALL convertToControlValue(const OUString & PropertyName, const css::uno::Any & PropertyValue, const css::uno::Type & ControlValueType) override;
71 virtual void SAL_CALL addPropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > & Listener) override;
72 virtual void SAL_CALL removePropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > & _rxListener) override;
73 virtual css::uno::Sequence< css::beans::Property > SAL_CALL getSupportedProperties() override;
74 virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override;
75 virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override;
76 virtual sal_Bool SAL_CALL isComposable(const OUString & PropertyName) override;
77 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;
78 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;
79 virtual sal_Bool SAL_CALL suspend(sal_Bool Suspend) override;
80
81 protected:
82 virtual ~DataProviderHandler() override {}
83 private:
85 void operator =(DataProviderHandler const &) = delete;
86
87
88 bool impl_dialogLinkedFields_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
89 bool impl_dialogChartType_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
90 void impl_updateChartTitle_throw(const css::uno::Any& _aValue);
91
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;
97
98 css::uno::Reference< css::uno::XComponentContext > m_xContext;
99 css::uno::Reference< css::inspection::XPropertyHandler > m_xFormComponentHandler;
100 css::uno::Reference< css::chart2::data::XDatabaseDataProvider> m_xDataProvider;
101 css::uno::Reference< css::uno::XInterface > m_xFormComponent;
102 css::uno::Reference< css::report::XReportComponent > m_xReportComponent;
103 css::uno::Reference< css::chart2::XChartDocument> m_xChartModel;
104 css::uno::Reference< css::beans::XPropertyChangeListener > m_xMasterDetails;
106 css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter;
107 };
108
109} // namespace rptui
110
111
112#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATAPROVIDERHANDLER_HXX
113
114/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Any SAL_CALL convertToControlValue(const OUString &PropertyName, const css::uno::Any &PropertyValue, const css::uno::Type &ControlValueType) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString &PropertyName, const css::uno::Any &ControlValue) override
virtual ~DataProviderHandler() override
virtual void SAL_CALL disposing() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::report::XReportComponent > m_xReportComponent
inspectee
css::uno::Reference< css::beans::XPropertyChangeListener > m_xMasterDetails
css::uno::Reference< css::uno::XComponentContext > m_xContext
void impl_updateChartTitle_throw(const css::uno::Any &_aValue)
virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override
bool impl_dialogChartType_nothrow(::osl::ClearableMutexGuard &_rClearBeforeDialog) const
bool impl_dialogLinkedFields_nothrow(::osl::ClearableMutexGuard &_rClearBeforeDialog) const
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override
css::uno::Reference< css::chart2::data::XDatabaseDataProvider > m_xDataProvider
delegatee
DataProviderHandler(css::uno::Reference< css::uno::XComponentContext > context)
virtual void SAL_CALL setPropertyValue(const OUString &PropertyName, const css::uno::Any &Value) override
virtual sal_Bool SAL_CALL isComposable(const OUString &PropertyName) override
virtual void SAL_CALL addPropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &Listener) override
DataProviderHandler(DataProviderHandler const &)=delete
css::uno::Reference< css::chart2::XChartDocument > m_xChartModel
inspectee
virtual void SAL_CALL removePropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) override
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
virtual css::uno::Sequence< css::beans::Property > SAL_CALL getSupportedProperties() override
virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString &PropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory > &ControlFactory) override
css::uno::Reference< css::uno::XInterface > m_xFormComponent
inspectee
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual OUString SAL_CALL getImplementationName() override
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
virtual void SAL_CALL inspect(const css::uno::Reference< css::uno::XInterface > &Component) override
css::uno::Reference< css::inspection::XPropertyHandler > m_xFormComponentHandler
void operator=(DataProviderHandler const &)=delete
virtual sal_Bool SAL_CALL suspend(sal_Bool Suspend) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
type converter, needed on various occasions
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler, css::lang::XServiceInfo > DataProviderHandler_Base
::std::pair< MetaAction *, int > Component
unsigned char sal_Bool