LibreOffice Module sc (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ScVbaEventsHelper Class Reference

#include <vbaeventshelper.hxx>

Inheritance diagram for ScVbaEventsHelper:
[legend]
Collaboration diagram for ScVbaEventsHelper:
[legend]

Public Member Functions

 ScVbaEventsHelper (const css::uno::Sequence< css::uno::Any > &rArgs)
 
virtual ~ScVbaEventsHelper () override
 
virtual void SAL_CALL notifyEvent (const css::document::EventObject &rEvent) override
 
OUString SAL_CALL getImplementationName () override
 
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
- Public Member Functions inherited from VbaEventsHelperBase
 VbaEventsHelperBase (const css::uno::Sequence< css::uno::Any > &rArgs)
 
virtual ~VbaEventsHelperBase () override
 
virtual sal_Bool SAL_CALL hasVbaEventHandler (sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any > &rArgs) override
 
virtual sal_Bool SAL_CALL processVbaEvent (sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any > &rArgs) override
 
virtual void SAL_CALL notifyEvent (const css::document::EventObject &rEvent) override
 
virtual void SAL_CALL changesOccurred (const css::util::ChangesEvent &rEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEvent) override
 
sal_Bool SAL_CALL supportsService (OUString const &ServiceName) override
 
bool hasModule (const OUString &rModuleName)
 
void processVbaEventNoThrow (sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any > &rArgs)
 

Protected Member Functions

virtual bool implPrepareEvent (EventQueue &rEventQueue, const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs) override
 
virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList (const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs) override
 
virtual void implPostProcessEvent (EventQueue &rEventQueue, const EventHandlerInfo &rInfo, bool bCancel) override
 
virtual OUString implGetDocumentModuleName (const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs) const override
 
- Protected Member Functions inherited from VbaEventsHelperBase
void registerEventHandler (sal_Int32 nEventId, sal_Int32 nModuleType, const char *pcMacroName, sal_Int32 nCancelIndex=-1, const css::uno::Any &rUserData=css::uno::Any())
 
virtual bool implPrepareEvent (EventQueue &rEventQueue, const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs)=0
 
virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList (const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs)=0
 
virtual void implPostProcessEvent (EventQueue &rEventQueue, const EventHandlerInfo &rInfo, bool bCancel)=0
 
virtual OUString implGetDocumentModuleName (const EventHandlerInfo &rInfo, const css::uno::Sequence< css::uno::Any > &rArgs) const=0
 

Private Member Functions

bool isSelectionChanged (const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex)
 Checks if selection has been changed compared to selection of last call. More...
 
css::uno::Any createWorksheet (const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex) const
 Creates a VBA Worksheet object (the argument must contain a sheet index). More...
 
css::uno::Any createRange (const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex) const
 Creates a VBA Range object (the argument must contain a UNO range or UNO range list). More...
 
css::uno::Any createHyperlink (const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex) const
 Creates a VBA Hyperlink object (the argument must contain a UNO cell). More...
 
css::uno::Any createWindow (const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex) const
 Creates a VBA Window object (the argument must contain a model controller). More...
 

Private Attributes

::rtl::Reference< ScVbaEventListenermxListener
 
css::uno::Any maOldSelection
 
ScDocShellmpDocShell
 
ScDocumentmpDoc
 
bool mbOpened
 

Additional Inherited Members

- Static Public Member Functions inherited from VbaEventsHelperBase
static void checkArgument (const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex)
 
static void checkArgumentType (const css::uno::Sequence< css::uno::Any > &rArgs, sal_Int32 nIndex)
 
- Protected Types inherited from VbaEventsHelperBase
typedef ::std::deque< EventQueueEntry > EventQueue
 
- Protected Attributes inherited from VbaEventsHelperBase
css::uno::Reference< css::frame::XModel > mxModel
 
SfxObjectShellmpShell
 

Detailed Description

Definition at line 29 of file vbaeventshelper.hxx.

Constructor & Destructor Documentation

◆ ScVbaEventsHelper()

ScVbaEventsHelper::ScVbaEventsHelper ( const css::uno::Sequence< css::uno::Any > &  rArgs)

◆ ~ScVbaEventsHelper()

ScVbaEventsHelper::~ScVbaEventsHelper ( )
overridevirtual

Definition at line 567 of file vbaeventshelper.cxx.

Member Function Documentation

◆ createHyperlink()

uno::Any ScVbaEventsHelper::createHyperlink ( const css::uno::Sequence< css::uno::Any > &  rArgs,
sal_Int32  nIndex 
) const
private

Creates a VBA Hyperlink object (the argument must contain a UNO cell).

Exceptions
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 872 of file vbaeventshelper.cxx.

References createVBAUnoAPIServiceWithArgs(), ooo::vba::excel::getUnoSheetModuleObj(), VbaEventsHelperBase::mpShell, and nIndex.

Referenced by implBuildArgumentList().

◆ createRange()

uno::Any ScVbaEventsHelper::createRange ( const css::uno::Sequence< css::uno::Any > &  rArgs,
sal_Int32  nIndex 
) const
private

Creates a VBA Range object (the argument must contain a UNO range or UNO range list).

Exceptions
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 847 of file vbaeventshelper.cxx.

References createVBAUnoAPIServiceWithArgs(), ooo::vba::excel::getUnoSheetModuleObj(), VbaEventsHelperBase::mpShell, and nIndex.

Referenced by implBuildArgumentList().

◆ createWindow()

uno::Any ScVbaEventsHelper::createWindow ( const css::uno::Sequence< css::uno::Any > &  rArgs,
sal_Int32  nIndex 
) const
private

Creates a VBA Window object (the argument must contain a model controller).

Exceptions
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 881 of file vbaeventshelper.cxx.

References createVBAUnoAPIServiceWithArgs(), getVBADocument(), VbaEventsHelperBase::mpShell, VbaEventsHelperBase::mxModel, and nIndex.

Referenced by implBuildArgumentList().

◆ createWorksheet()

uno::Any ScVbaEventsHelper::createWorksheet ( const css::uno::Sequence< css::uno::Any > &  rArgs,
sal_Int32  nIndex 
) const
private

Creates a VBA Worksheet object (the argument must contain a sheet index).

Exceptions
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 840 of file vbaeventshelper.cxx.

References ooo::vba::excel::getUnoSheetModuleObj(), VbaEventsHelperBase::mxModel, and nIndex.

Referenced by implBuildArgumentList().

◆ getImplementationName()

OUString ScVbaEventsHelper::getImplementationName ( )
override

Definition at line 622 of file vbaeventshelper.cxx.

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > ScVbaEventsHelper::getSupportedServiceNames ( )
override

Definition at line 627 of file vbaeventshelper.cxx.

◆ implBuildArgumentList()

uno::Sequence< uno::Any > ScVbaEventsHelper::implBuildArgumentList ( const EventHandlerInfo &  rInfo,
const css::uno::Sequence< css::uno::Any > &  rArgs 
)
overrideprotectedvirtual

◆ implGetDocumentModuleName()

OUString ScVbaEventsHelper::implGetDocumentModuleName ( const EventHandlerInfo &  rInfo,
const css::uno::Sequence< css::uno::Any > &  rArgs 
) const
overrideprotectedvirtual

Implements VbaEventsHelperBase.

Definition at line 788 of file vbaeventshelper.cxx.

References ScDocument::GetCodeName(), and mpDoc.

◆ implPostProcessEvent()

void ScVbaEventsHelper::implPostProcessEvent ( EventQueue rEventQueue,
const EventHandlerInfo &  rInfo,
bool  bCancel 
)
overrideprotectedvirtual

◆ implPrepareEvent()

bool ScVbaEventsHelper::implPrepareEvent ( EventQueue rEventQueue,
const EventHandlerInfo &  rInfo,
const css::uno::Sequence< css::uno::Any > &  rArgs 
)
overrideprotectedvirtual

◆ isSelectionChanged()

bool ScVbaEventsHelper::isSelectionChanged ( const css::uno::Sequence< css::uno::Any > &  rArgs,
sal_Int32  nIndex 
)
private

Checks if selection has been changed compared to selection of last call.

Returns
true, if the selection has been changed.
Exceptions
css::lang::IllegalArgumentException
css::uno::RuntimeException

Definition at line 829 of file vbaeventshelper.cxx.

References maOldSelection, and nIndex.

Referenced by implPrepareEvent().

◆ notifyEvent()

void SAL_CALL ScVbaEventsHelper::notifyEvent ( const css::document::EventObject &  rEvent)
overridevirtual

Member Data Documentation

◆ maOldSelection

css::uno::Any ScVbaEventsHelper::maOldSelection
private

Definition at line 78 of file vbaeventshelper.hxx.

Referenced by implPrepareEvent(), and isSelectionChanged().

◆ mbOpened

bool ScVbaEventsHelper::mbOpened
private

Definition at line 81 of file vbaeventshelper.hxx.

Referenced by implPostProcessEvent(), and implPrepareEvent().

◆ mpDoc

ScDocument* ScVbaEventsHelper::mpDoc
private

◆ mpDocShell

ScDocShell* ScVbaEventsHelper::mpDocShell
private

Definition at line 79 of file vbaeventshelper.hxx.

Referenced by implPostProcessEvent(), and ScVbaEventsHelper().

◆ mxListener

::rtl::Reference< ScVbaEventListener > ScVbaEventsHelper::mxListener
private

Definition at line 77 of file vbaeventshelper.hxx.

Referenced by implPostProcessEvent(), and notifyEvent().


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