1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_UCB_SOURCE_CORE_CMDENV_HXX
21 #define INCLUDED_UCB_SOURCE_CORE_CMDENV_HXX
23 #include "cppuhelper/implbase3.hxx"
25 #include "com/sun/star/lang/XInitialization.hpp"
26 #include "com/sun/star/lang/XServiceInfo.hpp"
27 #include "com/sun/star/lang/XSingleServiceFactory.hpp"
28 #include "com/sun/star/ucb/XCommandEnvironment.hpp"
30 namespace ucb_cmdenv
{
32 class UcbCommandEnvironment
:
33 public cppu::WeakImplHelper3
< com::sun::star::lang::XInitialization
,
34 com::sun::star::lang::XServiceInfo
,
35 com::sun::star::ucb::XCommandEnvironment
>
37 com::sun::star::uno::Reference
<
38 com::sun::star::task::XInteractionHandler
> m_xIH
;
39 com::sun::star::uno::Reference
<
40 com::sun::star::ucb::XProgressHandler
> m_xPH
;
43 UcbCommandEnvironment(
44 const com::sun::star::uno::Reference
<
45 com::sun::star::lang::XMultiServiceFactory
>& rXSMgr
);
46 virtual ~UcbCommandEnvironment();
50 initialize( const com::sun::star::uno::Sequence
<
51 com::sun::star::uno::Any
>& aArguments
)
52 throw( com::sun::star::uno::Exception
,
53 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
56 virtual OUString SAL_CALL
getImplementationName()
57 throw ( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
59 virtual sal_Bool SAL_CALL
60 supportsService( const OUString
& ServiceName
)
61 throw ( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
63 virtual com::sun::star::uno::Sequence
< OUString
> SAL_CALL
64 getSupportedServiceNames()
65 throw ( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 // XCommandEnvironment
68 virtual com::sun::star::uno::Reference
<
69 com::sun::star::task::XInteractionHandler
> SAL_CALL
70 getInteractionHandler()
71 throw ( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
72 virtual com::sun::star::uno::Reference
<
73 com::sun::star::ucb::XProgressHandler
> SAL_CALL
75 throw ( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
79 getImplementationName_Static();
80 static com::sun::star::uno::Sequence
< OUString
>
81 getSupportedServiceNames_Static();
83 static com::sun::star::uno::Reference
<
84 com::sun::star::lang::XSingleServiceFactory
>
85 createServiceFactory( const com::sun::star::uno::Reference
<
86 com::sun::star::lang::XMultiServiceFactory
> & rxServiceMgr
);
88 //com::sun::star::uno::Reference<
89 // com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
92 } // namespace ucb_cmdenv
94 #endif // INCLUDED_UCB_SOURCE_CORE_CMDENV_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */