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