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 .
20 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
21 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
23 #include "propertyhandler.hxx"
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <rtl/ref.hxx>
35 class CellBindingHelper
;
36 class IPropertyEnumRepresentation
;
38 class CellBindingPropertyHandler
;
39 typedef HandlerComponentBase
< CellBindingPropertyHandler
> CellBindingPropertyHandler_Base
;
40 class CellBindingPropertyHandler
: public CellBindingPropertyHandler_Base
43 std::unique_ptr
< CellBindingHelper
> m_pHelper
;
44 ::rtl::Reference
< IPropertyEnumRepresentation
> m_pCellExchangeConverter
;
47 explicit CellBindingPropertyHandler(
48 const css::uno::Reference
< css::uno::XComponentContext
>& _rxContext
51 /// @throws css::uno::RuntimeException
52 static OUString
getImplementationName_static( );
53 /// @throws css::uno::RuntimeException
54 static css::uno::Sequence
< OUString
> getSupportedServiceNames_static( );
57 virtual ~CellBindingPropertyHandler() 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::Any SAL_CALL
convertToPropertyValue( const OUString
& _rPropertyName
, const css::uno::Any
& _rControlValue
) override
;
64 virtual css::uno::Any SAL_CALL
convertToControlValue( const OUString
& _rPropertyName
, const css::uno::Any
& _rPropertyValue
, const css::uno::Type
& _rControlValueType
) override
;
65 virtual css::uno::Sequence
< OUString
> SAL_CALL
getActuatingProperties( ) override
;
66 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 _bFirstTimeInit
) override
;
68 // PropertyHandler overridables
69 virtual css::uno::Sequence
< css::beans::Property
>
70 doDescribeSupportedProperties() const override
;
71 virtual void onNewComponent() override
;
74 /** updates a property (UI) whose state depends on more than one other property
76 ->actuatingPropertyChanged is called for certain properties in whose changes
77 we expressed interes (->getActuatingProperty). Now such a property change can
78 result in simple UI updates, for instance another property being enabled or disabled.
80 However, it can also result in a more complex change: The current (UI) state might
81 depend on the value of more than one other property. Those dependent properties (their
82 UI, more precisely) are updated in this method.
85 the ->PropertyId of the dependent property whose UI state is to be updated
88 provides access to the property browser UI. Must not be <NULL/>.
90 void impl_updateDependentProperty_nothrow( PropertyId _nPropId
, const css::uno::Reference
< css::inspection::XObjectInspectorUI
>& _rxInspectorUI
) const;
97 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */