Update ooo320-m1
[ooovba.git] / extensions / source / dbpilots / unoautopilot.hxx
blobb08e880888db5d3df681c4b000108a50bfe626e2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoautopilot.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
32 #define _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_
34 #include <svtools/genericunodialog.hxx>
35 #include <comphelper/proparrhlp.hxx>
36 #include "componentmodule.hxx"
37 #include <cppuhelper/typeprovider.hxx>
38 #include <com/sun/star/beans/XPropertySet.hpp>
39 #include <com/sun/star/beans/PropertyValue.hpp>
41 //.........................................................................
42 namespace dbp
44 //.........................................................................
46 //=====================================================================
47 //= IServiceInfo
48 //=====================================================================
49 /** interface for the SERVICEINFO template parameter of the OUnoAutoPilot class
51 struct IServiceInfo
53 public:
54 ::rtl::OUString getImplementationName() const;
55 ::com::sun::star::uno::Sequence< ::rtl::OUString >
56 getServiceNames() const;
59 //=====================================================================
60 //= OUnoAutoPilot
61 //=====================================================================
62 typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base;
63 template <class TYPE, class SERVICEINFO>
64 class OUnoAutoPilot
65 :public OUnoAutoPilot_Base
66 ,public ::comphelper::OPropertyArrayUsageHelper< OUnoAutoPilot< TYPE, SERVICEINFO > >
67 ,public OModuleResourceClient
69 OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
71 protected:
72 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
73 m_xObjectModel;
75 public:
76 // XTypeProvider
77 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
79 // XServiceInfo
80 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
81 virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
83 // XServiceInfo - static methods
84 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
85 static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
86 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
87 SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
89 // XPropertySet
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
91 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
93 // OPropertyArrayUsageHelper
94 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
96 protected:
97 // OGenericUnoDialog overridables
98 virtual Dialog* createDialog(Window* _pParent);
99 virtual void implInitialize(const com::sun::star::uno::Any& _rValue);
102 #include "unoautopilot.inl"
104 //.........................................................................
105 } // namespace dbp
106 //.........................................................................
108 #endif // _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_