1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cellbindinghandler.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
32 #define EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
34 #include "propertyhandler.hxx"
36 /** === begin UNO includes === **/
37 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
38 /** === end UNO includes === **/
39 #include <rtl/ref.hxx>
43 //........................................................................
46 //........................................................................
48 class CellBindingHelper
;
49 class IPropertyEnumRepresentation
;
50 //====================================================================
51 //= CellBindingPropertyHandler
52 //====================================================================
53 class CellBindingPropertyHandler
;
54 typedef HandlerComponentBase
< CellBindingPropertyHandler
> CellBindingPropertyHandler_Base
;
55 class CellBindingPropertyHandler
: public CellBindingPropertyHandler_Base
58 ::std::auto_ptr
< CellBindingHelper
> m_pHelper
;
59 ::rtl::Reference
< IPropertyEnumRepresentation
> m_pCellExchangeConverter
;
62 CellBindingPropertyHandler(
63 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
66 static ::rtl::OUString SAL_CALL
getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException
);
67 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException
);
70 ~CellBindingPropertyHandler();
73 // XPropertyHandler overriables
74 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& _rPropertyName
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
75 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& _rPropertyName
, const ::com::sun::star::uno::Any
& _rValue
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
76 virtual ::com::sun::star::uno::Any SAL_CALL
convertToPropertyValue( const ::rtl::OUString
& _rPropertyName
, const ::com::sun::star::uno::Any
& _rControlValue
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
77 virtual ::com::sun::star::uno::Any SAL_CALL
convertToControlValue( const ::rtl::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
);
78 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
79 SAL_CALL
getActuatingProperties( ) throw (::com::sun::star::uno::RuntimeException
);
80 virtual void SAL_CALL
actuatingPropertyChanged( const ::rtl::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
);
82 // PropertyHandler overridables
83 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>
84 SAL_CALL
doDescribeSupportedProperties() const;
85 virtual void onNewComponent();
88 /** updates a property (UI) whose state depends on more than one other property
90 ->actuatingPropertyChanged is called for certain properties in whose changes
91 we expressed interes (->getActuatingProperty). Now such a property change can
92 result in simple UI updates, for instance another property being enabled or disabled.
94 However, it can also result in a more complex change: The current (UI) state might
95 depend on the value of more than one other property. Those dependent properties (their
96 UI, more precisly) are updated in this method.
99 the ->PropertyId of the dependent property whose UI state is to be updated
101 @param _rxInspectorUI
102 provides access to the property browser UI. Must not be <NULL/>.
104 void impl_updateDependentProperty_nothrow( PropertyId _nPropId
, const ::com::sun::star::uno::Reference
< ::com::sun::star::inspection::XObjectInspectorUI
>& _rxInspectorUI
) const;
107 //........................................................................
109 //........................................................................
111 #endif // EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX