build fix: no comphelper/profilezone.hxx in this branch
[LibreOffice.git] / framework / inc / recording / dispatchrecordersupplier.hxx
blobc00e877ed8c06e386c21e9b0863fe3ef7738e500
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 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 <general.h>
27 #include <stdtypes.h>
29 #include <com/sun/star/lang/XTypeProvider.hpp>
30 #include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
31 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
32 #include <com/sun/star/util/URL.hpp>
33 #include <com/sun/star/beans/PropertyValue.hpp>
35 #include <cppuhelper/implbase.hxx>
37 namespace framework{
39 /** @short implement a supplier for dispatch recorder
40 @descr This supplier can be set on property "DispatchRecorderSupplier" on a frame.
41 By using of this supplier and his internal XDispatchRecorder it's possible to
42 record XDispatch::dispatch() requests.
44 @threadsafe yes
46 class DispatchRecorderSupplier : public ::cppu::WeakImplHelper<
47 css::lang::XServiceInfo ,
48 css::frame::XDispatchRecorderSupplier >
51 // member
53 private:
55 /** provided dispatch recorder of this supplier instance
57 @life Is controlled from outside. Because this variable is setted
58 from there and not created internally. But we release our
59 reference to it if we die.
61 css::uno::Reference< css::frame::XDispatchRecorder > m_xDispatchRecorder;
63 // uno interface
65 public:
67 // XInterface, XTypeProvider, XServiceInfo
69 DECLARE_XSERVICEINFO
71 // XDispatchRecorderSupplier
73 virtual void SAL_CALL setDispatchRecorder( const css::uno::Reference< css::frame::XDispatchRecorder >& xRecorder ) throw (css::uno::RuntimeException, std::exception) override;
74 virtual css::uno::Reference< css::frame::XDispatchRecorder > SAL_CALL getDispatchRecorder( ) throw (css::uno::RuntimeException, std::exception) override;
75 virtual void SAL_CALL dispatchAndRecord ( const css::util::URL& aURL ,
76 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ,
77 const css::uno::Reference< css::frame::XDispatch >& xDispatcher ) throw (css::uno::RuntimeException, std::exception) override;
79 // native interface
81 public:
83 DispatchRecorderSupplier( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
84 virtual ~DispatchRecorderSupplier() override;
86 }; // class DispatchRecorderSupplier
88 } // namespace framework
90 #endif // INCLUDED_FRAMEWORK_INC_RECORDING_DISPATCHRECORDERSUPPLIER_HXX
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */