Bump for 3.6-28
[LibreOffice.git] / extensions / source / propctrlr / cellbindinghandler.hxx
blob8d6d60d83f69e6aeadea56b3c9324232a3162f8b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
30 #define EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
32 #include "propertyhandler.hxx"
34 /** === begin UNO includes === **/
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 /** === end UNO includes === **/
37 #include <rtl/ref.hxx>
39 #include <memory>
41 //........................................................................
42 namespace pcr
44 //........................................................................
46 class CellBindingHelper;
47 class IPropertyEnumRepresentation;
48 //====================================================================
49 //= CellBindingPropertyHandler
50 //====================================================================
51 class CellBindingPropertyHandler;
52 typedef HandlerComponentBase< CellBindingPropertyHandler > CellBindingPropertyHandler_Base;
53 class CellBindingPropertyHandler : public CellBindingPropertyHandler_Base
55 private:
56 ::std::auto_ptr< CellBindingHelper > m_pHelper;
57 ::rtl::Reference< IPropertyEnumRepresentation > m_pCellExchangeConverter;
59 public:
60 CellBindingPropertyHandler(
61 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
64 static ::rtl::OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException);
65 static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException);
67 protected:
68 ~CellBindingPropertyHandler();
70 protected:
71 // XPropertyHandler overriables
72 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& _rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
73 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);
74 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);
75 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);
76 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
77 SAL_CALL getActuatingProperties( ) throw (::com::sun::star::uno::RuntimeException);
78 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);
80 // PropertyHandler overridables
81 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >
82 SAL_CALL doDescribeSupportedProperties() const;
83 virtual void onNewComponent();
85 private:
86 /** updates a property (UI) whose state depends on more than one other property
88 ->actuatingPropertyChanged is called for certain properties in whose changes
89 we expressed interes (->getActuatingProperty). Now such a property change can
90 result in simple UI updates, for instance another property being enabled or disabled.
92 However, it can also result in a more complex change: The current (UI) state might
93 depend on the value of more than one other property. Those dependent properties (their
94 UI, more precisly) are updated in this method.
96 @param _nPropid
97 the ->PropertyId of the dependent property whose UI state is to be updated
99 @param _rxInspectorUI
100 provides access to the property browser UI. Must not be <NULL/>.
102 void impl_updateDependentProperty_nothrow( PropertyId _nPropId, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >& _rxInspectorUI ) const;
105 //........................................................................
106 } // namespace pcr
107 //........................................................................
109 #endif // EXTENSIONS_SOURCE_PROPCTRLR_CELLBINDINGHANDLER_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */