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 CellBindingPropertyHandler(
48 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
51 static OUString SAL_CALL
getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException
);
52 static ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException
);
55 virtual ~CellBindingPropertyHandler();
58 // XPropertyHandler overriables
59 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
;
60 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
;
61 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
;
62 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
;
63 virtual ::com::sun::star::uno::Sequence
< OUString
>
64 SAL_CALL
getActuatingProperties( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 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 _bFirstTimeInit
) throw (::com::sun::star::lang::NullPointerException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 // PropertyHandler overridables
68 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>
69 SAL_CALL
doDescribeSupportedProperties() const SAL_OVERRIDE
;
70 virtual void onNewComponent() SAL_OVERRIDE
;
73 /** updates a property (UI) whose state depends on more than one other property
75 ->actuatingPropertyChanged is called for certain properties in whose changes
76 we expressed interes (->getActuatingProperty). Now such a property change can
77 result in simple UI updates, for instance another property being enabled or disabled.
79 However, it can also result in a more complex change: The current (UI) state might
80 depend on the value of more than one other property. Those dependent properties (their
81 UI, more precisely) are updated in this method.
84 the ->PropertyId of the dependent property whose UI state is to be updated
87 provides access to the property browser UI. Must not be <NULL/>.
89 void impl_updateDependentProperty_nothrow( PropertyId _nPropId
, const ::com::sun::star::uno::Reference
< ::com::sun::star::inspection::XObjectInspectorUI
>& _rxInspectorUI
) const;
96 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */