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

SvDetachedEventDescriptor: More...

#include <unoevent.hxx>

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

Public Member Functions

 SvDetachedEventDescriptor (const SvEventDescription *pSupportedMacroItems)
 
SvDetachedEventDescriptoroperator= (SvDetachedEventDescriptor const &)=delete
 
 SvDetachedEventDescriptor (SvDetachedEventDescriptor const &)=delete
 
virtual ~SvDetachedEventDescriptor () override
 
virtual OUString SAL_CALL getImplementationName () override
 must be implemented in subclass More...
 
- Public Member Functions inherited from SvBaseEventDescriptor
 SvBaseEventDescriptor (const SvEventDescription *pSupportedMacroItems)
 
virtual ~SvBaseEventDescriptor () override
 
virtual void SAL_CALL replaceByName (const OUString &rName, const css::uno::Any &rElement) override
 calls replaceByName(const sal_uInt16, const SvxMacro&) More...
 
virtual css::uno::Any SAL_CALL getByName (const OUString &rName) override
 calls getByName(sal_uInt16) More...
 
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames () override
 
virtual sal_Bool SAL_CALL hasByName (const OUString &rName) override
 
virtual css::uno::Type SAL_CALL getElementType () override
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual OUString SAL_CALL getImplementationName () override=0
 must be implemented in subclass More...
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Protected Member Functions

sal_Int16 getIndex (const SvMacroItemId nID) const
 
virtual void replaceByName (const SvMacroItemId nEvent, const SvxMacro &rMacro) override
 event (will be copied) More...
 
virtual void getByName (SvxMacro &rMacro, const SvMacroItemId nEvent) override
 item ID of event More...
 
bool hasById (const SvMacroItemId nEvent) const
 do we have an event? return true: we have a macro for the event return false: no macro; getByName() will return an empty macro More...
 
virtual void SAL_CALL replaceByName (const OUString &rName, const css::uno::Any &rElement) override
 calls replaceByName(const sal_uInt16, const SvxMacro&) More...
 
virtual void replaceByName (const SvMacroItemId nEvent, const SvxMacro &rMacro)=0
 Must be implemented in subclass. More...
 
virtual css::uno::Any SAL_CALL getByName (const OUString &rName) override
 calls getByName(sal_uInt16) More...
 
virtual void getByName (SvxMacro &rMacro, const SvMacroItemId nEvent)=0
 Must be implemented in subclass. More...
 
- Protected Member Functions inherited from SvBaseEventDescriptor
virtual void replaceByName (const SvMacroItemId nEvent, const SvxMacro &rMacro)=0
 Must be implemented in subclass. More...
 
virtual void getByName (SvxMacro &rMacro, const SvMacroItemId nEvent)=0
 Must be implemented in subclass. More...
 
SvMacroItemId mapNameToEventID (std::u16string_view rName) const
 convert an API event name to the event ID as used by SvxMacroItem More...
 
SvMacroItemId getMacroID (std::u16string_view rName) const
 get the event ID for the name; return 0 if not supported More...
 

Private Attributes

std::vector< std::unique_ptr< SvxMacro > > aMacros
 

Additional Inherited Members

- Protected Attributes inherited from SvBaseEventDescriptor
const SvEventDescriptionmpSupportedMacroItems
 last element is 0, 0 More...
 
sal_Int16 mnMacroItems
 

Detailed Description

SvDetachedEventDescriptor:

Definition at line 205 of file unoevent.hxx.

Constructor & Destructor Documentation

◆ SvDetachedEventDescriptor() [1/2]

SvDetachedEventDescriptor::SvDetachedEventDescriptor ( const SvEventDescription pSupportedMacroItems)

Definition at line 346 of file unoevent.cxx.

References aMacros, and SvBaseEventDescriptor::mnMacroItems.

◆ SvDetachedEventDescriptor() [2/2]

SvDetachedEventDescriptor::SvDetachedEventDescriptor ( SvDetachedEventDescriptor const &  )
delete

◆ ~SvDetachedEventDescriptor()

SvDetachedEventDescriptor::~SvDetachedEventDescriptor ( )
overridevirtual

