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/proparrhlp.hxx>
25 : #include "componentmodule.hxx"
26 : #include <cppuhelper/typeprovider.hxx>
27 : #include <com/sun/star/beans/XPropertySet.hpp>
28 : #include <com/sun/star/beans/PropertyValue.hpp>
29 :
30 : //.........................................................................
31 : namespace dbp
32 : {
33 : //.........................................................................
34 :
35 : //=====================================================================
36 : //= IServiceInfo
37 : //=====================================================================
38 : /** interface for the SERVICEINFO template parameter of the OUnoAutoPilot class
39 : */
40 : struct IServiceInfo
41 : {
42 : public:
43 : ::rtl::OUString getImplementationName() const;
44 : ::com::sun::star::uno::Sequence< ::rtl::OUString >
45 : getServiceNames() const;
46 : };
47 :
48 : //=====================================================================
49 : //= OUnoAutoPilot
50 : //=====================================================================
51 : typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base;
52 : template <class TYPE, class SERVICEINFO>
53 0 : class OUnoAutoPilot
54 : :public OUnoAutoPilot_Base
55 : ,public ::comphelper::OPropertyArrayUsageHelper< OUnoAutoPilot< TYPE, SERVICEINFO > >
56 : ,public OModuleResourceClient
57 : {
58 : OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
59 :
60 : protected:
61 : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
62 : m_xObjectModel;
63 :
64 : public:
65 : // XTypeProvider
66 : virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
67 :
68 : // XServiceInfo
69 : virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
70 : virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
71 :
72 : // XServiceInfo - static methods
73 : static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
74 : static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
75 : static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
76 : SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
77 :
78 : // XPropertySet
79 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
80 : virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
81 :
82 : // OPropertyArrayUsageHelper
83 : virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
84 :
85 : protected:
86 : // OGenericUnoDialog overridables
87 : virtual Dialog* createDialog(Window* _pParent);
88 : virtual void implInitialize(const com::sun::star::uno::Any& _rValue);
89 : };
90 :
91 : #include "unoautopilot.inl"
92 :
93 : //.........................................................................
94 : } // namespace dbp
95 : //.........................................................................
96 :
97 : #endif // _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
98 :
99 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|