bump product version to 5.0.4.1
[LibreOffice.git] / extensions / source / propctrlr / eformspropertyhandler.hxx
blobd3430414d7cf99164119fd523243b9089dc7d568
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 EFormsPropertyHandler(
51 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
54 static OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException);
55 static ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException);
57 protected:
58 virtual ~EFormsPropertyHandler();
60 protected:
61 // XPropertyHandler overriables
62 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& _rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 virtual void SAL_CALL setPropertyValue( const OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
64 virtual ::com::sun::star::uno::Sequence< OUString >
65 SAL_CALL getActuatingProperties( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
66 virtual ::com::sun::star::uno::Sequence< OUString >
67 SAL_CALL getSupersededProperties( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 virtual ::com::sun::star::inspection::LineDescriptor
69 SAL_CALL describePropertyLine( const OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 virtual ::com::sun::star::inspection::InteractiveSelectionResult
71 SAL_CALL onInteractivePropertySelection( const OUString& _rPropertyName, sal_Bool _bPrimary, ::com::sun::star::uno::Any& _rData, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >& _rxInspectorUI ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
72 virtual void SAL_CALL actuatingPropertyChanged( const OUString& _rActuatingPropertyName, const ::com::sun::star::uno::Any& _rNewValue, const ::com::sun::star::uno::Any& _rOldValue, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >& _rxInspectorUI, sal_Bool ) throw (::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
73 virtual ::com::sun::star::uno::Any SAL_CALL convertToPropertyValue( const OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rControlValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
74 virtual ::com::sun::star::uno::Any SAL_CALL convertToControlValue( const OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rPropertyValue, const ::com::sun::star::uno::Type& _rControlValueType ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
75 virtual void SAL_CALL addPropertyChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener ) throw (::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
76 virtual void SAL_CALL removePropertyChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 // PropertyHandler overridables
79 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >
80 SAL_CALL doDescribeSupportedProperties() const SAL_OVERRIDE;
81 virtual void onNewComponent() SAL_OVERRIDE;
83 protected:
84 /** returns the value of the PROPERTY_XML_DATA_MODEL property.
86 An extra method is necessary here, which respects both the value set at our helper,
87 and <member>m_sBindingLessModelName</member>
89 OUString getModelNamePropertyValue() const;
93 } // namespace pcr
96 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_EFORMSPROPERTYHANDLER_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */