LibreOffice Module svx (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
svxform::FormScriptListener Class Reference

implements the XScriptListener interface, is used by FormScriptingEnvironment More...

Inheritance diagram for svxform::FormScriptListener:
[legend]
Collaboration diagram for svxform::FormScriptListener:
[legend]

Public Member Functions

 FormScriptListener (FormScriptingEnvironment *pScriptExecutor)
 
virtual void SAL_CALL firing (const ScriptEvent &aEvent) override
 
virtual Any SAL_CALL approveFiring (const ScriptEvent &aEvent) override
 
virtual void SAL_CALL disposing (const EventObject &Source) override
 
void dispose ()
 

Protected Member Functions

virtual ~FormScriptListener () override
 

Private Member Functions

bool impl_isDisposed_nothrow () const
 determines whether the instance is already disposed More...
 
void impl_doFireScriptEvent_nothrow (std::unique_lock< std::mutex > &_rGuard, const ScriptEvent &_rEvent, Any *_pSynchronousResult)
 fires the given script event in a thread-safe manner More...
 
 DECL_LINK (OnAsyncScriptEvent, void *, void)
 

Static Private Member Functions

static bool impl_allowAsynchronousCall_nothrow (const OUString &_rListenerType, const OUString &_rMethodName)
 determines whether calling a given method at a given listener interface can be done asynchronously More...
 

Private Attributes

std::mutex m_aMutex
 
FormScriptingEnvironmentm_pScriptExecutor
 

Detailed Description

implements the XScriptListener interface, is used by FormScriptingEnvironment

Definition at line 73 of file fmscriptingenv.cxx.

Constructor & Destructor Documentation

◆ FormScriptListener()

svxform::FormScriptListener::FormScriptListener ( FormScriptingEnvironment pScriptExecutor)
explicit

Definition at line 132 of file fmscriptingenv.cxx.

◆ ~FormScriptListener()

svxform::FormScriptListener::~FormScriptListener ( )
overrideprotectedvirtual

Definition at line 138 of file fmscriptingenv.cxx.

Member Function Documentation

◆ approveFiring()

Any SAL_CALL svxform::FormScriptListener::approveFiring ( const ScriptEvent &  aEvent)
overridevirtual

◆ DECL_LINK()

svxform::FormScriptListener::DECL_LINK ( OnAsyncScriptEvent  ,
void *  ,
void   
)
private

◆ dispose()

void svxform::FormScriptListener::dispose ( void  )

Definition at line 727 of file fmscriptingenv.cxx.

References m_aMutex, and m_pScriptExecutor.

◆ disposing()

void SAL_CALL svxform::FormScriptListener::disposing ( const EventObject &  Source)
overridevirtual

Definition at line 721 of file fmscriptingenv.cxx.

◆ firing()

void SAL_CALL svxform::FormScriptListener::firing ( const ScriptEvent &  aEvent)
overridevirtual

◆ impl_allowAsynchronousCall_nothrow()

bool svxform::FormScriptListener::impl_allowAsynchronousCall_nothrow ( const OUString &  _rListenerType,
const OUString &  _rMethodName 
)
staticprivate

determines whether calling a given method at a given listener interface can be done asynchronously

Parameters
_rListenerTypethe name of the UNO type whose method is to be checked
_rMethodNamethe name of the method at the interface determined by _rListenerType
Returns
<TRUE> if and only if the method is declared oneway, i.e. can be called asynchronously

Definition at line 143 of file fmscriptingenv.cxx.

Referenced by firing().

◆ impl_doFireScriptEvent_nothrow()

void svxform::FormScriptListener::impl_doFireScriptEvent_nothrow ( std::unique_lock< std::mutex > &  _rGuard,
const ScriptEvent &  _rEvent,
Any *  _pSynchronousResult 
)
private

fires the given script event in a thread-safe manner

This methods calls our script executor's doFireScriptEvent, with previously releasing the given mutex guard, but ensuring that our script executor is not deleted between this release and the actual call.

Parameters
_rGuarda clearable guard to our mutex. Must be the only active guard to our mutex.
_rEventthe event to fire
_pSynchronousResulta place to take a possible result of the script call.

@precond m_pScriptExecutor is not <NULL>.

Definition at line 679 of file fmscriptingenv.cxx.

References svxform::FormScriptingEnvironment::doFireScriptEvent(), and m_pScriptExecutor.

Referenced by approveFiring(), and firing().

◆ impl_isDisposed_nothrow()

bool svxform::FormScriptListener::impl_isDisposed_nothrow ( ) const
inlineprivate

determines whether the instance is already disposed

Definition at line 109 of file fmscriptingenv.cxx.

References m_pScriptExecutor.

Referenced by approveFiring(), and firing().

Member Data Documentation

◆ m_aMutex

std::mutex svxform::FormScriptListener::m_aMutex
private

Definition at line 76 of file fmscriptingenv.cxx.

Referenced by approveFiring(), dispose(), and firing().

◆ m_pScriptExecutor

FormScriptingEnvironment* svxform::FormScriptListener::m_pScriptExecutor
private

The documentation for this class was generated from the following file: