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 .
22 #include "propertyhandler.hxx"
33 //= EFormsPropertyHandler
35 class EFormsPropertyHandler
;
36 class EFormsPropertyHandler
: public PropertyHandlerComponent
39 std::unique_ptr
< EFormsHelper
> m_pHelper
;
40 /** current value of the Model property, if there is no binding, yet
42 OUString m_sBindingLessModelName
;
43 /** are we currently simulating a propertyChange event of the Model property?
45 bool m_bSimulatingModelChange
;
48 explicit EFormsPropertyHandler(
49 const css::uno::Reference
< css::uno::XComponentContext
>& _rxContext
53 virtual ~EFormsPropertyHandler() override
;
57 virtual OUString SAL_CALL
getImplementationName() override
;
58 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames () override
;
60 // XPropertyHandler overriables
61 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& _rPropertyName
) override
;
62 virtual void SAL_CALL
setPropertyValue( const OUString
& _rPropertyName
, const css::uno::Any
& _rValue
) override
;
63 virtual css::uno::Sequence
< OUString
>
64 SAL_CALL
getActuatingProperties( ) override
;
65 virtual css::uno::Sequence
< OUString
>
66 SAL_CALL
getSupersededProperties( ) override
;
67 virtual css::inspection::LineDescriptor
68 SAL_CALL
describePropertyLine( const OUString
& _rPropertyName
, const css::uno::Reference
< css::inspection::XPropertyControlFactory
>& _rxControlFactory
) override
;
69 virtual css::inspection::InteractiveSelectionResult
70 SAL_CALL
onInteractivePropertySelection( const OUString
& _rPropertyName
, sal_Bool _bPrimary
, css::uno::Any
& _rData
, const css::uno::Reference
< css::inspection::XObjectInspectorUI
>& _rxInspectorUI
) override
;
71 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
;
72 virtual css::uno::Any SAL_CALL
convertToPropertyValue( const OUString
& _rPropertyName
, const css::uno::Any
& _rControlValue
) override
;
73 virtual css::uno::Any SAL_CALL
convertToControlValue( const OUString
& _rPropertyName
, const css::uno::Any
& _rPropertyValue
, const css::uno::Type
& _rControlValueType
) override
;
74 virtual void SAL_CALL
addPropertyChangeListener( const css::uno::Reference
< css::beans::XPropertyChangeListener
>& _rxListener
) override
;
75 virtual void SAL_CALL
removePropertyChangeListener( const css::uno::Reference
< css::beans::XPropertyChangeListener
>& _rxListener
) override
;
77 // PropertyHandler overridables
78 virtual css::uno::Sequence
< css::beans::Property
>
79 doDescribeSupportedProperties() const override
;
80 virtual void onNewComponent() override
;
83 /** returns the value of the PROPERTY_XML_DATA_MODEL property.
85 An extra method is necessary here, which respects both the value set at our helper,
86 and <member>m_sBindingLessModelName</member>
88 OUString
getModelNamePropertyValue() const;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */