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