/// Must be implemented in subclass. /// /// @throws css::lang::IllegalArgumentException /// @throws css::container::NoSuchElementException /// @throws css::lang::WrappedTargetException /// @throws css::uno::RuntimeException virtualvoid replaceByName( const SvMacroItemId nEvent, /// item ID of event const SvxMacro& rMacro) /// event (will be copied)
= 0;
/// Must be implemented in subclass. /// /// @throws css::container::NoSuchElementException /// @throws css::lang::WrappedTargetException /// @throws css::uno::RuntimeException virtualvoid getByName(
SvxMacro& rMacro, const SvMacroItemId nEvent ) = 0;
/// convert an API event name to the event ID as used by SvxMacroItem
SvMacroItemId mapNameToEventID(std::u16string_view rName) const;
/// get the event ID for the name; return 0 if not supported
SvMacroItemId getMacroID(std::u16string_view rName) const;
};
/** *SvEventDescriptor:ImplementtheXNameReplacethatisdeliveredby *theXEventsSupplier::getEvents()method.TheSvEventDescriptorhas *tobesubclassedtoimplementtheeventsforaspecific *objects.Thesubclasshasto *1)supplythesuperclassconstructorwithalistofknownevents(itemIDs) *2)supplythesuperclassconstructorwithareferenceofitsparentobject *(topreventdestruction) *3)implementgetItem()andsetItem(...)methods. * *IfnoobjectisavailabletowhichtheSvEventDescriptorcanattachitself, *theclassSvDetachedEventDescriptorshouldbeused.
*/ class SVT_DLLPUBLIC SvEventDescriptor : public SvBaseEventDescriptor
{ /// keep reference to parent to prevent it from being destroyed
css::uno::Reference< css::uno::XInterface > xParentRef;
using SvBaseEventDescriptor::replaceByName; virtualvoid replaceByName( const SvMacroItemId nEvent, /// item ID of event const SvxMacro& rMacro) /// event (will be copied)
override;
using SvBaseEventDescriptor::getByName; virtualvoid getByName(
SvxMacro& rMacros, /// macro to be filled with values const SvMacroItemId nEvent ) /// item ID of event
override;
/// Get the SvxMacroItem from the parent. /// must be implemented by subclass virtualconst SvxMacroItem& getMacroItem() = 0;
/// Set the SvxMacroItem at the parent. /// must be implemented by subclass virtualvoid setMacroItem(const SvxMacroItem& rItem) = 0;
/// Get the SvxMacroItem Which Id needed for the current application /// must be implemented by subclass virtual sal_uInt16 getMacroItemWhich() const = 0;
};
/** *SvDetachedEventDescriptor:
*/ class SVT_DLLPUBLIC SvDetachedEventDescriptor : public SvBaseEventDescriptor
{ // the macros; aMacros[i] is the value for aSupportedMacroItemIDs[i]
std::vector<std::unique_ptr<SvxMacro>> aMacros;
using SvBaseEventDescriptor::replaceByName; virtualvoid replaceByName( const SvMacroItemId nEvent, /// item ID of event const SvxMacro& rMacro) /// event (will be copied)
override;
using SvBaseEventDescriptor::getByName; virtualvoid getByName(
SvxMacro& rMacro, /// macro to be filled const SvMacroItemId nEvent ) /// item ID of event
override;
/// do we have an event? /// return true: we have a macro for the event /// return false: no macro; getByName() will return an empty macro /// @throws css::lang::IllegalArgumentException if the event is not supported bool hasById( const SvMacroItemId nEvent ) const; /// item ID of event
};
class SVT_DLLPUBLIC SvMacroTableEventDescriptor final : public SvDetachedEventDescriptor
{ public:
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.