1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_FORMCONTROLLER_HXX
28 #define EXTENSIONS_SOURCE_PROPCTRLR_FORMCONTROLLER_HXX
30 #include "propcontroller.hxx"
32 /** === begin UNO includes === **/
33 /** === end UNO includes === **/
34 #include <cppuhelper/propshlp.hxx>
35 #include <comphelper/proparrhlp.hxx>
36 #include <comphelper/uno3.hxx>
38 //........................................................................
41 //........................................................................
43 //====================================================================
45 //====================================================================
46 struct ServiceDescriptor
49 ( *GetImplementationName
)( void );
50 ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
51 ( *GetSupportedServiceNames
)( void );
54 //====================================================================
56 //====================================================================
58 typedef ::cppu::OPropertySetHelper FormController_PropertyBase1
;
59 typedef ::comphelper::OPropertyArrayUsageHelper
< FormController
> FormController_PropertyBase2
;
61 /** Legacy implementation of com.sun.star.form.PropertyBrowserController
63 Nowadays only a wrapper around an ObjectInspector using a
64 DefaultFormComponentInspectorModel.
66 class FormController
:public OPropertyBrowserController
67 ,public FormController_PropertyBase1
68 ,public FormController_PropertyBase2
71 ServiceDescriptor m_aServiceDescriptor
;
72 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>
74 bool m_bUseFormComponentHandlers
;
77 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
,
78 ServiceDescriptor _aServiceDescriptor
,
79 bool _bUseFormFormComponentHandlers
82 // XServiceInfo - static versions
83 static ::rtl::OUString
getImplementationName_static( ) throw(::com::sun::star::uno::RuntimeException
);
84 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException
);
85 static ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
86 Create(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
92 DECLARE_XTYPEPROVIDER()
95 virtual ::rtl::OUString SAL_CALL
getImplementationName( ) throw(::com::sun::star::uno::RuntimeException
);
96 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException
);
98 // XPropertySet and friends
99 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
100 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
101 virtual ::cppu::IPropertyArrayHelper
* createArrayHelper( ) const;
103 virtual sal_Bool SAL_CALL
convertFastPropertyValue(
104 ::com::sun::star::uno::Any
& rConvertedValue
, ::com::sun::star::uno::Any
& rOldValue
, sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
105 ) throw (::com::sun::star::lang::IllegalArgumentException
);
106 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast(
107 sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
108 ) throw (::com::sun::star::uno::Exception
);
109 virtual void SAL_CALL
getFastPropertyValue(
110 ::com::sun::star::uno::Any
& rValue
, sal_Int32 nHandle
113 using FormController_PropertyBase1::getFastPropertyValue
;
116 //====================================================================
118 //====================================================================
119 /** Legacy implementation of com.sun.star.awt.PropertyBrowserController
121 class DialogController
124 // XServiceInfo - static versions
125 static ::rtl::OUString
getImplementationName_static( ) throw(::com::sun::star::uno::RuntimeException
);
126 static ::com::sun::star::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException
);
127 static ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
128 Create(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
131 DialogController(); // never implemented
132 DialogController( const DialogController
& ); // never implemented
133 DialogController
& operator=( const DialogController
& ); // never implemented
135 //........................................................................
137 //........................................................................
139 #endif // EXTENSIONS_SOURCE_PROPCTRLR_FORMCONTROLLER_HXX