diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-06 09:31:28 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-06 14:11:41 +0200 |
commit | 9bd3c25165447fb80b8f8cb8761943294e0a1502 (patch) | |
tree | 9b4bf1f36cc0ff39072f0c1b8be17d3bf4dd6ca5 /svx | |
parent | 589af9366078036c2f33e3254a628e267628352c (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/+/157620
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmundo.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 9f627a7358b4..facf627a7b1c 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -321,9 +321,9 @@ void FmXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) default: break; } } - else if (const SfxEventHint* pEventHint = dynamic_cast<const SfxEventHint*>(&rHint)) + else if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint) { - switch (pEventHint->GetEventId()) + switch (static_cast<const SfxEventHint&>(rHint).GetEventId()) { case SfxEventHintId::CreateDoc: case SfxEventHintId::OpenDoc: |