bump product version to 6.3.0.0.beta1
[LibreOffice.git] / reportdesign / source / ui / inc / DataProviderHandler.hxx
blobf36c39400c5c939784dfd4556854f9bf4c23e708
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_DATAPROVIDERHANDLER_HXX
21 #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATAPROVIDERHANDLER_HXX
23 #include <sal/config.h>
25 #include <cppuhelper/compbase.hxx>
26 #include <cppuhelper/basemutex.hxx>
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>
36 #include <memory>
39 namespace rptui
43 class OPropertyInfoService;
45 typedef ::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler
46 , css::lang::XServiceInfo> DataProviderHandler_Base;
48 class DataProviderHandler:
49 private ::cppu::BaseMutex,
50 public DataProviderHandler_Base
52 public:
53 // XServiceInfo - static versions
54 /// @throws css::uno::RuntimeException
55 static OUString getImplementationName_Static( );
56 /// @throws css::uno::RuntimeException
57 static css::uno::Sequence< OUString > getSupportedServiceNames_static( );
58 static css::uno::Reference< css::uno::XInterface >
59 create(const css::uno::Reference< css::uno::XComponentContext >&);
61 explicit DataProviderHandler(css::uno::Reference< css::uno::XComponentContext > const & context);
62 private:
64 // XServiceInfo
65 virtual OUString SAL_CALL getImplementationName( ) override;
66 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
67 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
69 // css::lang::XComponent:
70 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & xListener) override;
71 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;
73 // css::inspection::XPropertyHandler:
74 virtual void SAL_CALL inspect(const css::uno::Reference< css::uno::XInterface > & Component) override;
75 virtual css::uno::Any SAL_CALL getPropertyValue(const OUString & PropertyName) override;
76 virtual void SAL_CALL setPropertyValue(const OUString & PropertyName, const css::uno::Any & Value) override;
77 virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString & PropertyName) override;
78 virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString& PropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory >& ControlFactory ) override;
79 virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString & PropertyName, const css::uno::Any & ControlValue) override;
80 virtual css::uno::Any SAL_CALL convertToControlValue(const OUString & PropertyName, const css::uno::Any & PropertyValue, const css::uno::Type & ControlValueType) override;
81 virtual void SAL_CALL addPropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > & Listener) override;
82 virtual void SAL_CALL removePropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > & _rxListener) override;
83 virtual css::uno::Sequence< css::beans::Property > SAL_CALL getSupportedProperties() override;
84 virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override;
85 virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override;
86 virtual sal_Bool SAL_CALL isComposable(const OUString & PropertyName) override;
87 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;
88 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;
89 virtual sal_Bool SAL_CALL suspend(sal_Bool Suspend) override;
91 protected:
92 virtual ~DataProviderHandler() override {}
93 private:
94 DataProviderHandler(DataProviderHandler const &) = delete;
95 void operator =(DataProviderHandler const &) = delete;
98 bool impl_dialogLinkedFields_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
99 bool impl_dialogChartType_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
100 void impl_updateChartTitle_throw(const css::uno::Any& _aValue);
102 // override WeakComponentImplHelperBase::disposing()
103 // This function is called upon disposing the component,
104 // if your component needs special work when it becomes
105 // disposed, do it here.
106 virtual void SAL_CALL disposing() override;
108 css::uno::Reference< css::uno::XComponentContext > m_xContext;
109 css::uno::Reference< css::inspection::XPropertyHandler > m_xFormComponentHandler; /// delegatee
110 css::uno::Reference< css::chart2::data::XDatabaseDataProvider> m_xDataProvider; /// inspectee
111 css::uno::Reference< css::uno::XInterface > m_xFormComponent; /// inspectee
112 css::uno::Reference< css::report::XReportComponent > m_xReportComponent; /// inspectee
113 css::uno::Reference< css::chart2::XChartDocument> m_xChartModel;
114 css::uno::Reference< css::beans::XPropertyChangeListener > m_xMasterDetails;
115 /// type converter, needed on various occasions
116 css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter;
119 } // namespace rptui
122 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATAPROVIDERHANDLER_HXX
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */