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 .
19 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMCONTROLLER_HXX
20 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMCONTROLLER_HXX
22 #include "propcontroller.hxx"
24 #include <cppuhelper/propshlp.hxx>
25 #include <comphelper/proparrhlp.hxx>
26 #include <comphelper/uno3.hxx>
36 struct ServiceDescriptor
39 ( *GetImplementationName
)( void );
40 ::com::sun::star::uno::Sequence
< OUString
>
41 ( *GetSupportedServiceNames
)( void );
48 typedef ::cppu::OPropertySetHelper FormController_PropertyBase1
;
49 typedef ::comphelper::OPropertyArrayUsageHelper
< FormController
> FormController_PropertyBase2
;
51 /** Legacy implementation of com.sun.star.form.PropertyBrowserController
53 Nowadays only a wrapper around an ObjectInspector using a
54 DefaultFormComponentInspectorModel.
56 class FormController
:public OPropertyBrowserController
57 ,public FormController_PropertyBase1
58 ,public FormController_PropertyBase2
61 ServiceDescriptor m_aServiceDescriptor
;
62 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>
66 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
,
67 ServiceDescriptor _aServiceDescriptor
,
68 bool _bUseFormFormComponentHandlers
71 // XServiceInfo - static versions
72 static OUString
getImplementationName_static( ) throw(::com::sun::star::uno::RuntimeException
);
73 static ::com::sun::star::uno::Sequence
< OUString
> getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException
);
74 static ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
75 Create(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
78 virtual ~FormController();
81 DECLARE_XTYPEPROVIDER()
84 virtual OUString SAL_CALL
getImplementationName( ) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
85 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
87 // XPropertySet and friends
88 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() SAL_OVERRIDE
;
90 virtual ::cppu::IPropertyArrayHelper
* createArrayHelper( ) const SAL_OVERRIDE
;
92 virtual sal_Bool SAL_CALL
convertFastPropertyValue(
93 ::com::sun::star::uno::Any
& rConvertedValue
, ::com::sun::star::uno::Any
& rOldValue
, sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
94 ) throw (::com::sun::star::lang::IllegalArgumentException
) SAL_OVERRIDE
;
95 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast(
96 sal_Int32 nHandle
, const ::com::sun::star::uno::Any
& rValue
97 ) throw (::com::sun::star::uno::Exception
, std::exception
) SAL_OVERRIDE
;
98 virtual void SAL_CALL
getFastPropertyValue(
99 ::com::sun::star::uno::Any
& rValue
, sal_Int32 nHandle
100 ) const SAL_OVERRIDE
;
102 using FormController_PropertyBase1::getFastPropertyValue
;
108 /** Legacy implementation of com.sun.star.awt.PropertyBrowserController
110 class DialogController
113 // XServiceInfo - static versions
114 static OUString
getImplementationName_static( ) throw(::com::sun::star::uno::RuntimeException
);
115 static ::com::sun::star::uno::Sequence
< OUString
> getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException
);
116 static ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
117 Create(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>&);
120 DialogController( const DialogController
& ) SAL_DELETED_FUNCTION
;
121 DialogController
& operator=( const DialogController
& ) SAL_DELETED_FUNCTION
;
127 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMCONTROLLER_HXX
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */