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_FRAMEWORK_INC_RECORDING_DISPATCHRECORDERSUPPLIER_HXX
21 #define INCLUDED_FRAMEWORK_INC_RECORDING_DISPATCHRECORDERSUPPLIER_HXX
23 #include <macros/xinterface.hxx>
24 #include <macros/xtypeprovider.hxx>
25 #include <macros/xserviceinfo.hxx>
26 #include <macros/generic.hxx>
30 #include <com/sun/star/lang/XTypeProvider.hpp>
31 #include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
32 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
33 #include <com/sun/star/util/URL.hpp>
34 #include <com/sun/star/beans/PropertyValue.hpp>
36 #include <cppuhelper/implbase2.hxx>
40 /** @short implement a supplier for dispatch recorder
41 @descr This supplier can be set on property "DispatchRecorderSupplier" on a frame.
42 By using of this supplier and his internal XDispatchRecorder it's possible to
43 record XDispatch::dispatch() requests.
47 class DispatchRecorderSupplier
: public ::cppu::WeakImplHelper2
<
48 css::lang::XServiceInfo
,
49 css::frame::XDispatchRecorderSupplier
>
56 /** provided dispatch recorder of this supplier instance
58 @life Is controlled from outside. Because this variable is setted
59 from there and not created internally. But we release our
60 reference to it if we die.
62 css::uno::Reference
< css::frame::XDispatchRecorder
> m_xDispatchRecorder
;
68 // XInterface, XTypeProvider, XServiceInfo
72 // XDispatchRecorderSupplier
74 virtual void SAL_CALL
setDispatchRecorder( const css::uno::Reference
< css::frame::XDispatchRecorder
>& xRecorder
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
75 virtual css::uno::Reference
< css::frame::XDispatchRecorder
> SAL_CALL
getDispatchRecorder( ) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
76 virtual void SAL_CALL
dispatchAndRecord ( const css::util::URL
& aURL
,
77 const css::uno::Sequence
< css::beans::PropertyValue
>& lArguments
,
78 const css::uno::Reference
< css::frame::XDispatch
>& xDispatcher
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
84 DispatchRecorderSupplier( const css::uno::Reference
< css::lang::XMultiServiceFactory
>& xFactory
);
85 virtual ~DispatchRecorderSupplier();
87 }; // class DispatchRecorderSupplier
89 } // namespace framework
91 #endif // INCLUDED_FRAMEWORK_INC_RECORDING_DISPATCHRECORDERSUPPLIER_HXX
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */