LibreOffice Module svtools (master) 1
|
SvEventDescriptor: Implement the XNameReplace that is delivered by the XEventsSupplier::getEvents() method. More...
#include <unoevent.hxx>
Public Member Functions | |
SvEventDescriptor (css::uno::XInterface &rParent, const SvEventDescription *pSupportedMacroItems) | |
virtual | ~SvEventDescriptor () override |
![]() | |
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 | |
virtual void | replaceByName (const SvMacroItemId nEvent, const SvxMacro &rMacro) override |
event (will be copied) More... | |
virtual void | getByName (SvxMacro &rMacros, const SvMacroItemId nEvent) override |
item ID of event More... | |
virtual const SvxMacroItem & | getMacroItem ()=0 |
Get the SvxMacroItem from the parent. More... | |
virtual void | setMacroItem (const SvxMacroItem &rItem)=0 |
Set the SvxMacroItem at the parent. More... | |
virtual sal_uInt16 | getMacroItemWhich () const =0 |
Get the SvxMacroItem Which Id needed for the current application must be implemented by subclass. 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... | |
![]() | |
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 | |
css::uno::Reference< css::uno::XInterface > | xParentRef |
keep reference to parent to prevent it from being destroyed More... | |
Additional Inherited Members | |
![]() | |
const SvEventDescription * | mpSupportedMacroItems |
last element is 0, 0 More... | |
sal_Int16 | mnMacroItems |
SvEventDescriptor: Implement the XNameReplace that is delivered by the XEventsSupplier::getEvents() method.
The SvEventDescriptor has to be subclassed to implement the events for a specific objects. The subclass has to 1) supply the super class constructor with a list of known events (item IDs) 2) supply the super class constructor with a reference of its parent object (to prevent destruction) 3) implement getItem() and setItem(...) methods.
If no object is available to which the SvEventDescriptor can attach itself, the class SvDetachedEventDescriptor should be used.
Definition at line 159 of file unoevent.hxx.
SvEventDescriptor::SvEventDescriptor | ( | css::uno::XInterface & | rParent, |
const SvEventDescription * | pSupportedMacroItems | ||
) |
Definition at line 308 of file unoevent.cxx.
|
overridevirtual |
Definition at line 317 of file unoevent.cxx.
|
overrideprotectedvirtual |
calls getByName(sal_uInt16)
API name of event
Reimplemented from SvBaseEventDescriptor.
Definition at line 87 of file unoevent.cxx.
|
protectedvirtual |
Must be implemented in subclass.
css::container::NoSuchElementException | |
css::lang::WrappedTargetException | |
css::uno::RuntimeException |
Implements SvBaseEventDescriptor.
|
overrideprotectedvirtual |
item ID of event
nEvent | macro to be filled with values |
Implements SvBaseEventDescriptor.
Definition at line 332 of file unoevent.cxx.
References SvxMacroItem::GetMacro(), getMacroItem(), and SvxMacroItem::HasMacro().
|
protectedpure virtual |
Get the SvxMacroItem from the parent.
must be implemented by subclass
Referenced by getByName(), and replaceByName().
|
protectedpure virtual |
Get the SvxMacroItem Which Id needed for the current application must be implemented by subclass.
Referenced by replaceByName().
|
overrideprotectedvirtual |
calls replaceByName(const sal_uInt16, const SvxMacro&)
event (PropertyValues)
rElement | API name of event |
Reimplemented from SvBaseEventDescriptor.
|
overrideprotectedvirtual |
event (will be copied)
rMacro | item ID of event |
Implements SvBaseEventDescriptor.
Definition at line 322 of file unoevent.cxx.
References getMacroItem(), getMacroItemWhich(), SvxMacroItem::SetMacro(), setMacroItem(), and SvxMacroItem::SetMacroTable().
|
protectedvirtual |
Must be implemented in subclass.
css::lang::IllegalArgumentException | |
css::container::NoSuchElementException | |
css::lang::WrappedTargetException | |
css::uno::RuntimeException | event (will be copied) |
rMacro | item ID of event |
Implements SvBaseEventDescriptor.
|
protectedpure virtual |
|
private |
keep reference to parent to prevent it from being destroyed
Definition at line 162 of file unoevent.hxx.