Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
21 : #define _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
22 :
23 : #include <svtools/genericunodialog.hxx>
24 : #include <comphelper/processfactory.hxx>
25 : #include <comphelper/proparrhlp.hxx>
26 : #include "componentmodule.hxx"
27 : #include <cppuhelper/typeprovider.hxx>
28 : #include <com/sun/star/beans/XPropertySet.hpp>
29 : #include <com/sun/star/beans/PropertyValue.hpp>
30 :
31 :
32 : namespace dbp
33 : {
34 :
35 :
36 :
37 : //= IServiceInfo
38 :
39 : /** interface for the SERVICEINFO template parameter of the OUnoAutoPilot class
40 : */
41 : struct IServiceInfo
42 : {
43 : public:
44 : OUString getImplementationName() const;
45 : ::com::sun::star::uno::Sequence< OUString >
46 : getServiceNames() const;
47 : };
48 :
49 :
50 : //= OUnoAutoPilot
51 :
52 : typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base;
53 : template <class TYPE, class SERVICEINFO>
54 0 : class OUnoAutoPilot
55 : :public OUnoAutoPilot_Base
56 : ,public ::comphelper::OPropertyArrayUsageHelper< OUnoAutoPilot< TYPE, SERVICEINFO > >
57 : ,public OModuleResourceClient
58 : {
59 : OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
60 :
61 : protected:
62 : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
63 : m_xObjectModel;
64 :
65 : public:
66 : // XTypeProvider
67 : virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 :
69 : // XServiceInfo
70 : virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
71 : virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
72 :
73 : // XServiceInfo - static methods
74 : static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
75 : static OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
76 : static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
77 : SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
78 :
79 : // XPropertySet
80 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 : virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
82 :
83 : // OPropertyArrayUsageHelper
84 : virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
85 :
86 : protected:
87 : // OGenericUnoDialog overridables
88 : virtual Dialog* createDialog(Window* _pParent) SAL_OVERRIDE;
89 : virtual void implInitialize(const com::sun::star::uno::Any& _rValue) SAL_OVERRIDE;
90 : };
91 :
92 : #include "unoautopilot.inl"
93 :
94 :
95 : } // namespace dbp
96 :
97 :
98 : #endif // _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
99 :
100 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|