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 (::osl::ClearableMutexGuard &_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

::osl::Mutex m_aMutex
 
FormScriptingEnvironmentm_pScriptExecutor
 

Detailed Description

implements the XScriptListener interface, is used by FormScriptingEnvironment

Definition at line 84 of file fmscriptingenv.cxx.

Constructor & Destructor Documentation

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

Definition at line 172 of file fmscriptingenv.cxx.

svxform::FormScriptListener::~FormScriptListener ( )
overrideprotectedvirtual

Definition at line 178 of file fmscriptingenv.cxx.

Member Function Documentation

Any SAL_CALL svxform::FormScriptListener::approveFiring ( const ScriptEvent &  aEvent)
overridevirtual
svxform::FormScriptListener::DECL_LINK ( OnAsyncScriptEvent  ,
void ,
void   
)
private
void svxform::FormScriptListener::dispose ( void  )

Definition at line 767 of file fmscriptingenv.cxx.

References m_aMutex, and m_pScriptExecutor.

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

Definition at line 761 of file fmscriptingenv.cxx.

void SAL_CALL svxform::FormScriptListener::firing ( const ScriptEvent &  aEvent)
overridevirtual
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 183 of file fmscriptingenv.cxx.

Referenced by firing().

void svxform::FormScriptListener::impl_doFireScriptEvent_nothrow ( ::osl::ClearableMutexGuard &  _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.

m_pScriptExecutor is not <NULL>.

Definition at line 719 of file fmscriptingenv.cxx.

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

Referenced by approveFiring(), and firing().

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

determines whether the instance is already disposed

Definition at line 120 of file fmscriptingenv.cxx.

References m_pScriptExecutor.

Referenced by approveFiring(), and firing().

Member Data Documentation

::osl::Mutex svxform::FormScriptListener::m_aMutex
private

Definition at line 87 of file fmscriptingenv.cxx.

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

FormScriptingEnvironment* svxform::FormScriptListener::m_pScriptExecutor
private

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