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 .
19 #ifndef __com_sun_star_frame_XDispatchRecorder_idl__
20 #define __com_sun_star_frame_XDispatchRecorder_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
23 #include
<com
/sun
/star
/util
/URL.idl
>
24 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
27 module com
{ module sun
{ module star
{ module frame
{
29 published
interface XFrame
;
31 /** provides recording functionality of dispatches
34 With such recorder it will be possible to record requests of type
35 XDispatch by using additional interface
36 XRecordableDispatch. The result of that will be a
37 a script which can be used to start the dispatch at later time again.
38 Such recorder objects are available on a XDispatchRecorderSupplier
39 which is provided by the Frame service.
43 @see XDispatchRecorderSupplier
47 published
interface XDispatchRecorder
: com
::sun
::star
::uno
::XInterface
49 /** initializes the recorder by passing the frame for which all
50 macro statements shall be recorded
53 it includes the document on which such requests shall be recorded
55 void startRecording
( [in] com
::sun
::star
::frame
::XFrame Frame
);
57 /** stops the recording process
60 Must be called in pairs with XDispatchRecorder::startRecording().
63 @attention The recorder uses this method to control the lifetime of its internal
64 used macro buffer. It will be cleared here. So the macro must be fetched
65 before endRecording() is called.
67 @see getRecordedMacro()
71 /** records a single dispatch call identified by its command URL
74 the full parsed command URL
77 optional arguments for the command URL
79 (see com::sun::star::document::MediaDescriptor
80 for further information)
83 [in] com
::sun
::star
::util
::URL URL
,
84 [in] sequence
<com
::sun
::star
::beans
::PropertyValue
> Arguments
);
86 /** records a single dispatch call identified by its command URL, but
90 This way calls that failed on execution can be documented.
94 the full parsed command URL
97 optional arguments for the command URL
99 (see com::sun::star::document::MediaDescriptor
100 for further information)
102 void recordDispatchAsComment
(
103 [in] com
::sun
::star
::util
::URL URL
,
104 [in] sequence
<com
::sun
::star
::beans
::PropertyValue
> Arguments
);
106 /** returns the recorded source code
109 This method must be used before endRecording() is called!
110 Otherwise the macro will be released.
114 the recorded data as a string which can be interpreted as a script
116 string getRecordedMacro
();
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */