LibreOffice Module svx (master) 1
fmscriptingenv.cxx
Go to the documentation of this file.
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#include <config_features.h>
21
22#include <fmscriptingenv.hxx>
23#include <svx/fmmodel.hxx>
24
25#include <com/sun/star/awt/XControl.hpp>
26#include <com/sun/star/beans/XPropertySet.hpp>
27#include <com/sun/star/lang/DisposedException.hpp>
28#include <com/sun/star/lang/EventObject.hpp>
29#include <com/sun/star/lang/IllegalArgumentException.hpp>
30#include <com/sun/star/script/XScriptListener.hpp>
31
33#include <tools/debug.hxx>
35#include <utility>
36#include <vcl/svapp.hxx>
37#include <mutex>
39#include <sfx2/objsh.hxx>
40#include <sfx2/app.hxx>
41#include <basic/basmgr.hxx>
42
43#include <memory>
44
45using std::pair;
46
47namespace svxform
48{
49
50
51 using ::com::sun::star::uno::Reference;
52 using ::com::sun::star::script::XEventAttacherManager;
53 using ::com::sun::star::lang::IllegalArgumentException;
54 using ::com::sun::star::script::XScriptListener;
55 using ::com::sun::star::script::ScriptEvent;
56 using ::com::sun::star::lang::EventObject;
57 using ::com::sun::star::uno::Any;
58 using ::com::sun::star::uno::UNO_QUERY_THROW;
59 using ::com::sun::star::lang::DisposedException;
60 using ::com::sun::star::uno::RuntimeException;
61 using ::com::sun::star::uno::Exception;
62 using ::com::sun::star::uno::Sequence;
63 using ::com::sun::star::awt::XControl;
65
66 //= FormScriptListener
67
68 typedef ::cppu::WeakImplHelper < XScriptListener
70
74 {
75 private:
76 std::mutex m_aMutex;
78
79 public:
80 explicit FormScriptListener( FormScriptingEnvironment * pScriptExecutor );
81
82 // XScriptListener
83 virtual void SAL_CALL firing( const ScriptEvent& aEvent ) override;
84 virtual Any SAL_CALL approveFiring( const ScriptEvent& aEvent ) override;
85 // XEventListener
86 virtual void SAL_CALL disposing( const EventObject& Source ) override;
87
88 // lifetime control
89 void dispose();
90
91 protected:
92 virtual ~FormScriptListener() override;
93
94 private:
105 static bool impl_allowAsynchronousCall_nothrow( const OUString& _rListenerType, const OUString& _rMethodName );
106
110
126 void impl_doFireScriptEvent_nothrow( std::unique_lock<std::mutex>& _rGuard, const ScriptEvent& _rEvent, Any* _pSynchronousResult );
127
128 private:
129 DECL_LINK( OnAsyncScriptEvent, void*, void );
130 };
131
133 :m_pScriptExecutor( pScriptExecutor )
134 {
135 }
136
137
139 {
140 }
141
142
143 bool FormScriptListener::impl_allowAsynchronousCall_nothrow( const OUString& _rListenerType, const OUString& _rMethodName )
144 {
145 // This used to be implemented as:
146 // is (_rListenerType + "::" + _rMethodName) a oneway function?
147 // since we got rid of the notion of oneway, this is the list
148 // of oneway methods, autogenerated by postprocessing of
149 // commitdiff 90eac3e69749a9227c4b6902b1f3cef1e338c6d1
150 static const o3tl::sorted_vector<pair<OUString, OUString>> delayed_event_listeners{
151 pair<OUString,OUString>("com.sun.star.accessibility.XAccessibleComponent","grabFocus"),
152 pair<OUString,OUString>("com.sun.star.accessibility.XAccessibleEventBroadcaster","addAccessibleEventListener"),
153 pair<OUString,OUString>("com.sun.star.accessibility.XAccessibleEventBroadcaster","removeAccessibleEventListener"),
154 pair<OUString,OUString>("com.sun.star.accessibility.XAccessibleSelection","clearAccessibleSelection"),
155 pair<OUString,OUString>("com.sun.star.accessibility.XAccessibleSelection","selectAllAccessibleChildren"),
156 pair<OUString,OUString>("com.sun.star.awt.XActionListener","actionPerformed"),
157 pair<OUString,OUString>("com.sun.star.awt.XActivateListener","windowActivated"),
158 pair<OUString,OUString>("com.sun.star.awt.XActivateListener","windowDeactivated"),
159 pair<OUString,OUString>("com.sun.star.awt.XAdjustmentListener","adjustmentValueChanged"),
160 pair<OUString,OUString>("com.sun.star.awt.XButton","addActionListener"),
161 pair<OUString,OUString>("com.sun.star.awt.XButton","removeActionListener"),
162 pair<OUString,OUString>("com.sun.star.awt.XButton","setLabel"),
163 pair<OUString,OUString>("com.sun.star.awt.XButton","setActionCommand"),
164 pair<OUString,OUString>("com.sun.star.awt.XCheckBox","addItemListener"),
165 pair<OUString,OUString>("com.sun.star.awt.XCheckBox","removeItemListener"),
166 pair<OUString,OUString>("com.sun.star.awt.XCheckBox","setState"),
167 pair<OUString,OUString>("com.sun.star.awt.XCheckBox","setLabel"),
168 pair<OUString,OUString>("com.sun.star.awt.XCheckBox","enableTriState"),
169 pair<OUString,OUString>("com.sun.star.awt.XComboBox","addItemListener"),
170 pair<OUString,OUString>("com.sun.star.awt.XComboBox","removeItemListener"),
171 pair<OUString,OUString>("com.sun.star.awt.XComboBox","addActionListener"),
172 pair<OUString,OUString>("com.sun.star.awt.XComboBox","removeActionListener"),
173 pair<OUString,OUString>("com.sun.star.awt.XComboBox","addItem"),
174 pair<OUString,OUString>("com.sun.star.awt.XComboBox","addItems"),
175 pair<OUString,OUString>("com.sun.star.awt.XComboBox","removeItems"),
176 pair<OUString,OUString>("com.sun.star.awt.XComboBox","setDropDownLineCount"),
177 pair<OUString,OUString>("com.sun.star.awt.XControl","setContext"),
178 pair<OUString,OUString>("com.sun.star.awt.XControl","createPeer"),
179 pair<OUString,OUString>("com.sun.star.awt.XControl","setDesignMode"),
180 pair<OUString,OUString>("com.sun.star.awt.XControlContainer","setStatusText"),
181 pair<OUString,OUString>("com.sun.star.awt.XControlContainer","addControl"),
182 pair<OUString,OUString>("com.sun.star.awt.XControlContainer","removeControl"),
183 pair<OUString,OUString>("com.sun.star.awt.XCurrencyField","setValue"),
184 pair<OUString,OUString>("com.sun.star.awt.XCurrencyField","setMin"),
185 pair<OUString,OUString>("com.sun.star.awt.XCurrencyField","setMax"),
186 pair<OUString,OUString>("com.sun.star.awt.XCurrencyField","setFirst"),
187 pair<OUString,OUString>("com.sun.star.awt.XCurrencyField","setLast"),
188 pair<OUString,OUString>("com.sun.star.awt.XCurrencyField","setSpinSize"),
189 pair<OUString,OUString>("com.sun.star.awt.XCurrencyField","setDecimalDigits"),
190 pair<OUString,OUString>("com.sun.star.awt.XCurrencyField","setStrictFormat"),
191 pair<OUString,OUString>("com.sun.star.awt.XDateField","setDate"),
192 pair<OUString,OUString>("com.sun.star.awt.XDateField","setMin"),
193 pair<OUString,OUString>("com.sun.star.awt.XDateField","setMax"),
194 pair<OUString,OUString>("com.sun.star.awt.XDateField","setFirst"),
195 pair<OUString,OUString>("com.sun.star.awt.XDateField","setLast"),
196 pair<OUString,OUString>("com.sun.star.awt.XDateField","setLongFormat"),
197 pair<OUString,OUString>("com.sun.star.awt.XDateField","setStrictFormat"),
198 pair<OUString,OUString>("com.sun.star.awt.XDialog","setTitle"),
199 pair<OUString,OUString>("com.sun.star.awt.XDisplayConnection","addEventHandler"),
200 pair<OUString,OUString>("com.sun.star.awt.XDisplayConnection","removeEventHandler"),
201 pair<OUString,OUString>("com.sun.star.awt.XDisplayConnection","addErrorHandler"),
202 pair<OUString,OUString>("com.sun.star.awt.XDisplayConnection","removeErrorHandler"),
203 pair<OUString,OUString>("com.sun.star.awt.XExtendedToolkit","addTopWindowListener"),
204 pair<OUString,OUString>("com.sun.star.awt.XExtendedToolkit","removeTopWindowListener"),
205 pair<OUString,OUString>("com.sun.star.awt.XExtendedToolkit","addKeyHandler"),
206 pair<OUString,OUString>("com.sun.star.awt.XExtendedToolkit","removeKeyHandler"),
207 pair<OUString,OUString>("com.sun.star.awt.XExtendedToolkit","addFocusListener"),
208 pair<OUString,OUString>("com.sun.star.awt.XExtendedToolkit","removeFocusListener"),
209 pair<OUString,OUString>("com.sun.star.awt.XExtendedToolkit","fireFocusGained"),
210 pair<OUString,OUString>("com.sun.star.awt.XExtendedToolkit","fireFocusLost"),
211 pair<OUString,OUString>("com.sun.star.awt.XFileDialog","setPath"),
212 pair<OUString,OUString>("com.sun.star.awt.XFileDialog","setFilters"),
213 pair<OUString,OUString>("com.sun.star.awt.XFileDialog","setCurrentFilter"),
214 pair<OUString,OUString>("com.sun.star.awt.XFixedHyperlink","setText"),
215 pair<OUString,OUString>("com.sun.star.awt.XFixedHyperlink","setURL"),
216 pair<OUString,OUString>("com.sun.star.awt.XFixedHyperlink","setAlignment"),
217 pair<OUString,OUString>("com.sun.star.awt.XFixedHyperlink","addActionListener"),
218 pair<OUString,OUString>("com.sun.star.awt.XFixedHyperlink","removeActionListener"),
219 pair<OUString,OUString>("com.sun.star.awt.XFixedText","setText"),
220 pair<OUString,OUString>("com.sun.star.awt.XFixedText","setAlignment"),
221 pair<OUString,OUString>("com.sun.star.awt.XFocusListener","focusGained"),
222 pair<OUString,OUString>("com.sun.star.awt.XFocusListener","focusLost"),
223 pair<OUString,OUString>("com.sun.star.awt.XGraphics","setFont"),
224 pair<OUString,OUString>("com.sun.star.awt.XGraphics","selectFont"),
225 pair<OUString,OUString>("com.sun.star.awt.XGraphics","setTextColor"),
226 pair<OUString,OUString>("com.sun.star.awt.XGraphics","setTextFillColor"),
227 pair<OUString,OUString>("com.sun.star.awt.XGraphics","setLineColor"),
228 pair<OUString,OUString>("com.sun.star.awt.XGraphics","setFillColor"),
229 pair<OUString,OUString>("com.sun.star.awt.XGraphics","setRasterOp"),
230 pair<OUString,OUString>("com.sun.star.awt.XGraphics","setClipRegion"),
231 pair<OUString,OUString>("com.sun.star.awt.XGraphics","intersectClipRegion"),
232 pair<OUString,OUString>("com.sun.star.awt.XGraphics","push"),
233 pair<OUString,OUString>("com.sun.star.awt.XGraphics","pop"),
234 pair<OUString,OUString>("com.sun.star.awt.XGraphics","copy"),
235 pair<OUString,OUString>("com.sun.star.awt.XGraphics","draw"),
236 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawPixel"),
237 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawLine"),
238 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawRect"),
239 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawRoundedRect"),
240 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawPolyLine"),
241 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawPolygon"),
242 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawPolyPolygon"),
243 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawEllipse"),
244 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawArc"),
245 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawPie"),
246 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawChord"),
247 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawGradient"),
248 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawText"),
249 pair<OUString,OUString>("com.sun.star.awt.XGraphics","drawTextArray"),
250 pair<OUString,OUString>("com.sun.star.awt.XImageButton","addActionListener"),
251 pair<OUString,OUString>("com.sun.star.awt.XImageButton","removeActionListener"),
252 pair<OUString,OUString>("com.sun.star.awt.XImageButton","setActionCommand"),
253 pair<OUString,OUString>("com.sun.star.awt.XImageConsumer","init"),
254 pair<OUString,OUString>("com.sun.star.awt.XImageConsumer","setColorModel"),
255 pair<OUString,OUString>("com.sun.star.awt.XImageConsumer","setPixelsByBytes"),
256 pair<OUString,OUString>("com.sun.star.awt.XImageConsumer","setPixelsByLongs"),
257 pair<OUString,OUString>("com.sun.star.awt.XImageConsumer","complete"),
258 pair<OUString,OUString>("com.sun.star.awt.XImageProducer","addConsumer"),
259 pair<OUString,OUString>("com.sun.star.awt.XImageProducer","removeConsumer"),
260 pair<OUString,OUString>("com.sun.star.awt.XImageProducer","startProduction"),
261 pair<OUString,OUString>("com.sun.star.awt.XItemEventBroadcaster","addItemListener"),
262 pair<OUString,OUString>("com.sun.star.awt.XItemEventBroadcaster","removeItemListener"),
263 pair<OUString,OUString>("com.sun.star.awt.XItemListener","itemStateChanged"),
264 pair<OUString,OUString>("com.sun.star.awt.XKeyListener","keyPressed"),
265 pair<OUString,OUString>("com.sun.star.awt.XKeyListener","keyReleased"),
266 pair<OUString,OUString>("com.sun.star.awt.XListBox","addItemListener"),
267 pair<OUString,OUString>("com.sun.star.awt.XListBox","removeItemListener"),
268 pair<OUString,OUString>("com.sun.star.awt.XListBox","addActionListener"),
269 pair<OUString,OUString>("com.sun.star.awt.XListBox","removeActionListener"),
270 pair<OUString,OUString>("com.sun.star.awt.XListBox","addItem"),
271 pair<OUString,OUString>("com.sun.star.awt.XListBox","addItems"),
272 pair<OUString,OUString>("com.sun.star.awt.XListBox","removeItems"),
273 pair<OUString,OUString>("com.sun.star.awt.XListBox","selectItemPos"),
274 pair<OUString,OUString>("com.sun.star.awt.XListBox","selectItemsPos"),
275 pair<OUString,OUString>("com.sun.star.awt.XListBox","selectItem"),
276 pair<OUString,OUString>("com.sun.star.awt.XListBox","setMultipleMode"),
277 pair<OUString,OUString>("com.sun.star.awt.XListBox","setDropDownLineCount"),
278 pair<OUString,OUString>("com.sun.star.awt.XListBox","makeVisible"),
279 pair<OUString,OUString>("com.sun.star.awt.XMenu","addMenuListener"),
280 pair<OUString,OUString>("com.sun.star.awt.XMenu","removeMenuListener"),
281 pair<OUString,OUString>("com.sun.star.awt.XMenu","insertItem"),
282 pair<OUString,OUString>("com.sun.star.awt.XMenu","removeItem"),
283 pair<OUString,OUString>("com.sun.star.awt.XMenu","enableItem"),
284 pair<OUString,OUString>("com.sun.star.awt.XMenu","setItemText"),
285 pair<OUString,OUString>("com.sun.star.awt.XMenu","setPopupMenu"),
286 pair<OUString,OUString>("com.sun.star.awt.XMenuListener","highlight"),
287 pair<OUString,OUString>("com.sun.star.awt.XMenuListener","select"),
288 pair<OUString,OUString>("com.sun.star.awt.XMenuListener","activate"),
289 pair<OUString,OUString>("com.sun.star.awt.XMenuListener","deactivate"),
290 pair<OUString,OUString>("com.sun.star.awt.XMessageBox","setCaptionText"),
291 pair<OUString,OUString>("com.sun.star.awt.XMessageBox","setMessageText"),
292 pair<OUString,OUString>("com.sun.star.awt.XMouseListener","mousePressed"),
293 pair<OUString,OUString>("com.sun.star.awt.XMouseListener","mouseReleased"),
294 pair<OUString,OUString>("com.sun.star.awt.XMouseListener","mouseEntered"),
295 pair<OUString,OUString>("com.sun.star.awt.XMouseListener","mouseExited"),
296 pair<OUString,OUString>("com.sun.star.awt.XNumericField","setValue"),
297 pair<OUString,OUString>("com.sun.star.awt.XNumericField","setMin"),
298 pair<OUString,OUString>("com.sun.star.awt.XNumericField","setMax"),
299 pair<OUString,OUString>("com.sun.star.awt.XNumericField","setFirst"),
300 pair<OUString,OUString>("com.sun.star.awt.XNumericField","setLast"),
301 pair<OUString,OUString>("com.sun.star.awt.XNumericField","setSpinSize"),
302 pair<OUString,OUString>("com.sun.star.awt.XNumericField","setDecimalDigits"),
303 pair<OUString,OUString>("com.sun.star.awt.XNumericField","setStrictFormat"),
304 pair<OUString,OUString>("com.sun.star.awt.XPaintListener","windowPaint"),
305 pair<OUString,OUString>("com.sun.star.awt.XPatternField","setMasks"),
306 pair<OUString,OUString>("com.sun.star.awt.XPatternField","setString"),
307 pair<OUString,OUString>("com.sun.star.awt.XPatternField","setStrictFormat"),
308 pair<OUString,OUString>("com.sun.star.awt.XPointer","setType"),
309 pair<OUString,OUString>("com.sun.star.awt.XPopupMenu","insertSeparator"),
310 pair<OUString,OUString>("com.sun.star.awt.XPopupMenu","setDefaultItem"),
311 pair<OUString,OUString>("com.sun.star.awt.XPopupMenu","checkItem"),
312 pair<OUString,OUString>("com.sun.star.awt.XProgressBar","setForegroundColor"),
313 pair<OUString,OUString>("com.sun.star.awt.XProgressBar","setBackgroundColor"),
314 pair<OUString,OUString>("com.sun.star.awt.XProgressBar","setRange"),
315 pair<OUString,OUString>("com.sun.star.awt.XProgressBar","setValue"),
316 pair<OUString,OUString>("com.sun.star.awt.XProgressMonitor","addText"),
317 pair<OUString,OUString>("com.sun.star.awt.XProgressMonitor","removeText"),
318 pair<OUString,OUString>("com.sun.star.awt.XProgressMonitor","updateText"),
319 pair<OUString,OUString>("com.sun.star.awt.XRadioButton","addItemListener"),
320 pair<OUString,OUString>("com.sun.star.awt.XRadioButton","removeItemListener"),
321 pair<OUString,OUString>("com.sun.star.awt.XRadioButton","setState"),
322 pair<OUString,OUString>("com.sun.star.awt.XRadioButton","setLabel"),
323 pair<OUString,OUString>("com.sun.star.awt.XRegion","clear"),
324 pair<OUString,OUString>("com.sun.star.awt.XRegion","move"),
325 pair<OUString,OUString>("com.sun.star.awt.XRegion","unionRectangle"),
326 pair<OUString,OUString>("com.sun.star.awt.XRegion","intersectRectangle"),
327 pair<OUString,OUString>("com.sun.star.awt.XRegion","excludeRectangle"),
328 pair<OUString,OUString>("com.sun.star.awt.XRegion","xOrRectangle"),
329 pair<OUString,OUString>("com.sun.star.awt.XRegion","unionRegion"),
330 pair<OUString,OUString>("com.sun.star.awt.XRegion","intersectRegion"),
331 pair<OUString,OUString>("com.sun.star.awt.XRegion","excludeRegion"),
332 pair<OUString,OUString>("com.sun.star.awt.XRegion","xOrRegion"),
333 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","addAdjustmentListener"),
334 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","removeAdjustmentListener"),
335 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","setValue"),
336 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","setValues"),
337 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","setMaximum"),
338 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","setLineIncrement"),
339 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","setBlockIncrement"),
340 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","setVisibleSize"),
341 pair<OUString,OUString>("com.sun.star.awt.XScrollBar","setOrientation"),
342 pair<OUString,OUString>("com.sun.star.awt.XSpinField","addSpinListener"),
343 pair<OUString,OUString>("com.sun.star.awt.XSpinField","removeSpinListener"),
344 pair<OUString,OUString>("com.sun.star.awt.XSpinField","up"),
345 pair<OUString,OUString>("com.sun.star.awt.XSpinField","down"),
346 pair<OUString,OUString>("com.sun.star.awt.XSpinField","first"),
347 pair<OUString,OUString>("com.sun.star.awt.XSpinField","last"),
348 pair<OUString,OUString>("com.sun.star.awt.XSpinField","enableRepeat"),
349 pair<OUString,OUString>("com.sun.star.awt.XSpinListener","up"),
350 pair<OUString,OUString>("com.sun.star.awt.XSpinListener","down"),
351 pair<OUString,OUString>("com.sun.star.awt.XSpinListener","first"),
352 pair<OUString,OUString>("com.sun.star.awt.XSpinListener","last"),
353 pair<OUString,OUString>("com.sun.star.awt.XSpinValue","addAdjustmentListener"),
354 pair<OUString,OUString>("com.sun.star.awt.XSpinValue","removeAdjustmentListener"),
355 pair<OUString,OUString>("com.sun.star.awt.XSpinValue","setValue"),
356 pair<OUString,OUString>("com.sun.star.awt.XSpinValue","setValues"),
357 pair<OUString,OUString>("com.sun.star.awt.XSpinValue","setMinimum"),
358 pair<OUString,OUString>("com.sun.star.awt.XSpinValue","setMaximum"),
359 pair<OUString,OUString>("com.sun.star.awt.XSpinValue","setSpinIncrement"),
360 pair<OUString,OUString>("com.sun.star.awt.XTabController","setModel"),
361 pair<OUString,OUString>("com.sun.star.awt.XTabController","setContainer"),
362 pair<OUString,OUString>("com.sun.star.awt.XTabController","autoTabOrder"),
363 pair<OUString,OUString>("com.sun.star.awt.XTabController","activateTabOrder"),
364 pair<OUString,OUString>("com.sun.star.awt.XTabController","activateFirst"),
365 pair<OUString,OUString>("com.sun.star.awt.XTabController","activateLast"),
366 pair<OUString,OUString>("com.sun.star.awt.XTabControllerModel","setGroupControl"),
367 pair<OUString,OUString>("com.sun.star.awt.XTabControllerModel","setControlModels"),
368 pair<OUString,OUString>("com.sun.star.awt.XTabControllerModel","setGroup"),
369 pair<OUString,OUString>("com.sun.star.awt.XTextComponent","addTextListener"),
370 pair<OUString,OUString>("com.sun.star.awt.XTextComponent","removeTextListener"),
371 pair<OUString,OUString>("com.sun.star.awt.XTextComponent","setText"),
372 pair<OUString,OUString>("com.sun.star.awt.XTextComponent","insertText"),
373 pair<OUString,OUString>("com.sun.star.awt.XTextComponent","setSelection"),
374 pair<OUString,OUString>("com.sun.star.awt.XTextComponent","setEditable"),
375 pair<OUString,OUString>("com.sun.star.awt.XTextComponent","setMaxTextLen"),
376 pair<OUString,OUString>("com.sun.star.awt.XTextEditField","setEchoChar"),
377 pair<OUString,OUString>("com.sun.star.awt.XTextListener","textChanged"),
378 pair<OUString,OUString>("com.sun.star.awt.XTimeField","setTime"),
379 pair<OUString,OUString>("com.sun.star.awt.XTimeField","setMin"),
380 pair<OUString,OUString>("com.sun.star.awt.XTimeField","setMax"),
381 pair<OUString,OUString>("com.sun.star.awt.XTimeField","setFirst"),
382 pair<OUString,OUString>("com.sun.star.awt.XTimeField","setLast"),
383 pair<OUString,OUString>("com.sun.star.awt.XTimeField","setStrictFormat"),
384 pair<OUString,OUString>("com.sun.star.awt.XTopWindow","addTopWindowListener"),
385 pair<OUString,OUString>("com.sun.star.awt.XTopWindow","removeTopWindowListener"),
386 pair<OUString,OUString>("com.sun.star.awt.XTopWindow","toFront"),
387 pair<OUString,OUString>("com.sun.star.awt.XTopWindow","toBack"),
388 pair<OUString,OUString>("com.sun.star.awt.XTopWindow","setMenuBar"),
389 pair<OUString,OUString>("com.sun.star.awt.XTopWindowListener","windowOpened"),
390 pair<OUString,OUString>("com.sun.star.awt.XTopWindowListener","windowClosing"),
391 pair<OUString,OUString>("com.sun.star.awt.XTopWindowListener","windowClosed"),
392 pair<OUString,OUString>("com.sun.star.awt.XTopWindowListener","windowMinimized"),
393 pair<OUString,OUString>("com.sun.star.awt.XTopWindowListener","windowNormalized"),
394 pair<OUString,OUString>("com.sun.star.awt.XTopWindowListener","windowActivated"),
395 pair<OUString,OUString>("com.sun.star.awt.XTopWindowListener","windowDeactivated"),
396 pair<OUString,OUString>("com.sun.star.awt.XUnoControlContainer","setTabControllers"),
397 pair<OUString,OUString>("com.sun.star.awt.XUnoControlContainer","addTabController"),
398 pair<OUString,OUString>("com.sun.star.awt.XUnoControlContainer","removeTabController"),
399 pair<OUString,OUString>("com.sun.star.awt.XUserInputInterception","addKeyHandler"),
400 pair<OUString,OUString>("com.sun.star.awt.XUserInputInterception","removeKeyHandler"),
401 pair<OUString,OUString>("com.sun.star.awt.XUserInputInterception","addMouseClickHandler"),
402 pair<OUString,OUString>("com.sun.star.awt.XUserInputInterception","removeMouseClickHandler"),
403 pair<OUString,OUString>("com.sun.star.awt.XVclContainer","addVclContainerListener"),
404 pair<OUString,OUString>("com.sun.star.awt.XVclContainer","removeVclContainerListener"),
405 pair<OUString,OUString>("com.sun.star.awt.XVclContainerListener","windowAdded"),
406 pair<OUString,OUString>("com.sun.star.awt.XVclContainerListener","windowRemoved"),
407 pair<OUString,OUString>("com.sun.star.awt.XVclContainerPeer","enableDialogControl"),
408 pair<OUString,OUString>("com.sun.star.awt.XVclContainerPeer","setTabOrder"),
409 pair<OUString,OUString>("com.sun.star.awt.XVclContainerPeer","setGroup"),
410 pair<OUString,OUString>("com.sun.star.awt.XVclWindowPeer","setDesignMode"),
411 pair<OUString,OUString>("com.sun.star.awt.XVclWindowPeer","enableClipSiblings"),
412 pair<OUString,OUString>("com.sun.star.awt.XVclWindowPeer","setForeground"),
413 pair<OUString,OUString>("com.sun.star.awt.XVclWindowPeer","setControlFont"),
414 pair<OUString,OUString>("com.sun.star.awt.XView","draw"),
415 pair<OUString,OUString>("com.sun.star.awt.XView","setZoom"),
416 pair<OUString,OUString>("com.sun.star.awt.XWindow","setPosSize"),
417 pair<OUString,OUString>("com.sun.star.awt.XWindow","setVisible"),
418 pair<OUString,OUString>("com.sun.star.awt.XWindow","setEnable"),
419 pair<OUString,OUString>("com.sun.star.awt.XWindow","setFocus"),
420 pair<OUString,OUString>("com.sun.star.awt.XWindow","addWindowListener"),
421 pair<OUString,OUString>("com.sun.star.awt.XWindow","removeWindowListener"),
422 pair<OUString,OUString>("com.sun.star.awt.XWindow","addFocusListener"),
423 pair<OUString,OUString>("com.sun.star.awt.XWindow","removeFocusListener"),
424 pair<OUString,OUString>("com.sun.star.awt.XWindow","addKeyListener"),
425 pair<OUString,OUString>("com.sun.star.awt.XWindow","removeKeyListener"),
426 pair<OUString,OUString>("com.sun.star.awt.XWindow","addMouseListener"),
427 pair<OUString,OUString>("com.sun.star.awt.XWindow","removeMouseListener"),
428 pair<OUString,OUString>("com.sun.star.awt.XWindow","addMouseMotionListener"),
429 pair<OUString,OUString>("com.sun.star.awt.XWindow","removeMouseMotionListener"),
430 pair<OUString,OUString>("com.sun.star.awt.XWindow","addPaintListener"),
431 pair<OUString,OUString>("com.sun.star.awt.XWindow","removePaintListener"),
432 pair<OUString,OUString>("com.sun.star.awt.XWindowListener","windowResized"),
433 pair<OUString,OUString>("com.sun.star.awt.XWindowListener","windowMoved"),
434 pair<OUString,OUString>("com.sun.star.awt.XWindowListener","windowShown"),
435 pair<OUString,OUString>("com.sun.star.awt.XWindowListener","windowHidden"),
436 pair<OUString,OUString>("com.sun.star.awt.XWindowListener2","windowEnabled"),
437 pair<OUString,OUString>("com.sun.star.awt.XWindowListener2","windowDisabled"),
438 pair<OUString,OUString>("com.sun.star.awt.XWindowPeer","setPointer"),
439 pair<OUString,OUString>("com.sun.star.awt.XWindowPeer","setBackground"),
440 pair<OUString,OUString>("com.sun.star.awt.XWindowPeer","invalidate"),
441 pair<OUString,OUString>("com.sun.star.awt.XWindowPeer","invalidateRect"),
442 pair<OUString,OUString>("com.sun.star.awt.grid.XGridSelectionListener","selectionChanged"),
443 pair<OUString,OUString>("com.sun.star.awt.tab.XTabPageContainer","addTabPageContainerListener"),
444 pair<OUString,OUString>("com.sun.star.awt.tab.XTabPageContainer","removeTabPageContainerListener"),
445 pair<OUString,OUString>("com.sun.star.awt.tab.XTabPageContainerListener","tabPageActivated"),
446 pair<OUString,OUString>("com.sun.star.configuration.backend.XBackendChangesNotifier","addChangesListener"),
447 pair<OUString,OUString>("com.sun.star.configuration.backend.XBackendChangesNotifier","removeChangesListener"),
448 pair<OUString,OUString>("com.sun.star.datatransfer.clipboard.XClipboard","setContents"),
449 pair<OUString,OUString>("com.sun.star.datatransfer.clipboard.XClipboardListener","changedContents"),
450 pair<OUString,OUString>("com.sun.star.datatransfer.clipboard.XClipboardNotifier","addClipboardListener"),
451 pair<OUString,OUString>("com.sun.star.datatransfer.clipboard.XClipboardNotifier","removeClipboardListener"),
452 pair<OUString,OUString>("com.sun.star.datatransfer.clipboard.XClipboardOwner","lostOwnership"),
453 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XAutoscroll","autoscroll"),
454 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragGestureListener","dragGestureRecognized"),
455 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragGestureRecognizer","addDragGestureListener"),
456 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragGestureRecognizer","removeDragGestureListener"),
457 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSource","startDrag"),
458 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSourceContext","setCursor"),
459 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSourceContext","setImage"),
460 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSourceContext","transferablesFlavorsChanged"),
461 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSourceListener","dragDropEnd"),
462 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSourceListener","dragEnter"),
463 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSourceListener","dragExit"),
464 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSourceListener","dragOver"),
465 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDragSourceListener","dropActionChanged"),
466 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTarget","addDropTargetListener"),
467 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTarget","removeDropTargetListener"),
468 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTarget","setDefaultActions"),
469 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetDragContext","acceptDrag"),
470 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetDragContext","rejectDrag"),
471 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetDropContext","acceptDrop"),
472 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetDropContext","rejectDrop"),
473 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetDropContext","dropComplete"),
474 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetListener","dragEnter"),
475 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetListener","dragExit"),
476 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetListener","dragOver"),
477 pair<OUString,OUString>("com.sun.star.datatransfer.dnd.XDropTargetListener","dropActionChanged"),
478 pair<OUString,OUString>("com.sun.star.document.XEventBroadcaster","addEventListener"),
479 pair<OUString,OUString>("com.sun.star.document.XEventBroadcaster","removeEventListener"),
480 pair<OUString,OUString>("com.sun.star.document.XEventListener","notifyEvent"),
481 pair<OUString,OUString>("com.sun.star.document.XStorageChangeListener","notifyStorageChange"),
482 pair<OUString,OUString>("com.sun.star.drawing.XControlShape","setControl"),
483 pair<OUString,OUString>("com.sun.star.form.XApproveActionBroadcaster","addApproveActionListener"),
484 pair<OUString,OUString>("com.sun.star.form.XApproveActionBroadcaster","removeApproveActionListener"),
485 pair<OUString,OUString>("com.sun.star.form.XBoundControl","setLock"),
486 pair<OUString,OUString>("com.sun.star.form.XChangeBroadcaster","addChangeListener"),
487 pair<OUString,OUString>("com.sun.star.form.XChangeBroadcaster","removeChangeListener"),
488 pair<OUString,OUString>("com.sun.star.form.XChangeListener","changed"),
489 pair<OUString,OUString>("com.sun.star.form.XConfirmDeleteBroadcaster","addConfirmDeleteListener"),
490 pair<OUString,OUString>("com.sun.star.form.XConfirmDeleteBroadcaster","removeConfirmDeleteListener"),
491 pair<OUString,OUString>("com.sun.star.form.XDatabaseParameterBroadcaster","addParameterListener"),
492 pair<OUString,OUString>("com.sun.star.form.XDatabaseParameterBroadcaster","removeParameterListener"),
493 pair<OUString,OUString>("com.sun.star.form.XDatabaseParameterBroadcaster2","addDatabaseParameterListener"),
494 pair<OUString,OUString>("com.sun.star.form.XDatabaseParameterBroadcaster2","removeDatabaseParameterListener"),
495 pair<OUString,OUString>("com.sun.star.form.XErrorBroadcaster","addErrorListener"),
496 pair<OUString,OUString>("com.sun.star.form.XErrorBroadcaster","removeErrorListener"),
497 pair<OUString,OUString>("com.sun.star.form.XFormController","addActivateListener"),
498 pair<OUString,OUString>("com.sun.star.form.XFormController","removeActivateListener"),
499 pair<OUString,OUString>("com.sun.star.form.XFormControllerListener","formActivated"),
500 pair<OUString,OUString>("com.sun.star.form.XFormControllerListener","formDeactivated"),
501 pair<OUString,OUString>("com.sun.star.form.XGrid","setCurrentColumnPosition"),
502 pair<OUString,OUString>("com.sun.star.form.XGridPeer","setColumns"),
503 pair<OUString,OUString>("com.sun.star.form.XLoadListener","loaded"),
504 pair<OUString,OUString>("com.sun.star.form.XLoadListener","unloading"),
505 pair<OUString,OUString>("com.sun.star.form.XLoadListener","unloaded"),
506 pair<OUString,OUString>("com.sun.star.form.XLoadListener","reloading"),
507 pair<OUString,OUString>("com.sun.star.form.XLoadListener","reloaded"),
508 pair<OUString,OUString>("com.sun.star.form.XLoadable","load"),
509 pair<OUString,OUString>("com.sun.star.form.XLoadable","unload"),
510 pair<OUString,OUString>("com.sun.star.form.XLoadable","reload"),
511 pair<OUString,OUString>("com.sun.star.form.XLoadable","addLoadListener"),
512 pair<OUString,OUString>("com.sun.star.form.XLoadable","removeLoadListener"),
513 pair<OUString,OUString>("com.sun.star.form.XPositioningListener","positioned"),
514 pair<OUString,OUString>("com.sun.star.form.XReset","reset"),
515 pair<OUString,OUString>("com.sun.star.form.XReset","addResetListener"),
516 pair<OUString,OUString>("com.sun.star.form.XReset","removeResetListener"),
517 pair<OUString,OUString>("com.sun.star.form.XResetListener","resetted"),
518 pair<OUString,OUString>("com.sun.star.form.XSubmit","submit"),
519 pair<OUString,OUString>("com.sun.star.form.XSubmit","addSubmitListener"),
520 pair<OUString,OUString>("com.sun.star.form.XSubmit","removeSubmitListener"),
521 pair<OUString,OUString>("com.sun.star.form.XUpdateBroadcaster","addUpdateListener"),
522 pair<OUString,OUString>("com.sun.star.form.XUpdateBroadcaster","removeUpdateListener"),
523 pair<OUString,OUString>("com.sun.star.frame.XBrowseHistoryRegistry","updateViewData"),
524 pair<OUString,OUString>("com.sun.star.frame.XBrowseHistoryRegistry","createNewEntry"),
525 pair<OUString,OUString>("com.sun.star.frame.XConfigManager","addPropertyChangeListener"),
526 pair<OUString,OUString>("com.sun.star.frame.XConfigManager","removePropertyChangeListener"),
527 pair<OUString,OUString>("com.sun.star.frame.XConfigManager","flush"),
528 pair<OUString,OUString>("com.sun.star.frame.XDesktop","addTerminateListener"),
529 pair<OUString,OUString>("com.sun.star.frame.XDesktop","removeTerminateListener"),
530 pair<OUString,OUString>("com.sun.star.frame.XDispatch","dispatch"),
531 pair<OUString,OUString>("com.sun.star.frame.XDispatch","addStatusListener"),
532 pair<OUString,OUString>("com.sun.star.frame.XDispatch","removeStatusListener"),
533 pair<OUString,OUString>("com.sun.star.frame.XDocumentTemplates","update"),
534 pair<OUString,OUString>("com.sun.star.frame.XFrame","setCreator"),
535 pair<OUString,OUString>("com.sun.star.frame.XFrame","setName"),
536 pair<OUString,OUString>("com.sun.star.frame.XFrame","activate"),
537 pair<OUString,OUString>("com.sun.star.frame.XFrame","deactivate"),
538 pair<OUString,OUString>("com.sun.star.frame.XFrame","addFrameActionListener"),
539 pair<OUString,OUString>("com.sun.star.frame.XFrame","removeFrameActionListener"),
540 pair<OUString,OUString>("com.sun.star.frame.XFrameActionListener","frameAction"),
541 pair<OUString,OUString>("com.sun.star.frame.XFrameLoader","load"),
542 pair<OUString,OUString>("com.sun.star.frame.XFrameLoader","cancel"),
543 pair<OUString,OUString>("com.sun.star.frame.XLoadEventListener","loadFinished"),
544 pair<OUString,OUString>("com.sun.star.frame.XLoadEventListener","loadCancelled"),
545 pair<OUString,OUString>("com.sun.star.frame.XModel","connectController"),
546 pair<OUString,OUString>("com.sun.star.frame.XModel","disconnectController"),
547 pair<OUString,OUString>("com.sun.star.frame.XModel","lockControllers"),
548 pair<OUString,OUString>("com.sun.star.frame.XModel","unlockControllers"),
549 pair<OUString,OUString>("com.sun.star.frame.XNotifyingDispatch","dispatchWithNotification"),
550 pair<OUString,OUString>("com.sun.star.frame.XRecordableDispatch","dispatchAndRecord"),
551 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerClient","addSessionManagerListener"),
552 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerClient","removeSessionManagerListener"),
553 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerClient","queryInteraction"),
554 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerClient","interactionDone"),
555 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerClient","saveDone"),
556 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerListener","doSave"),
557 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerListener","approveInteraction"),
558 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerListener","shutdownCanceled"),
559 pair<OUString,OUString>("com.sun.star.frame.XSessionManagerListener2","doQuit"),
560 pair<OUString,OUString>("com.sun.star.frame.XStatusListener","statusChanged"),
561 pair<OUString,OUString>("com.sun.star.frame.XTask","tileWindows"),
562 pair<OUString,OUString>("com.sun.star.frame.XTask","arrangeWindowsVertical"),
563 pair<OUString,OUString>("com.sun.star.frame.XTask","arrangeWindowsHorizontal"),
564 pair<OUString,OUString>("com.sun.star.frame.XWindowArranger","arrange"),
565 pair<OUString,OUString>("com.sun.star.inspection.XPropertyControlContext","activateNextControl"),
566 pair<OUString,OUString>("com.sun.star.inspection.XPropertyControlObserver","focusGained"),
567 pair<OUString,OUString>("com.sun.star.inspection.XPropertyControlObserver","valueChanged"),
568 pair<OUString,OUString>("com.sun.star.mozilla.XCloseSessionListener","sessionClosed"),
569 pair<OUString,OUString>("com.sun.star.mozilla.XMenuProxy","addMenuProxyListener"),
570 pair<OUString,OUString>("com.sun.star.mozilla.XMenuProxy","removeMenuProxyListener"),
571 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstance","start"),
572 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstance","stop"),
573 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstance","destroy"),
574 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstance","createWindow"),
575 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstance","newStream"),
576 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstance","newURL"),
577 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstanceNotifySink","notifyURL"),
578 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstancePeer","showStatusMessage"),
579 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstancePeer","enableScripting"),
580 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstancePeer","newStream"),
581 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstancePeer","getURL"),
582 pair<OUString,OUString>("com.sun.star.mozilla.XPluginInstancePeer","postURL"),
583 pair<OUString,OUString>("com.sun.star.mozilla.XPluginWindowPeer","setChildWindow"),
584 pair<OUString,OUString>("com.sun.star.script.vba.XVBACompatibility","addVBAScriptListener"),
585 pair<OUString,OUString>("com.sun.star.script.vba.XVBACompatibility","removeVBAScriptListener"),
586 pair<OUString,OUString>("com.sun.star.sdb.XDatabaseAccess","addDatabaseAccessListener"),
587 pair<OUString,OUString>("com.sun.star.sdb.XDatabaseAccess","removeDatabaseAccessListener"),
588 pair<OUString,OUString>("com.sun.star.sdb.XDatabaseAccessListener","connectionChanged"),
589 pair<OUString,OUString>("com.sun.star.sdb.XDatabaseAccessListener","connectionClosing"),
590 pair<OUString,OUString>("com.sun.star.sdb.XRowSetApproveBroadcaster","addRowSetApproveListener"),
591 pair<OUString,OUString>("com.sun.star.sdb.XRowSetApproveBroadcaster","removeRowSetApproveListener"),
592 pair<OUString,OUString>("com.sun.star.sdb.XRowSetChangeListener","onRowSetChanged"),
593 pair<OUString,OUString>("com.sun.star.sdb.XRowSetSupplier","setRowSet"),
594 pair<OUString,OUString>("com.sun.star.sdb.XRowsChangeListener","rowsChanged"),
595 pair<OUString,OUString>("com.sun.star.sdb.XSQLErrorBroadcaster","addSQLErrorListener"),
596 pair<OUString,OUString>("com.sun.star.sdb.XSQLErrorBroadcaster","removeSQLErrorListener"),
597 pair<OUString,OUString>("com.sun.star.sdbc.XRowSet","addRowSetListener"),
598 pair<OUString,OUString>("com.sun.star.sdbc.XRowSet","removeRowSetListener"),
599 pair<OUString,OUString>("com.sun.star.sdbc.XRowSetListener","cursorMoved"),
600 pair<OUString,OUString>("com.sun.star.sdbc.XRowSetListener","rowChanged"),
601 pair<OUString,OUString>("com.sun.star.sdbc.XRowSetListener","rowSetChanged"),
602 pair<OUString,OUString>("com.sun.star.sheet.XCalculatable","enableAutomaticCalculation"),
603 pair<OUString,OUString>("com.sun.star.sheet.XVolatileResult","addResultListener"),
604 pair<OUString,OUString>("com.sun.star.sheet.XVolatileResult","removeResultListener"),
605 pair<OUString,OUString>("com.sun.star.task.XJobExecutor","trigger"),
606 pair<OUString,OUString>("com.sun.star.task.XStatusIndicator","start"),
607 pair<OUString,OUString>("com.sun.star.task.XStatusIndicator","end"),
608 pair<OUString,OUString>("com.sun.star.task.XStatusIndicator","setText"),
609 pair<OUString,OUString>("com.sun.star.task.XStatusIndicator","setValue"),
610 pair<OUString,OUString>("com.sun.star.task.XStatusIndicator","reset"),
611 pair<OUString,OUString>("com.sun.star.text.XSimpleText","insertString"),
612 pair<OUString,OUString>("com.sun.star.text.XTextCursor","collapseToStart"),
613 pair<OUString,OUString>("com.sun.star.text.XTextCursor","collapseToEnd"),
614 pair<OUString,OUString>("com.sun.star.text.XTextRange","setString"),
615 pair<OUString,OUString>("com.sun.star.text.XTextViewCursor","setVisible"),
616 pair<OUString,OUString>("com.sun.star.ucb.XCommandProcessor","abort"),
617 pair<OUString,OUString>("com.sun.star.ucb.XCommandProcessor2","releaseCommandIdentifier"),
618 pair<OUString,OUString>("com.sun.star.ucb.XContent","addContentEventListener"),
619 pair<OUString,OUString>("com.sun.star.ucb.XContent","removeContentEventListener"),
620 pair<OUString,OUString>("com.sun.star.ucb.XContentProviderManager","deregisterContentProvider"),
621 pair<OUString,OUString>("com.sun.star.ucb.XContentTransmitter","transmit"),
622 pair<OUString,OUString>("com.sun.star.ucb.XPropertySetRegistry","removePropertySet"),
623 pair<OUString,OUString>("com.sun.star.ui.XUIConfigurationListener","elementInserted"),
624 pair<OUString,OUString>("com.sun.star.ui.XUIConfigurationListener","elementRemoved"),
625 pair<OUString,OUString>("com.sun.star.ui.XUIConfigurationListener","elementReplaced"),
626 pair<OUString,OUString>("com.sun.star.ui.dialogs.XFilePickerNotifier","addFilePickerListener"),
627 pair<OUString,OUString>("com.sun.star.ui.dialogs.XFilePickerNotifier","removeFilePickerListener"),
628 pair<OUString,OUString>("com.sun.star.util.XBroadcaster","lockBroadcasts"),
629 pair<OUString,OUString>("com.sun.star.util.XBroadcaster","unlockBroadcasts"),
630 pair<OUString,OUString>("com.sun.star.util.XChangesListener","changesOccurred"),
631 pair<OUString,OUString>("com.sun.star.util.XChangesNotifier","addChangesListener"),
632 pair<OUString,OUString>("com.sun.star.util.XChangesNotifier","removeChangesListener"),
633 pair<OUString,OUString>("com.sun.star.util.XCloseBroadcaster","addCloseListener"),
634 pair<OUString,OUString>("com.sun.star.util.XCloseBroadcaster","removeCloseListener"),
635 pair<OUString,OUString>("com.sun.star.util.XFlushable","addFlushListener"),
636 pair<OUString,OUString>("com.sun.star.util.XFlushable","removeFlushListener"),
637 pair<OUString,OUString>("com.sun.star.util.XModeChangeListener","modeChanged"),
638 pair<OUString,OUString>("com.sun.star.util.XModifyBroadcaster","addModifyListener"),
639 pair<OUString,OUString>("com.sun.star.util.XModifyBroadcaster","removeModifyListener"),
640 pair<OUString,OUString>("com.sun.star.util.XRefreshable","addRefreshListener"),
641 pair<OUString,OUString>("com.sun.star.util.XRefreshable","removeRefreshListener"),
642 pair<OUString,OUString>("com.sun.star.util.XSearchDescriptor","setSearchString"),
643 pair<OUString,OUString>("com.sun.star.view.XPrintJobBroadcaster","addPrintJobListener"),
644 pair<OUString,OUString>("com.sun.star.view.XPrintJobBroadcaster","removePrintJobListener"),
645 pair<OUString,OUString>("com.sun.star.view.XPrintJobListener","printJobEvent"),
646 pair<OUString,OUString>("com.sun.star.view.XPrintableBroadcaster","addPrintableListener"),
647 pair<OUString,OUString>("com.sun.star.view.XPrintableBroadcaster","removePrintableListener"),
648 pair<OUString,OUString>("com.sun.star.view.XPrintableListener","stateChanged"),
649 pair<OUString,OUString>("com.sun.star.view.XSelectionChangeListener","selectionChanged"),
650 pair<OUString,OUString>("com.sun.star.beans.XMultiPropertySet","addPropertiesChangeListener"),
651 pair<OUString,OUString>("com.sun.star.beans.XMultiPropertySet","removePropertiesChangeListener"),
652 pair<OUString,OUString>("com.sun.star.beans.XMultiPropertySet","firePropertiesChangeEvent"),
653 pair<OUString,OUString>("com.sun.star.beans.XPropertiesChangeNotifier","addPropertiesChangeListener"),
654 pair<OUString,OUString>("com.sun.star.beans.XPropertiesChangeNotifier","removePropertiesChangeListener"),
655 pair<OUString,OUString>("com.sun.star.container.XContainer","addContainerListener"),
656 pair<OUString,OUString>("com.sun.star.container.XContainer","removeContainerListener"),
657 pair<OUString,OUString>("com.sun.star.container.XContainerListener","elementInserted"),
658 pair<OUString,OUString>("com.sun.star.container.XContainerListener","elementRemoved"),
659 pair<OUString,OUString>("com.sun.star.container.XContainerListener","elementReplaced"),
660 pair<OUString,OUString>("com.sun.star.container.XNamed","setName"),
661 pair<OUString,OUString>("com.sun.star.io.XDataExporter","exportData"),
662 pair<OUString,OUString>("com.sun.star.io.XDataExporter","cancel"),
663 pair<OUString,OUString>("com.sun.star.io.XDataImporter","importData"),
664 pair<OUString,OUString>("com.sun.star.io.XDataImporter","cancel"),
665 pair<OUString,OUString>("com.sun.star.io.XDataTransferEventListener","finished"),
666 pair<OUString,OUString>("com.sun.star.io.XDataTransferEventListener","cancelled"),
667 pair<OUString,OUString>("com.sun.star.lang.XConnectionPointContainer","advise"),
668 pair<OUString,OUString>("com.sun.star.lang.XConnectionPointContainer","unadvise"),
669 pair<OUString,OUString>("com.sun.star.script.XAllListener","firing"),
670 pair<OUString,OUString>("com.sun.star.uno.XInterface","acquire"),
671 pair<OUString,OUString>("com.sun.star.uno.XInterface","release"),
672 pair<OUString,OUString>("com.sun.star.uno.XReference","dispose")};
673
674 pair<OUString,OUString> k(_rListenerType, _rMethodName);
675 return delayed_event_listeners.find(k) != delayed_event_listeners.end();
676 }
677
678
679 void FormScriptListener::impl_doFireScriptEvent_nothrow( std::unique_lock<std::mutex>& _rGuard, const ScriptEvent& _rEvent, Any* _pSynchronousResult )
680 {
681 OSL_PRECOND( m_pScriptExecutor, "FormScriptListener::impl_doFireScriptEvent_nothrow: this will crash!" );
682
683 _rGuard.unlock();
684 m_pScriptExecutor->doFireScriptEvent( _rEvent, _pSynchronousResult );
685 }
686
687
688 void SAL_CALL FormScriptListener::firing( const ScriptEvent& _rEvent )
689 {
690 if ( _rEvent.ScriptType == "VBAInterop" )
691 return; // not handled here
692
693 std::unique_lock aGuard( m_aMutex );
694
696 return;
697
698 if ( !impl_allowAsynchronousCall_nothrow( _rEvent.ListenerType.getTypeName(), _rEvent.MethodName ) )
699 {
700 impl_doFireScriptEvent_nothrow( aGuard, _rEvent, nullptr );
701 return;
702 }
703
704 acquire();
705 Application::PostUserEvent( LINK( this, FormScriptListener, OnAsyncScriptEvent ), new ScriptEvent( _rEvent ) );
706 }
707
708
709 Any SAL_CALL FormScriptListener::approveFiring( const ScriptEvent& _rEvent )
710 {
711 Any aResult;
712
713 std::unique_lock aGuard( m_aMutex );
715 impl_doFireScriptEvent_nothrow( aGuard, _rEvent, &aResult );
716
717 return aResult;
718 }
719
720
721 void SAL_CALL FormScriptListener::disposing( const EventObject& /*Source*/ )
722 {
723 // not interested in
724 }
725
726
728 {
729 std::unique_lock aGuard( m_aMutex );
730 m_pScriptExecutor = nullptr;
731 }
732
733 IMPL_LINK( FormScriptListener, OnAsyncScriptEvent, void*, p, void )
734 {
735 ScriptEvent* _pEvent = static_cast<ScriptEvent*>(p);
736 OSL_PRECOND( _pEvent != nullptr, "FormScriptListener::OnAsyncScriptEvent: invalid event!" );
737 if ( !_pEvent )
738 return;
739
740 {
741 std::unique_lock aGuard( m_aMutex );
742
743 if ( !impl_isDisposed_nothrow() )
744 impl_doFireScriptEvent_nothrow( aGuard, *_pEvent, nullptr );
745 }
746
747 delete _pEvent;
748 // we acquired ourself immediately before posting the event
749 release();
750 }
751
753 :m_rFormModel( _rModel )
754 ,m_bDisposed( false )
755 {
757 // note that this is a cyclic reference between the FormScriptListener and the FormScriptingEnvironment
758 // This cycle is broken up when our instance is disposed.
759 }
760
761 void FormScriptingEnvironment::impl_registerOrRevoke_throw( const Reference< XEventAttacherManager >& _rxManager, bool _bRegister )
762 {
763 std::unique_lock aGuard( m_aMutex );
764
765 if ( !_rxManager.is() )
766 throw IllegalArgumentException();
767 if ( m_bDisposed )
768 throw DisposedException();
769
770 try
771 {
772 if ( _bRegister )
773 _rxManager->addScriptListener( m_pScriptListener );
774 else
775 _rxManager->removeScriptListener( m_pScriptListener );
776 }
777 catch( const RuntimeException& ) { throw; }
778 catch( const Exception& )
779 {
781 }
782 }
783
784
785 void FormScriptingEnvironment::registerEventAttacherManager( const Reference< XEventAttacherManager >& _rxManager )
786 {
787 impl_registerOrRevoke_throw( _rxManager, true );
788 }
789
790
791 void FormScriptingEnvironment::revokeEventAttacherManager( const Reference< XEventAttacherManager >& _rxManager )
792 {
793 impl_registerOrRevoke_throw( _rxManager, false );
794 }
795
796#if HAVE_FEATURE_SCRIPTING
797 namespace
798 {
799 class NewStyleUNOScript
800 {
801 SfxObjectShell& m_rObjectShell;
802 const OUString m_sScriptCode;
803
804 public:
805 NewStyleUNOScript( SfxObjectShell& _rObjectShell, OUString _aScriptCode )
806 :m_rObjectShell( _rObjectShell )
807 ,m_sScriptCode(std::move( _aScriptCode ))
808 {
809 }
810
811 void invoke( const Sequence< Any >& _rArguments, Any& _rSynchronousResult );
812 };
813
814
815 void NewStyleUNOScript::invoke( const Sequence< Any >& _rArguments, Any& _rSynchronousResult )
816 {
817 Sequence< sal_Int16 > aOutArgsIndex;
818 Sequence< Any > aOutArgs;
819 EventObject aEvent;
820 Any aCaller;
821 if ( _rArguments.hasElements() && ( _rArguments[ 0 ] >>= aEvent ) )
822 {
823 try
824 {
825 Reference< XControl > xControl( aEvent.Source, UNO_QUERY_THROW );
826 Reference< XPropertySet > xProps( xControl->getModel(), UNO_QUERY_THROW );
827 aCaller = xProps->getPropertyValue("Name");
828 }
829 catch( Exception& ) {}
830 }
831 m_rObjectShell.CallXScript( m_sScriptCode, _rArguments, _rSynchronousResult, aOutArgsIndex, aOutArgs, true, aCaller.hasValue() ? &aCaller : nullptr );
832 }
833 }
834#endif
835
836 void FormScriptingEnvironment::doFireScriptEvent( const ScriptEvent& _rEvent, Any* _pSynchronousResult )
837 {
838#if !HAVE_FEATURE_SCRIPTING
839 (void) _rEvent;
840 (void) _pSynchronousResult;
841 (void) m_rFormModel;
842#else
843 SolarMutexClearableGuard aSolarGuard;
844 std::unique_lock aGuard( m_aMutex );
845
846 if ( m_bDisposed )
847 return;
848
849 // SfxObjectShellRef is good here since the model controls the lifetime of the object
851 if( !xObjectShell.is() )
852 return;
853
854 // the script to execute
855 std::shared_ptr< NewStyleUNOScript > pScript;
856
857 if ( _rEvent.ScriptType != "StarBasic" )
858 {
859 pScript = std::make_shared<NewStyleUNOScript>( *xObjectShell, _rEvent.ScriptCode );
860 }
861 else
862 {
863 OUString sScriptCode = _rEvent.ScriptCode;
864 OUString sMacroLocation;
865
866 // is there a location in the script name ("application" or "document")?
867 sal_Int32 nPrefixLen = sScriptCode.indexOf( ':' );
868 DBG_ASSERT( 0 <= nPrefixLen, "FormScriptingEnvironment::doFireScriptEvent: Basic script name in old format encountered!" );
869
870 if ( 0 <= nPrefixLen )
871 {
872 // and it has such a prefix
873 sMacroLocation = sScriptCode.copy( 0, nPrefixLen );
874 DBG_ASSERT( sMacroLocation == "document"
875 || sMacroLocation == "application",
876 "FormScriptingEnvironment::doFireScriptEvent: invalid (unknown) prefix!" );
877
878 // strip the prefix: the SfxObjectShell::CallScript knows nothing about such prefixes
879 sScriptCode = sScriptCode.copy( nPrefixLen + 1 );
880 }
881
882 if ( sMacroLocation.isEmpty() )
883 {
884 // legacy format: use the app-wide Basic, if it has a respective method, otherwise fall back to the doc's Basic
885 if ( SfxApplication::GetBasicManager()->HasMacro( sScriptCode ) )
886 sMacroLocation = "application";
887 else
888 sMacroLocation = "document";
889 }
890
891 OUString sScriptURI = "vnd.sun.star.script:" +
892 sScriptCode +
893 "?language=Basic&location=" +
894 sMacroLocation;
895
896 pScript = std::make_shared<NewStyleUNOScript>( *xObjectShell, sScriptURI );
897 }
898
899 assert(pScript && "FormScriptingEnvironment::doFireScriptEvent: no script to execute!");
900
901 aGuard.unlock();
902 aSolarGuard.clear();
903
904 Any aIgnoreResult;
905 pScript->invoke( _rEvent.Arguments, _pSynchronousResult ? *_pSynchronousResult : aIgnoreResult );
906 pScript.reset();
907
908 {
909 // object shells are not thread safe, so guard the destruction
910 SolarMutexGuard aSolarGuarsReset;
911 xObjectShell = nullptr;
912 }
913#endif
914 }
915
916
918 {
919 std::unique_lock aGuard( m_aMutex );
920 m_bDisposed = true;
921 m_pScriptListener->dispose();
922 m_pScriptListener.clear();
923 }
924
925}
926
927
928/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AnyEventRef aEvent
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
SfxObjectShell * GetObjectShell() const
Definition: fmmodel.hxx:58
static BasicManager * GetBasicManager()
implements the XScriptListener interface, is used by FormScriptingEnvironment
bool impl_isDisposed_nothrow() const
determines whether the instance is already disposed
static bool impl_allowAsynchronousCall_nothrow(const OUString &_rListenerType, const OUString &_rMethodName)
determines whether calling a given method at a given listener interface can be done asynchronously
virtual void SAL_CALL disposing(const EventObject &Source) override
FormScriptingEnvironment * m_pScriptExecutor
void impl_doFireScriptEvent_nothrow(std::unique_lock< std::mutex > &_rGuard, const ScriptEvent &_rEvent, Any *_pSynchronousResult)
fires the given script event in a thread-safe manner
DECL_LINK(OnAsyncScriptEvent, void *, void)
virtual Any SAL_CALL approveFiring(const ScriptEvent &aEvent) override
virtual void SAL_CALL firing(const ScriptEvent &aEvent) override
virtual ~FormScriptListener() override
FormScriptListener(FormScriptingEnvironment *pScriptExecutor)
describes the interface implemented by a component which handles scripting requirements in a form/con...
void revokeEventAttacherManager(const css::uno::Reference< css::script::XEventAttacherManager > &_rxManager)
registers an XEventAttacherManager whose events should not be monitored and handled anymore
void dispose()
disposes the scripting environment instance
void doFireScriptEvent(const css::script::ScriptEvent &_rEvent, css::uno::Any *_pSynchronousResult)
void impl_registerOrRevoke_throw(const css::uno::Reference< css::script::XEventAttacherManager > &_rxManager, bool _bRegister)
void registerEventAttacherManager(const css::uno::Reference< css::script::XEventAttacherManager > &_rxManager)
registers an XEventAttacherManager whose events should be monitored and handled
rtl::Reference< FormScriptListener > m_pScriptListener
FormScriptingEnvironment(FmFormModel &_rModel)
bool is() const
#define DBG_ASSERT(sCon, aError)
#define DBG_UNHANDLED_EXCEPTION(...)
bool m_bDisposed
std::mutex m_aMutex
void * p
@ Exception
class SAL_NO_VTABLE XPropertySet
Definition: xmlexchg.hxx:29
class FmSearchEngine - Impl class for FmSearchDialog
::cppu::WeakImplHelper< XScriptListener > FormScriptListener_Base
IMPL_LINK(XFormsPage, PopupMenuHdl, const CommandEvent &, rCEvt, bool)
Definition: datanavi.cxx:136
def invoke(object, methodname, argTuple)