bump product version to 6.3.0.0.beta1
[LibreOffice.git] / scripting / source / dlgprov / dlgevtatt.cxx
blob1f99c6f5d87981de17cc41fcd4d48e18805726d3
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 "dlgevtatt.hxx"
22 #include "dlgprov.hxx"
24 #include <sfx2/strings.hrc>
25 #include <sfx2/app.hxx>
26 #include <sfx2/sfxresid.hxx>
27 #include <vcl/svapp.hxx>
28 #include <vcl/weld.hxx>
29 #include <tools/diagnose_ex.h>
31 #include <com/sun/star/awt/XControl.hpp>
32 #include <com/sun/star/awt/XControlContainer.hpp>
33 #include <com/sun/star/awt/XDialogEventHandler.hpp>
34 #include <com/sun/star/awt/XContainerWindowEventHandler.hpp>
35 #include <com/sun/star/beans/XPropertySet.hpp>
36 #include <com/sun/star/script/ScriptEventDescriptor.hpp>
37 #include <com/sun/star/script/XScriptEventsSupplier.hpp>
38 #include <com/sun/star/script/provider/XScriptProvider.hpp>
39 #include <com/sun/star/script/provider/theMasterScriptProviderFactory.hpp>
40 #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
41 #include <com/sun/star/script/vba/XVBACompatibility.hpp>
42 #include <com/sun/star/lang/NoSuchMethodException.hpp>
43 #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
44 #include <com/sun/star/reflection/XIdlMethod.hpp>
45 #include <com/sun/star/beans/MethodConcept.hpp>
46 #include <com/sun/star/beans/XMaterialHolder.hpp>
48 #include <ooo/vba/XVBAToOOEventDescGen.hpp>
50 using namespace ::com::sun::star;
51 using namespace ::com::sun::star::awt;
52 using namespace ::com::sun::star::beans;
53 using namespace ::com::sun::star::lang;
54 using namespace ::com::sun::star::script;
55 using namespace ::com::sun::star::uno;
56 using namespace ::com::sun::star::reflection;
59 namespace dlgprov
62 class DialogSFScriptListenerImpl : public DialogScriptListenerImpl
64 protected:
65 Reference< frame::XModel > m_xModel;
66 virtual void firing_impl( const script::ScriptEvent& aScriptEvent, uno::Any* pRet ) override;
67 public:
68 DialogSFScriptListenerImpl( const Reference< XComponentContext >& rxContext, const Reference< frame::XModel >& rxModel ) : DialogScriptListenerImpl( rxContext ), m_xModel( rxModel ) {}
71 class DialogLegacyScriptListenerImpl : public DialogSFScriptListenerImpl
73 protected:
74 virtual void firing_impl( const script::ScriptEvent& aScriptEvent, uno::Any* pRet ) override;
75 public:
76 DialogLegacyScriptListenerImpl( const Reference< XComponentContext >& rxContext, const Reference< frame::XModel >& rxModel ) : DialogSFScriptListenerImpl( rxContext, rxModel ){}
79 class DialogUnoScriptListenerImpl : public DialogSFScriptListenerImpl
81 Reference< awt::XControl > m_xControl;
82 Reference< XInterface > m_xHandler;
83 Reference< beans::XIntrospectionAccess > m_xIntrospectionAccess;
84 bool const m_bDialogProviderMode;
86 virtual void firing_impl( const script::ScriptEvent& aScriptEvent, uno::Any* pRet ) override;
88 public:
89 DialogUnoScriptListenerImpl( const Reference< XComponentContext >& rxContext,
90 const Reference< frame::XModel >& rxModel,
91 const Reference< awt::XControl >& rxControl,
92 const Reference< XInterface >& rxHandler,
93 const Reference< beans::XIntrospectionAccess >& rxIntrospectionAccess,
94 bool bDialogProviderMode ); // false: ContainerWindowProvider mode
98 class DialogVBAScriptListenerImpl : public DialogScriptListenerImpl
100 protected:
101 OUString msDialogCodeName;
102 OUString const msDialogLibName;
103 Reference< script::XScriptListener > mxListener;
104 virtual void firing_impl( const script::ScriptEvent& aScriptEvent, uno::Any* pRet ) override;
105 public:
106 DialogVBAScriptListenerImpl( const Reference< XComponentContext >& rxContext, const Reference< awt::XControl >& rxControl, const Reference< frame::XModel >& xModel, const OUString& sDialogLibName );
109 DialogVBAScriptListenerImpl::DialogVBAScriptListenerImpl( const Reference< XComponentContext >& rxContext, const Reference< awt::XControl >& rxControl, const Reference< frame::XModel >& xModel, const OUString& sDialogLibName ) : DialogScriptListenerImpl( rxContext ), msDialogLibName( sDialogLibName )
111 Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
112 Sequence< Any > args(1);
113 if ( xSMgr.is() )
115 args[0] <<= xModel;
116 mxListener.set( xSMgr->createInstanceWithArgumentsAndContext( "ooo.vba.EventListener", args, m_xContext ), UNO_QUERY );
118 if ( rxControl.is() )
122 Reference< XPropertySet > xProps( rxControl->getModel(), UNO_QUERY_THROW );
123 xProps->getPropertyValue("Name") >>= msDialogCodeName;
124 xProps.set( mxListener, UNO_QUERY_THROW );
125 xProps->setPropertyValue("Model", args[ 0 ] );
127 catch( const Exception& )
129 DBG_UNHANDLED_EXCEPTION("scripting");
135 void DialogVBAScriptListenerImpl::firing_impl( const script::ScriptEvent& aScriptEvent, uno::Any* )
137 if ( aScriptEvent.ScriptType == "VBAInterop" && mxListener.is() )
139 ScriptEvent aScriptEventCopy( aScriptEvent );
140 aScriptEventCopy.ScriptCode = msDialogLibName.concat( "." ).concat( msDialogCodeName );
143 mxListener->firing( aScriptEventCopy );
145 catch( const Exception& )
147 DBG_UNHANDLED_EXCEPTION("scripting");
153 // DialogEventsAttacherImpl
156 DialogEventsAttacherImpl::DialogEventsAttacherImpl( const Reference< XComponentContext >& rxContext, const Reference< frame::XModel >& rxModel, const Reference< awt::XControl >& rxControl, const Reference< XInterface >& rxHandler, const Reference< beans::XIntrospectionAccess >& rxIntrospect, bool bProviderMode, const Reference< script::XScriptListener >& rxRTLListener, const OUString& sDialogLibName )
157 :mbUseFakeVBAEvents( false ), m_xContext( rxContext )
159 // key listeners by protocol when ScriptType = 'Script'
160 // otherwise key is the ScriptType e.g. StarBasic
161 if ( rxRTLListener.is() ) // set up handler for RTL_BASIC
162 listenersForTypes[ OUString("StarBasic") ] = rxRTLListener;
163 else
164 listenersForTypes[ OUString("StarBasic") ] = new DialogLegacyScriptListenerImpl( rxContext, rxModel );
165 // handler for Script & OUString("vnd.sun.star.UNO:")
166 listenersForTypes[ OUString("vnd.sun.star.UNO") ] = new DialogUnoScriptListenerImpl( rxContext, rxModel, rxControl, rxHandler, rxIntrospect, bProviderMode );
167 listenersForTypes[ OUString("vnd.sun.star.script") ] = new DialogSFScriptListenerImpl( rxContext, rxModel );
169 // determine the VBA compatibility mode from the Basic library container
172 uno::Reference< beans::XPropertySet > xModelProps( rxModel, uno::UNO_QUERY_THROW );
173 uno::Reference< script::vba::XVBACompatibility > xVBACompat(
174 xModelProps->getPropertyValue("BasicLibraries"), uno::UNO_QUERY_THROW );
175 mbUseFakeVBAEvents = xVBACompat->getVBACompatibilityMode();
177 catch( uno::Exception& )
180 if ( mbUseFakeVBAEvents )
181 listenersForTypes[ OUString("VBAInterop") ] = new DialogVBAScriptListenerImpl( rxContext, rxControl, rxModel, sDialogLibName );
185 DialogEventsAttacherImpl::~DialogEventsAttacherImpl()
190 Reference< script::XScriptListener > const &
191 DialogEventsAttacherImpl::getScriptListenerForKey( const OUString& sKey )
193 ListenerHash::iterator it = listenersForTypes.find( sKey );
194 if ( it == listenersForTypes.end() )
195 throw RuntimeException(); // more text info here please
196 return it->second;
198 Reference< XScriptEventsSupplier > DialogEventsAttacherImpl::getFakeVbaEventsSupplier( const Reference< XControl >& xControl, OUString const & sControlName )
200 Reference< XScriptEventsSupplier > xEventsSupplier;
201 Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
202 if ( xSMgr.is() )
204 Reference< ooo::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext("ooo.vba.VBAToOOEventDesc", m_xContext ), UNO_QUERY );
205 if ( xVBAToOOEvtDesc.is() )
206 xEventsSupplier.set( xVBAToOOEvtDesc->getEventSupplier( xControl, sControlName ), UNO_QUERY );
209 return xEventsSupplier;
213 void DialogEventsAttacherImpl::attachEventsToControl( const Reference< XControl>& xControl, const Reference< XScriptEventsSupplier >& xEventsSupplier, const Any& Helper )
215 if ( xEventsSupplier.is() )
217 Reference< container::XNameContainer > xEventCont = xEventsSupplier->getEvents();
219 Reference< XControlModel > xControlModel = xControl->getModel();
220 Reference< XPropertySet > xProps( xControlModel, uno::UNO_QUERY );
221 if ( xEventCont.is() )
223 Sequence< OUString > aNames = xEventCont->getElementNames();
224 const OUString* pNames = aNames.getConstArray();
225 sal_Int32 nNameCount = aNames.getLength();
227 for ( sal_Int32 j = 0; j < nNameCount; ++j )
229 ScriptEventDescriptor aDesc;
231 Any aElement = xEventCont->getByName( pNames[ j ] );
232 aElement >>= aDesc;
233 OUString sKey = aDesc.ScriptType;
234 if ( aDesc.ScriptType == "Script" || aDesc.ScriptType == "UNO" )
236 sal_Int32 nIndex = aDesc.ScriptCode.indexOf( ':' );
237 sKey = aDesc.ScriptCode.copy( 0, nIndex );
239 Reference< XAllListener > xAllListener =
240 new DialogAllListenerImpl( getScriptListenerForKey( sKey ), aDesc.ScriptType, aDesc.ScriptCode );
242 // try first to attach event to the ControlModel
243 bool bSuccess = false;
246 Reference< XEventListener > xListener_ = m_xEventAttacher->attachSingleEventListener(
247 xControlModel, xAllListener, Helper, aDesc.ListenerType,
248 aDesc.AddListenerParam, aDesc.EventMethod );
250 if ( xListener_.is() )
251 bSuccess = true;
253 catch ( const Exception& )
255 DBG_UNHANDLED_EXCEPTION("scripting");
260 // if we had no success, try to attach to the control
261 if ( !bSuccess )
263 m_xEventAttacher->attachSingleEventListener(
264 xControl, xAllListener, Helper, aDesc.ListenerType,
265 aDesc.AddListenerParam, aDesc.EventMethod );
268 catch ( const Exception& )
270 DBG_UNHANDLED_EXCEPTION("scripting");
278 void DialogEventsAttacherImpl::nestedAttachEvents( const Sequence< Reference< XInterface > >& Objects, const Any& Helper, OUString& sDialogCodeName )
280 const Reference< XInterface >* pObjects = Objects.getConstArray();
281 sal_Int32 nObjCount = Objects.getLength();
283 for ( sal_Int32 i = 0; i < nObjCount; ++i )
285 // We know that we have to do with instances of XControl.
286 // Otherwise this is not the right implementation for
287 // XScriptEventsAttacher and we have to give up.
288 Reference< XControl > xControl( pObjects[ i ], UNO_QUERY );
289 Reference< XControlContainer > xControlContainer( xControl, UNO_QUERY );
290 Reference< XDialog > xDialog( xControl, UNO_QUERY );
291 if ( !xControl.is() )
292 throw IllegalArgumentException();
294 // get XEventsSupplier from control model
295 Reference< XControlModel > xControlModel = xControl->getModel();
296 Reference< XScriptEventsSupplier > xEventsSupplier( xControlModel, UNO_QUERY );
297 attachEventsToControl( xControl, xEventsSupplier, Helper );
298 if ( mbUseFakeVBAEvents )
300 xEventsSupplier.set( getFakeVbaEventsSupplier( xControl, sDialogCodeName ) );
301 Any newHelper(xControl );
302 attachEventsToControl( xControl, xEventsSupplier, newHelper );
304 if ( xControlContainer.is() && !xDialog.is() )
306 Sequence< Reference< XControl > > aControls = xControlContainer->getControls();
307 sal_Int32 nControlCount = aControls.getLength();
309 Sequence< Reference< XInterface > > aObjects( nControlCount );
310 Reference< XInterface >* pObjects2 = aObjects.getArray();
311 const Reference< XControl >* pControls = aControls.getConstArray();
313 for ( sal_Int32 i2 = 0; i2 < nControlCount; ++i2 )
315 pObjects2[i2].set( pControls[i2], UNO_QUERY );
317 nestedAttachEvents( aObjects, Helper, sDialogCodeName );
323 // XScriptEventsAttacher
326 void SAL_CALL DialogEventsAttacherImpl::attachEvents( const Sequence< Reference< XInterface > >& Objects,
327 const css::uno::Reference<css::script::XScriptListener>&,
328 const Any& Helper )
330 // get EventAttacher
332 ::osl::MutexGuard aGuard( getMutex() );
334 if ( !m_xEventAttacher.is() )
336 Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() );
337 if ( !xSMgr.is() )
338 throw RuntimeException();
340 m_xEventAttacher.set( xSMgr->createInstanceWithContext(
341 "com.sun.star.script.EventAttacher", m_xContext ), UNO_QUERY );
343 if ( !m_xEventAttacher.is() )
344 throw ServiceNotRegisteredException();
347 OUString sDialogCodeName;
348 sal_Int32 nObjCount = Objects.getLength();
349 Reference< awt::XControl > xDlgControl( Objects[ nObjCount - 1 ], uno::UNO_QUERY ); // last object is the dialog
350 if ( xDlgControl.is() )
352 Reference< XPropertySet > xProps( xDlgControl->getModel(), UNO_QUERY );
355 xProps->getPropertyValue("Name") >>= sDialogCodeName;
357 catch( Exception& ){}
359 // go over all objects
360 nestedAttachEvents( Objects, Helper, sDialogCodeName );
364 // DialogAllListenerImpl
367 DialogAllListenerImpl::DialogAllListenerImpl( const Reference< XScriptListener >& rxListener,
368 const OUString& rScriptType, const OUString& rScriptCode )
369 :m_xScriptListener( rxListener )
370 ,m_sScriptType( rScriptType )
371 ,m_sScriptCode( rScriptCode )
376 DialogAllListenerImpl::~DialogAllListenerImpl()
381 void DialogAllListenerImpl::firing_impl( const AllEventObject& Event, Any* pRet )
383 ScriptEvent aScriptEvent;
384 aScriptEvent.Source = static_cast<OWeakObject *>(this); // get correct XInterface
385 aScriptEvent.ListenerType = Event.ListenerType;
386 aScriptEvent.MethodName = Event.MethodName;
387 aScriptEvent.Arguments = Event.Arguments;
388 aScriptEvent.Helper = Event.Helper;
389 aScriptEvent.ScriptType = m_sScriptType;
390 aScriptEvent.ScriptCode = m_sScriptCode;
392 if ( m_xScriptListener.is() )
394 if ( pRet )
395 *pRet = m_xScriptListener->approveFiring( aScriptEvent );
396 else
397 m_xScriptListener->firing( aScriptEvent );
402 // XEventListener
405 void DialogAllListenerImpl::disposing(const EventObject& )
410 // XAllListener
413 void DialogAllListenerImpl::firing( const AllEventObject& Event )
415 //::osl::MutexGuard aGuard( getMutex() );
417 firing_impl( Event, nullptr );
421 Any DialogAllListenerImpl::approveFiring( const AllEventObject& Event )
423 //::osl::MutexGuard aGuard( getMutex() );
425 Any aReturn;
426 firing_impl( Event, &aReturn );
427 return aReturn;
431 // DialogScriptListenerImpl
434 DialogUnoScriptListenerImpl::DialogUnoScriptListenerImpl( const Reference< XComponentContext >& rxContext,
435 const Reference< css::frame::XModel >& rxModel,
436 const Reference< css::awt::XControl >& rxControl,
437 const Reference< css::uno::XInterface >& rxHandler,
438 const Reference< css::beans::XIntrospectionAccess >& rxIntrospectionAccess,
439 bool bDialogProviderMode )
440 : DialogSFScriptListenerImpl( rxContext, rxModel )
441 ,m_xControl( rxControl )
442 ,m_xHandler( rxHandler )
443 ,m_xIntrospectionAccess( rxIntrospectionAccess )
444 ,m_bDialogProviderMode( bDialogProviderMode )
449 DialogScriptListenerImpl::~DialogScriptListenerImpl()
454 void DialogSFScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
458 Reference< provider::XScriptProvider > xScriptProvider;
459 if ( m_xModel.is() )
461 Reference< provider::XScriptProviderSupplier > xSupplier( m_xModel, UNO_QUERY );
462 OSL_ENSURE( xSupplier.is(), "DialogScriptListenerImpl::firing_impl: failed to get script provider supplier" );
463 if ( xSupplier.is() )
464 xScriptProvider.set( xSupplier->getScriptProvider() );
466 else
468 OSL_ASSERT( m_xContext.is() );
469 if ( m_xContext.is() )
471 Reference< provider::XScriptProviderFactory > xFactory =
472 provider::theMasterScriptProviderFactory::get( m_xContext );
474 Any aCtx;
475 aCtx <<= OUString("user");
476 xScriptProvider.set( xFactory->createScriptProvider( aCtx ), UNO_QUERY );
480 OSL_ENSURE( xScriptProvider.is(), "DialogScriptListenerImpl::firing_impl: failed to get script provider" );
482 if ( xScriptProvider.is() )
484 Reference< provider::XScript > xScript = xScriptProvider->getScript( aScriptEvent.ScriptCode );
485 OSL_ENSURE( xScript.is(), "DialogScriptListenerImpl::firing_impl: failed to get script" );
487 if ( xScript.is() )
489 Sequence< Any > aInParams;
490 Sequence< sal_Int16 > aOutParamsIndex;
491 Sequence< Any > aOutParams;
493 // get arguments for script
494 aInParams = aScriptEvent.Arguments;
496 Any aResult = xScript->invoke( aInParams, aOutParamsIndex, aOutParams );
497 if ( pRet )
498 *pRet = aResult;
502 catch ( const Exception& )
504 DBG_UNHANDLED_EXCEPTION("scripting");
508 void DialogLegacyScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
510 OUString sScriptURL;
511 OUString sScriptCode( aScriptEvent.ScriptCode );
513 if ( aScriptEvent.ScriptType == "StarBasic" )
515 // StarBasic script: convert ScriptCode to scriptURL
516 sal_Int32 nIndex = sScriptCode.indexOf( ':' );
517 if ( nIndex >= 0 && nIndex < sScriptCode.getLength() )
519 sScriptURL = "vnd.sun.star.script:";
520 sScriptURL += sScriptCode.copy( nIndex + 1 );
521 sScriptURL += "?language=Basic&location=";
522 sScriptURL += sScriptCode.copy( 0, nIndex );
524 ScriptEvent aSFScriptEvent( aScriptEvent );
525 aSFScriptEvent.ScriptCode = sScriptURL;
526 DialogSFScriptListenerImpl::firing_impl( aSFScriptEvent, pRet );
530 void DialogUnoScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
532 OUString aMethodName = aScriptEvent.ScriptCode.copy( strlen("vnd.sun.star.UNO:") );
534 const Any* pArguments = aScriptEvent.Arguments.getConstArray();
535 Any aEventObject = pArguments[0];
537 bool bHandled = false;
538 if( m_xHandler.is() )
540 if( m_bDialogProviderMode )
542 Reference< XDialogEventHandler > xDialogEventHandler( m_xHandler, UNO_QUERY );
543 if( xDialogEventHandler.is() )
545 Reference< XDialog > xDialog( m_xControl, UNO_QUERY );
546 bHandled = xDialogEventHandler->callHandlerMethod( xDialog, aEventObject, aMethodName );
549 else
551 Reference< XContainerWindowEventHandler > xContainerWindowEventHandler( m_xHandler, UNO_QUERY );
552 if( xContainerWindowEventHandler.is() )
554 Reference< XWindow > xWindow( m_xControl, UNO_QUERY );
555 bHandled = xContainerWindowEventHandler->callHandlerMethod( xWindow, aEventObject, aMethodName );
560 Any aRet;
561 if( !bHandled && m_xIntrospectionAccess.is() )
565 // call method
566 const Reference< XIdlMethod >& rxMethod = m_xIntrospectionAccess->
567 getMethod( aMethodName, MethodConcept::ALL - MethodConcept::DANGEROUS );
569 Reference< XMaterialHolder > xMaterialHolder =
570 Reference< XMaterialHolder >::query( m_xIntrospectionAccess );
571 Any aHandlerObject = xMaterialHolder->getMaterial();
573 Sequence< Reference< XIdlClass > > aParamTypeSeq = rxMethod->getParameterTypes();
574 sal_Int32 nParamCount = aParamTypeSeq.getLength();
575 if( nParamCount == 0 )
577 Sequence<Any> args;
578 rxMethod->invoke( aHandlerObject, args );
579 bHandled = true;
581 else if( nParamCount == 2 )
583 // Signature check automatically done by reflection
584 Sequence<Any> Args(2);
585 Any* pArgs = Args.getArray();
586 if( m_bDialogProviderMode )
588 Reference< XDialog > xDialog( m_xControl, UNO_QUERY );
589 pArgs[0] <<= xDialog;
591 else
593 Reference< XWindow > xWindow( m_xControl, UNO_QUERY );
594 pArgs[0] <<= xWindow;
596 pArgs[1] = aEventObject;
597 aRet = rxMethod->invoke( aHandlerObject, Args );
598 bHandled = true;
601 catch( const Exception& )
603 DBG_UNHANDLED_EXCEPTION("scripting");
607 if( bHandled )
609 if( pRet )
610 *pRet = aRet;
612 else
614 OUString aRes(SfxResId(STR_ERRUNOEVENTBINDUNG));
615 OUString aQuoteChar( "\"" );
617 sal_Int32 nIndex = aRes.indexOf( '%' );
619 OUString aOUFinal;
620 aOUFinal += aRes.copy( 0, nIndex );
621 aOUFinal += aQuoteChar;
622 aOUFinal += aMethodName;
623 aOUFinal += aQuoteChar;
624 aOUFinal += aRes.copy( nIndex + 2 );
626 std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr,
627 VclMessageType::Warning, VclButtonsType::Ok, aOUFinal));
628 xBox->run();
633 // XEventListener
636 void DialogScriptListenerImpl::disposing(const EventObject& )
641 // XScriptListener
644 void DialogScriptListenerImpl::firing( const ScriptEvent& aScriptEvent )
646 //::osl::MutexGuard aGuard( getMutex() );
648 firing_impl( aScriptEvent, nullptr );
652 Any DialogScriptListenerImpl::approveFiring( const ScriptEvent& aScriptEvent )
654 //::osl::MutexGuard aGuard( getMutex() );
656 Any aReturn;
657 firing_impl( aScriptEvent, &aReturn );
658 return aReturn;
662 } // namespace dlgprov
665 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */