diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-06 09:31:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-06 12:40:59 +0200 |
commit | 757a73379dba01fde853443a09583d862c404531 (patch) | |
tree | 1438883003eed76e6477c2967dacd7580db16a9d /include/sfx2 | |
parent | cb5285d544a355026a38c69ccf5473956d60e4ee (diff) |
Related: cool#7373 add an SfxHintId::ThisIsAnSfxEventHint
to avoid cost of dynamic_cast of SdrHint to SfxEventHint
Change-Id: Ie0366b7d7ba828d8ffabeed4d65d7c7b275a3ed4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157633
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/event.hxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx index 021472830ab8..1024dd5b2423 100644 --- a/include/sfx2/event.hxx +++ b/include/sfx2/event.hxx @@ -196,11 +196,13 @@ class SFX2_DLLPUBLIC SfxEventHint : public SfxHint SfxEventHintId nEventId; public: - SfxEventHint( SfxEventHintId nId, OUString aName, SfxObjectShell *pObj ) - : pObjShell(pObj), - aEventName(std::move(aName)), - nEventId(nId) - {} + SfxEventHint(SfxEventHintId nId, OUString aName, SfxObjectShell *pObj) + : SfxHint(SfxHintId::ThisIsAnSfxEventHint) + , pObjShell(pObj) + , aEventName(std::move(aName)) + , nEventId(nId) + { + } SfxEventHintId GetEventId() const { return nEventId; } |