Definition at line 353 of file unoevent.cxx.

Member Function Documentation

◆ getByName() [1/3]

Any SvBaseEventDescriptor::getByName ( const OUString &  rName)
overrideprotectedvirtual

calls getByName(sal_uInt16)

API name of event

Reimplemented from SvBaseEventDescriptor.

Definition at line 87 of file unoevent.cxx.

◆ getByName() [2/3]

void SvDetachedEventDescriptor::getByName ( SvxMacro rMacro,
const SvMacroItemId  nEvent 
)
overrideprotectedvirtual

item ID of event

Parameters
nEventmacro to be filled

Implements SvBaseEventDescriptor.

Definition at line 388 of file unoevent.cxx.

References aMacros, getIndex(), and nIndex.

Referenced by SvMacroTableEventDescriptor::copyMacrosIntoTable().

◆ getByName() [3/3]

virtual void SvBaseEventDescriptor::getByName ( SvxMacro rMacro,
const SvMacroItemId  nEvent 
)
protectedvirtual

Must be implemented in subclass.

Exceptions
css::container::NoSuchElementException
css::lang::WrappedTargetException
css::uno::RuntimeException

Implements SvBaseEventDescriptor.

◆ getImplementationName()

OUString SvDetachedEventDescriptor::getImplementationName ( )
overridevirtual

must be implemented in subclass

Implements SvBaseEventDescriptor.

Definition at line 369 of file unoevent.cxx.

◆ getIndex()

sal_Int16 SvDetachedEventDescriptor::getIndex ( const SvMacroItemId  nID) const
protected

Definition at line 357 of file unoevent.cxx.

References SvBaseEventDescriptor::mpSupportedMacroItems, and nIndex.

Referenced by getByName(), and replaceByName().

◆ hasById()

bool SvDetachedEventDescriptor::hasById ( const SvMacroItemId  nEvent) const
protected

do we have an event? return true: we have a macro for the event return false: no macro; getByName() will return an empty macro

item ID of event

Exceptions
css::lang::IllegalArgumentExceptionif the event is not supported

Definition at line 400 of file unoevent.cxx.

References nIndex.

Referenced by SvMacroTableEventDescriptor::copyMacrosIntoTable().

◆ operator=()

SvDetachedEventDescriptor & SvDetachedEventDescriptor::operator= ( SvDetachedEventDescriptor const &  )
delete

◆ replaceByName() [1/3]

virtual void SAL_CALL SvBaseEventDescriptor::replaceByName ( const OUString &  rName,
const css::uno::Any &  rElement 
)
overrideprotectedvirtual

calls replaceByName(const sal_uInt16, const SvxMacro&)

event (PropertyValues)

Parameters
rElementAPI name of event

Reimplemented from SvBaseEventDescriptor.

◆ replaceByName() [2/3]

void SvDetachedEventDescriptor::replaceByName ( const SvMacroItemId  nEvent,
const SvxMacro rMacro 
)
overrideprotectedvirtual

event (will be copied)

Parameters
rMacroitem ID of event

Implements SvBaseEventDescriptor.

Definition at line 375 of file unoevent.cxx.

References aMacros, getIndex(), SvxMacro::GetLibName(), SvxMacro::GetMacName(), SvxMacro::GetScriptType(), and nIndex.

Referenced by SvMacroTableEventDescriptor::SvMacroTableEventDescriptor().

◆ replaceByName() [3/3]

virtual void SvBaseEventDescriptor::replaceByName ( const SvMacroItemId  nEvent,
const SvxMacro rMacro 
)
protectedvirtual

Must be implemented in subclass.

Exceptions
css::lang::IllegalArgumentException
css::container::NoSuchElementException
css::lang::WrappedTargetException
css::uno::RuntimeExceptionevent (will be copied)
Parameters
rMacroitem ID of event

Implements SvBaseEventDescriptor.

Member Data Documentation

◆ aMacros

std::vector<std::unique_ptr<SvxMacro> > SvDetachedEventDescriptor::aMacros
private

Definition at line 208 of file unoevent.hxx.

Referenced by getByName(), replaceByName(), and SvDetachedEventDescriptor().


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