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_ABP_UNODIALOG_HXX
21 : #define EXTENSIONS_ABP_UNODIALOG_HXX
22 :
23 : #include <svtools/genericunodialog.hxx>
24 : #include <comphelper/proparrhlp.hxx>
25 : #include "componentmodule.hxx"
26 : #include <com/sun/star/task/XJob.hpp>
27 : #include <cppuhelper/implbase1.hxx>
28 :
29 :
30 : namespace abp
31 : {
32 :
33 :
34 :
35 : //= OABSPilotUno
36 :
37 : class OABSPilotUno;
38 : typedef ::svt::OGenericUnoDialog OABSPilotUno_DBase;
39 : typedef ::cppu::ImplHelper1< ::com::sun::star::task::XJob > OABSPilotUno_JBase;
40 : typedef ::comphelper::OPropertyArrayUsageHelper< OABSPilotUno > OABSPilotUno_PBase;
41 : /// the UNO wrapper for the address book source pilot
42 0 : class OABSPilotUno
43 : :public OModuleResourceClient
44 : ,public OABSPilotUno_DBase
45 : ,public OABSPilotUno_JBase
46 : ,public OABSPilotUno_PBase
47 : {
48 : OUString m_sDataSourceName;
49 : OABSPilotUno(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
50 :
51 : public:
52 : // XInterface (disambiguation)
53 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
54 : virtual void SAL_CALL acquire( ) throw () SAL_OVERRIDE;
55 : virtual void SAL_CALL release( ) throw () SAL_OVERRIDE;
56 :
57 : // XTypeProvider
58 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
59 : virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
60 :
61 : // XServiceInfo
62 : virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
63 : virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
64 :
65 : // XServiceInfo - static methods
66 : static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
67 : static OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
68 : static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
69 : SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&);
70 :
71 : // XPropertySet
72 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
73 : virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
74 :
75 : // OPropertyArrayUsageHelper
76 : virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
77 :
78 : // XJob
79 : virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& lArgs ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 :
81 : // XInitialisation
82 : virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
83 :
84 : using OABSPilotUno_DBase::execute;
85 : protected:
86 : // OGenericUnoDialog overridables
87 : virtual Dialog* createDialog(Window* _pParent) SAL_OVERRIDE;
88 : virtual void executedDialog(sal_Int16 _nExecutionResult) SAL_OVERRIDE;
89 : };
90 :
91 :
92 : } // namespace abp
93 :
94 :
95 : #endif // EXTENSIONS_ABP_UNODIALOG_HXX
96 :
97 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|