#include <vbaeventshelperbase.hxx>
|
void | registerEventHandler (sal_Int32 nEventId, sal_Int32 nModuleType, const char *pcMacroName, sal_Int32 nCancelIndex=-1, const css::uno::Any &rUserData=css::uno::Any()) |
| Registers a supported event handler. More...
|
|
virtual bool | implPrepareEvent (EventQueue &rEventQueue, const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs)=0 |
| Derived classes do additional preparations and return whether the event handler has to be called. More...
|
|
virtual css::uno::Sequence< css::uno::Any > | implBuildArgumentList (const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs)=0 |
| Derived classes have to return the argument list for the specified VBA event handler. More...
|
|
virtual void | implPostProcessEvent (EventQueue &rEventQueue, const EventHandlerInfo &rInfo, bool bCancel)=0 |
| Derived classes may do additional postprocessing. More...
|
|
virtual OUString | implGetDocumentModuleName (const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs) const =0 |
| Derived classes have to return the name of the Basic document module. More...
|
|
Definition at line 57 of file vbaeventshelperbase.hxx.
◆ EventHandlerInfoMap
◆ EventHandlerPathMap
◆ EventQueue
◆ ModulePathMap
◆ VbaEventsHelperBase()
VbaEventsHelperBase::VbaEventsHelperBase |
( |
const css::uno::Sequence< css::uno::Any > & |
rArgs | ) |
|
◆ ~VbaEventsHelperBase()
VbaEventsHelperBase::~VbaEventsHelperBase |
( |
| ) |
|
|
overridevirtual |
◆ changesOccurred()
void SAL_CALL VbaEventsHelperBase::changesOccurred |
( |
const css::util::ChangesEvent & |
rEvent | ) |
|
|
overridevirtual |
◆ checkArgument()
static void VbaEventsHelperBase::checkArgument |
( |
const css::uno::Sequence< css::uno::Any > & |
rArgs, |
|
|
sal_Int32 |
nIndex |
|
) |
| |
|
inlinestatic |
◆ checkArgumentType()
static void VbaEventsHelperBase::checkArgumentType |
( |
const css::uno::Sequence< css::uno::Any > & |
rArgs, |
|
|
sal_Int32 |
nIndex |
|
) |
| |
|
inlinestatic |
- Exceptions
-
css::lang::IllegalArgumentException | if the passed sequence does not contain a value of a specific at the specified index. |
Definition at line 92 of file vbaeventshelperbase.hxx.
References nIndex.
◆ disposing()
void SAL_CALL VbaEventsHelperBase::disposing |
( |
const css::lang::EventObject & |
rEvent | ) |
|
|
overridevirtual |
◆ ensureVBALibrary()
void VbaEventsHelperBase::ensureVBALibrary |
( |
| ) |
|
|
private |
◆ getEventHandlerInfo()
◆ getEventHandlerPath()
OUString VbaEventsHelperBase::getEventHandlerPath |
( |
const EventHandlerInfo & |
rInfo, |
|
|
const css::uno::Sequence< css::uno::Any > & |
rArgs |
|
) |
| |
|
private |
◆ getModuleType()
sal_Int32 VbaEventsHelperBase::getModuleType |
( |
const OUString & |
rModuleName | ) |
|
|
private |
◆ hasModule()
bool VbaEventsHelperBase::hasModule |
( |
const OUString & |
rModuleName | ) |
|
◆ hasVbaEventHandler()
sal_Bool SAL_CALL VbaEventsHelperBase::hasVbaEventHandler |
( |
sal_Int32 |
nEventId, |
|
|
const css::uno::Sequence< css::uno::Any > & |
rArgs |
|
) |
| |
|
overridevirtual |
◆ implBuildArgumentList()
virtual css::uno::Sequence< css::uno::Any > VbaEventsHelperBase::implBuildArgumentList |
( |
const EventHandlerInfo & |
rInfo, |
|
|
const css::uno::Sequence< css::uno::Any > & |
rArgs |
|
) |
| |
|
protectedpure virtual |
Derived classes have to return the argument list for the specified VBA event handler.
- Exceptions
-
css::lang::IllegalArgumentException | |
css::uno::RuntimeException | |
Referenced by processVbaEvent().
◆ implGetDocumentModuleName()
virtual OUString VbaEventsHelperBase::implGetDocumentModuleName |
( |
const EventHandlerInfo & |
rInfo, |
|
|
const css::uno::Sequence< css::uno::Any > & |
rArgs |
|
) |
| const |
|
protectedpure virtual |
◆ implPostProcessEvent()
Derived classes may do additional postprocessing.
Called even if the event handler does not exist, or if an error occurred during execution.
- Exceptions
-
css::uno::RuntimeException | |
Referenced by processVbaEvent().
◆ implPrepareEvent()
virtual bool VbaEventsHelperBase::implPrepareEvent |
( |
EventQueue & |
rEventQueue, |
|
|
const EventHandlerInfo & |
rInfo, |
|
|
const css::uno::Sequence< css::uno::Any > & |
rArgs |
|
) |
| |
|
protectedpure virtual |
Derived classes do additional preparations and return whether the event handler has to be called.
- Exceptions
-
css::uno::RuntimeException | |
Referenced by processVbaEvent().
◆ notifyEvent()
void SAL_CALL VbaEventsHelperBase::notifyEvent |
( |
const css::document::EventObject & |
rEvent | ) |
|
|
overridevirtual |
◆ processVbaEvent()
sal_Bool SAL_CALL VbaEventsHelperBase::processVbaEvent |
( |
sal_Int32 |
nEventId, |
|
|
const css::uno::Sequence< css::uno::Any > & |
rArgs |
|
) |
| |
|
overridevirtual |
Definition at line 61 of file vbaeventshelperbase.cxx.
References checkArgument(), executeMacro(), ooo::vba::extractBoolFromAny(), getEventHandlerInfo(), getEventHandlerPath(), implBuildArgumentList(), implPostProcessEvent(), implPrepareEvent(), VbaEventsHelperBase::EventHandlerInfo::maMacroName, mbDisposed, VbaEventsHelperBase::EventHandlerInfo::mnCancelIndex, mpShell, mxModel, and SAL_INFO.
Referenced by processVbaEventNoThrow().
◆ processVbaEventNoThrow()
void VbaEventsHelperBase::processVbaEventNoThrow |
( |
sal_Int32 |
nEventId, |
|
|
const css::uno::Sequence< css::uno::Any > & |
rArgs |
|
) |
| |
◆ registerEventHandler()
void VbaEventsHelperBase::registerEventHandler |
( |
sal_Int32 |
nEventId, |
|
|
sal_Int32 |
nModuleType, |
|
|
const char * |
pcMacroName, |
|
|
sal_Int32 |
nCancelIndex = -1 , |
|
|
const css::uno::Any & |
rUserData = css::uno::Any() |
|
) |
| |
|
protected |
◆ startListening()
void VbaEventsHelperBase::startListening |
( |
| ) |
|
|
private |
◆ stopListening()
void VbaEventsHelperBase::stopListening |
( |
| ) |
|
|
private |
◆ supportsService()
sal_Bool VbaEventsHelperBase::supportsService |
( |
OUString const & |
ServiceName | ) |
|
|
override |
◆ updateModulePathMap()
Updates the map containing paths to event handlers for a Basic module.
- Exceptions
-
css::uno::RuntimeException | |
Definition at line 361 of file vbaeventshelperbase.cxx.
References getImplementationName(), getModuleType(), implGetDocumentModuleName(), maEventInfos, maEventPaths, maLibraryName, VbaEventsHelperBase::EventHandlerInfo::maMacroName, VbaEventsHelperBase::EventHandlerInfo::mnEventId, VbaEventsHelperBase::EventHandlerInfo::mnModuleType, mpShell, resolveVBAMacro(), and sName.
Referenced by getEventHandlerPath().
◆ maEventInfos
◆ maEventPaths
◆ maLibraryName
OUString VbaEventsHelperBase::maLibraryName |
|
private |
◆ mbDisposed
bool VbaEventsHelperBase::mbDisposed |
|
private |
◆ mpShell
◆ mxModel
css::uno::Reference< css::frame::XModel > VbaEventsHelperBase::mxModel |
|
protected |
◆ mxModuleInfos
css::uno::Reference< css::script::vba::XVBAModuleInfo > VbaEventsHelperBase::mxModuleInfos |
|
private |
The documentation for this class was generated from the following files: