bump product version to 4.1.6.2
[LibreOffice.git] / extensions / source / dbpilots / unoautopilot.hxx
blob477f7ab34aae97a0f4c7dc1719f2b866156dfde3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
21 #define _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
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>
31 //.........................................................................
32 namespace dbp
34 //.........................................................................
36 //=====================================================================
37 //= IServiceInfo
38 //=====================================================================
39 /** interface for the SERVICEINFO template parameter of the OUnoAutoPilot class
41 struct IServiceInfo
43 public:
44 OUString getImplementationName() const;
45 ::com::sun::star::uno::Sequence< OUString >
46 getServiceNames() const;
49 //=====================================================================
50 //= OUnoAutoPilot
51 //=====================================================================
52 typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base;
53 template <class TYPE, class SERVICEINFO>
54 class OUnoAutoPilot
55 :public OUnoAutoPilot_Base
56 ,public ::comphelper::OPropertyArrayUsageHelper< OUnoAutoPilot< TYPE, SERVICEINFO > >
57 ,public OModuleResourceClient
59 OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
61 protected:
62 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
63 m_xObjectModel;
65 public:
66 // XTypeProvider
67 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
69 // XServiceInfo
70 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
71 virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
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 >&);
79 // XPropertySet
80 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
81 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
83 // OPropertyArrayUsageHelper
84 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
86 protected:
87 // OGenericUnoDialog overridables
88 virtual Dialog* createDialog(Window* _pParent);
89 virtual void implInitialize(const com::sun::star::uno::Any& _rValue);
92 #include "unoautopilot.inl"
94 //.........................................................................
95 } // namespace dbp
96 //.........................................................................
98 #endif // _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */