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 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
 
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())
 

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 30 of file vbaeventshelper.hxx.

Constructor & Destructor Documentation

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

Definition at line 571 of file vbaeventshelper.cxx.

Member Function Documentation

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 888 of file vbaeventshelper.cxx.

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

Referenced by implBuildArgumentList().

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 861 of file vbaeventshelper.cxx.

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

Referenced by implBuildArgumentList().

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 898 of file vbaeventshelper.cxx.

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

Referenced by implBuildArgumentList().

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 854 of file vbaeventshelper.cxx.

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

Referenced by implBuildArgumentList().

OUString ScVbaEventsHelper::getImplementationName ( )
override

Definition at line 629 of file vbaeventshelper.cxx.

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

Definition at line 634 of file vbaeventshelper.cxx.

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

Implements VbaEventsHelperBase.

Definition at line 802 of file vbaeventshelper.cxx.

References ScDocument::GetCodeName(), and mpDoc.

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

Implements VbaEventsHelperBase.

Definition at line 782 of file vbaeventshelper.cxx.

References mbOpened, mpDocShell, mxListener, and VbaEventsHelperBase::mxModel.

bool ScVbaEventsHelper::implPrepareEvent ( EventQueue rEventQueue,
const EventHandlerInfo &  rInfo,
const css::uno::Sequence< css::uno::Any > &  rArgs 
)
overrideprotectedvirtual
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 843 of file vbaeventshelper.cxx.

References maOldSelection.

Referenced by implPrepareEvent().

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

Member Data Documentation

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

Definition at line 79 of file vbaeventshelper.hxx.

Referenced by implPrepareEvent(), and isSelectionChanged().

bool ScVbaEventsHelper::mbOpened
private

Definition at line 82 of file vbaeventshelper.hxx.

Referenced by implPostProcessEvent(), and implPrepareEvent().

ScDocument* ScVbaEventsHelper::mpDoc
private
ScDocShell* ScVbaEventsHelper::mpDocShell
private

Definition at line 80 of file vbaeventshelper.hxx.

Referenced by implPostProcessEvent(), and ScVbaEventsHelper().

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

Definition at line 78 of file vbaeventshelper.hxx.

Referenced by implPostProcessEvent(), and notifyEvent().


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