summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/crsrsh.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-06-21 14:38:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-03 07:54:50 +0100
commit835e89e69765cc8262d1c5b4993caed976386ac4 (patch)
treef2b5601f7459a2d3a2d727b818b9f32e089a6571 /sw/source/core/crsr/crsrsh.cxx
parentb8ae4bcd5c642a29202529fc6bf4c3a91a713230 (diff)
create SfxHintId::SwLegacyModify id
to avoid expensive dynamic_casts in writer Change-Id: Ic73ae7d4af985043f8533913b33939e3445ec7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124592
Diffstat (limited to 'sw/source/core/crsr/crsrsh.cxx')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index fbd4064e3d61..5f6db943d5dd 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2484,9 +2484,9 @@ void SwCursorShell::SwClientNotify(const SwModify&, const SfxHint& rHint)
m_aGrfArrivedLnk.Call(*this);
return;
}
- auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint);
- if(!pLegacy)
+ if (rHint.GetId() != SfxHintId::SwLegacyModify)
return;
+ auto pLegacy = static_cast<const sw::LegacyModifyHint*>(&rHint);
auto nWhich = pLegacy->GetWhich();
if(!nWhich)
nWhich = sal::static_int_cast<sal_uInt16>(RES_MSG_BEGIN);