Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / extensions / source / propctrlr / eformspropertyhandler.hxx
blobb099ead7ec5d7d6d01c41bc357a6649a5d3c5e9c
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_EXTENSIONS_SOURCE_PROPCTRLR_EFORMSPROPERTYHANDLER_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_EFORMSPROPERTYHANDLER_HXX
23 #include "propertyhandler.hxx"
25 #include <memory>
28 namespace pcr
32 class EFormsHelper;
34 //= EFormsPropertyHandler
36 class EFormsPropertyHandler;
37 typedef HandlerComponentBase< EFormsPropertyHandler > EFormsPropertyHandler_Base;
38 class EFormsPropertyHandler : public EFormsPropertyHandler_Base
40 private:
41 std::unique_ptr< EFormsHelper > m_pHelper;
42 /** current value of the Model property, if there is no binding, yet
44 OUString m_sBindingLessModelName;
45 /** are we currently simulating a propertyChange event of the Model property?
47 bool m_bSimulatingModelChange;
49 public:
50 explicit EFormsPropertyHandler(
51 const css::uno::Reference< css::uno::XComponentContext >& _rxContext
54 /// @throws css::uno::RuntimeException
55 static OUString getImplementationName_static( );
56 /// @throws css::uno::RuntimeException
57 static css::uno::Sequence< OUString > getSupportedServiceNames_static( );
59 protected:
60 virtual ~EFormsPropertyHandler() override;
62 protected:
63 // XPropertyHandler overriables
64 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& _rPropertyName ) override;
65 virtual void SAL_CALL setPropertyValue( const OUString& _rPropertyName, const css::uno::Any& _rValue ) override;
66 virtual css::uno::Sequence< OUString >
67 SAL_CALL getActuatingProperties( ) override;
68 virtual css::uno::Sequence< OUString >
69 SAL_CALL getSupersededProperties( ) override;
70 virtual css::inspection::LineDescriptor
71 SAL_CALL describePropertyLine( const OUString& _rPropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory ) override;
72 virtual css::inspection::InteractiveSelectionResult
73 SAL_CALL onInteractivePropertySelection( const OUString& _rPropertyName, sal_Bool _bPrimary, css::uno::Any& _rData, const css::uno::Reference< css::inspection::XObjectInspectorUI >& _rxInspectorUI ) override;
74 virtual void SAL_CALL actuatingPropertyChanged( const OUString& _rActuatingPropertyName, const css::uno::Any& _rNewValue, const css::uno::Any& _rOldValue, const css::uno::Reference< css::inspection::XObjectInspectorUI >& _rxInspectorUI, sal_Bool ) override;
75 virtual css::uno::Any SAL_CALL convertToPropertyValue( const OUString& _rPropertyName, const css::uno::Any& _rControlValue ) override;
76 virtual css::uno::Any SAL_CALL convertToControlValue( const OUString& _rPropertyName, const css::uno::Any& _rPropertyValue, const css::uno::Type& _rControlValueType ) override;
77 virtual void SAL_CALL addPropertyChangeListener( const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener ) override;
78 virtual void SAL_CALL removePropertyChangeListener( const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener ) override;
80 // PropertyHandler overridables
81 virtual css::uno::Sequence< css::beans::Property >
82 doDescribeSupportedProperties() const override;
83 virtual void onNewComponent() override;
85 protected:
86 /** returns the value of the PROPERTY_XML_DATA_MODEL property.
88 An extra method is necessary here, which respects both the value set at our helper,
89 and <member>m_sBindingLessModelName</member>
91 OUString getModelNamePropertyValue() const;
95 } // namespace pcr
98 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_EFORMSPROPERTYHANDLER_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */