LibreOffice Module sfx2 (master) 1
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
SfxEvents_Impl Class Referencefinal

#include <eventsupplier.hxx>

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

Public Member Functions

 SfxEvents_Impl (SfxObjectShell *pShell, css::uno::Reference< css::document::XDocumentEventBroadcaster > const &xBroadcaster)
 
virtual ~SfxEvents_Impl () override
 
virtual void SAL_CALL replaceByName (const OUString &aName, const css::uno::Any &aElement) override
 
virtual css::uno::Any SAL_CALL getByName (const OUString &aName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames () override
 
virtual sal_Bool SAL_CALL hasByName (const OUString &aName) override
 
virtual css::uno::Type SAL_CALL getElementType () override
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual void SAL_CALL documentEventOccured (const css::document::DocumentEvent &aEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 

Static Public Member Functions

static std::unique_ptr< SvxMacroConvertToMacro (const css::uno::Any &rElement, SfxObjectShell *pDoc)
 
static void NormalizeMacro (const css::uno::Any &rIn, css::uno::Any &rOut, SfxObjectShell *pDoc)
 
static void NormalizeMacro (const ::comphelper::NamedValueCollection &i_eventDescriptor, ::comphelper::NamedValueCollection &o_normalizedDescriptor, SfxObjectShell *i_document)
 
static void Execute (css::uno::Sequence< css::beans::PropertyValue > const &aEventData, const css::document::DocumentEvent &aTrigger, SfxObjectShell *pDoc)
 

Static Private Member Functions

static bool isScriptURLAllowed (const OUString &aScriptURL)
 Check if script URL whitelist exists, and if so, if current script url is part of it. More...
 

Private Attributes

css::uno::Sequence< OUString > maEventNames
 
std::vector< css::uno::Sequence< css::beans::PropertyValue > > maEventData
 
css::uno::Reference< css::document::XDocumentEventBroadcaster > mxBroadcaster
 
std::mutex maMutex
 
SfxObjectShellmpObjShell
 

Detailed Description

Definition at line 44 of file eventsupplier.hxx.

Constructor & Destructor Documentation

◆ SfxEvents_Impl()

SfxEvents_Impl::SfxEvents_Impl ( SfxObjectShell pShell,
css::uno::Reference< css::document::XDocumentEventBroadcaster > const &  xBroadcaster 
)

◆ ~SfxEvents_Impl()

SfxEvents_Impl::~SfxEvents_Impl ( )
overridevirtual

Definition at line 330 of file eventsupplier.cxx.

Member Function Documentation

◆ ConvertToMacro()

std::unique_ptr< SvxMacro > SfxEvents_Impl::ConvertToMacro ( const css::uno::Any &  rElement,
SfxObjectShell pDoc 
)
static

◆ disposing()

void SAL_CALL SfxEvents_Impl::disposing ( const css::lang::EventObject &  Source)
overridevirtual

Definition at line 299 of file eventsupplier.cxx.

References maMutex, and mxBroadcaster.

◆ documentEventOccured()

void SAL_CALL SfxEvents_Impl::documentEventOccured ( const css::document::DocumentEvent &  aEvent)
overridevirtual

◆ Execute()

void SfxEvents_Impl::Execute ( css::uno::Sequence< css::beans::PropertyValue > const &  aEventData,
const css::document::DocumentEvent &  aTrigger,
SfxObjectShell pDoc 
)
static

◆ getByName()

uno::Any SAL_CALL SfxEvents_Impl::getByName ( const OUString &  aName)
overridevirtual

Definition at line 112 of file eventsupplier.cxx.

References aName, comphelper::findValue(), maEventData, maEventNames, maMutex, and nIndex.

◆ getElementNames()

uno::Sequence< OUString > SAL_CALL SfxEvents_Impl::getElementNames ( )
overridevirtual

Definition at line 126 of file eventsupplier.cxx.

References maEventNames.

◆ getElementType()

uno::Type SAL_CALL SfxEvents_Impl::getElementType ( )
overridevirtual

Definition at line 144 of file eventsupplier.cxx.

◆ hasByName()

sal_Bool SAL_CALL SfxEvents_Impl::hasByName ( const OUString &  aName)
overridevirtual

Definition at line 132 of file eventsupplier.cxx.

References aName, comphelper::findValue(), maEventNames, and maMutex.

◆ hasElements()

sal_Bool SAL_CALL SfxEvents_Impl::hasElements ( )
overridevirtual

Definition at line 151 of file eventsupplier.cxx.

References maEventNames, and maMutex.

◆ isScriptURLAllowed()

bool SfxEvents_Impl::isScriptURLAllowed ( const OUString &  aScriptURL)
staticprivate

Check if script URL whitelist exists, and if so, if current script url is part of it.

Definition at line 158 of file eventsupplier.cxx.

Referenced by Execute().

◆ NormalizeMacro() [1/2]

void SfxEvents_Impl::NormalizeMacro ( const ::comphelper::NamedValueCollection i_eventDescriptor,
::comphelper::NamedValueCollection o_normalizedDescriptor,
SfxObjectShell i_document 
)
static

◆ NormalizeMacro() [2/2]

static void SfxEvents_Impl::NormalizeMacro ( const css::uno::Any &  rIn,
css::uno::Any &  rOut,
SfxObjectShell pDoc 
)
static

Referenced by ConvertToMacro(), and replaceByName().

◆ replaceByName()

void SAL_CALL SfxEvents_Impl::replaceByName ( const OUString &  aName,
const css::uno::Any &  aElement 
)
overridevirtual

Member Data Documentation

◆ maEventData

std::vector< css::uno::Sequence < css::beans::PropertyValue > > SfxEvents_Impl::maEventData
private

Definition at line 47 of file eventsupplier.hxx.

Referenced by documentEventOccured(), getByName(), replaceByName(), and SfxEvents_Impl().

◆ maEventNames

css::uno::Sequence< OUString > SfxEvents_Impl::maEventNames
private

◆ maMutex

std::mutex SfxEvents_Impl::maMutex
private

◆ mpObjShell

SfxObjectShell* SfxEvents_Impl::mpObjShell
private

Definition at line 50 of file eventsupplier.hxx.

Referenced by documentEventOccured(), replaceByName(), and SfxEvents_Impl().

◆ mxBroadcaster

css::uno::Reference< css::document::XDocumentEventBroadcaster > SfxEvents_Impl::mxBroadcaster
private

Definition at line 48 of file eventsupplier.hxx.

Referenced by disposing(), and SfxEvents_Impl().


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