1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
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
;
62 class DialogSFScriptListenerImpl
: public DialogScriptListenerImpl
65 Reference
< frame::XModel
> m_xModel
;
66 virtual void firing_impl( const script::ScriptEvent
& aScriptEvent
, uno::Any
* pRet
) override
;
68 DialogSFScriptListenerImpl( const Reference
< XComponentContext
>& rxContext
, const Reference
< frame::XModel
>& rxModel
) : DialogScriptListenerImpl( rxContext
), m_xModel( rxModel
) {}
71 class DialogLegacyScriptListenerImpl
: public DialogSFScriptListenerImpl
74 virtual void firing_impl( const script::ScriptEvent
& aScriptEvent
, uno::Any
* pRet
) override
;
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
;
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
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
;
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);
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
;
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
198 Reference
< XScriptEventsSupplier
> DialogEventsAttacherImpl::getFakeVbaEventsSupplier( const Reference
< XControl
>& xControl
, OUString
const & sControlName
)
200 Reference
< XScriptEventsSupplier
> xEventsSupplier
;
201 Reference
< XMultiComponentFactory
> xSMgr( m_xContext
->getServiceManager() );
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
] );
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() )
253 catch ( const Exception
& )
255 DBG_UNHANDLED_EXCEPTION("scripting");
260 // if we had no success, try to attach to the control
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
>&,
332 ::osl::MutexGuard
aGuard( getMutex() );
334 if ( !m_xEventAttacher
.is() )
336 Reference
< XMultiComponentFactory
> xSMgr( m_xContext
->getServiceManager() );
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() )
395 *pRet
= m_xScriptListener
->approveFiring( aScriptEvent
);
397 m_xScriptListener
->firing( aScriptEvent
);
405 void DialogAllListenerImpl::disposing(const EventObject
& )
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() );
426 firing_impl( Event
, &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
;
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() );
468 OSL_ASSERT( m_xContext
.is() );
469 if ( m_xContext
.is() )
471 Reference
< provider::XScriptProviderFactory
> xFactory
=
472 provider::theMasterScriptProviderFactory::get( m_xContext
);
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" );
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
);
502 catch ( const Exception
& )
504 DBG_UNHANDLED_EXCEPTION("scripting");
508 void DialogLegacyScriptListenerImpl::firing_impl( const ScriptEvent
& aScriptEvent
, Any
* pRet
)
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
);
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
);
561 if( !bHandled
&& m_xIntrospectionAccess
.is() )
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 )
578 rxMethod
->invoke( aHandlerObject
, args
);
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
;
593 Reference
< XWindow
> xWindow( m_xControl
, UNO_QUERY
);
594 pArgs
[0] <<= xWindow
;
596 pArgs
[1] = aEventObject
;
597 aRet
= rxMethod
->invoke( aHandlerObject
, Args
);
601 catch( const Exception
& )
603 DBG_UNHANDLED_EXCEPTION("scripting");
614 OUString
aRes(SfxResId(STR_ERRUNOEVENTBINDUNG
));
615 OUString
aQuoteChar( "\"" );
617 sal_Int32 nIndex
= aRes
.indexOf( '%' );
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
));
636 void DialogScriptListenerImpl::disposing(const EventObject
& )
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() );
657 firing_impl( aScriptEvent
, &aReturn
);
662 } // namespace dlgprov
665 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */