Kaydet (Commit) 88be8aa1 authored tarafından Noel Grandin's avatar Noel Grandin

tdf#89522 PERF FILEOPEN xlsx, part 2

re-arrange the conditions so we avoid the dynamic_cast most of the time.

This takes the file-open time from 40s to 29s for me.

Change-Id: If65a63502fd545003137747605332be65d5e91ca
Reviewed-on: https://gerrit.libreoffice.org/71229Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst bd44b3ee
......@@ -265,10 +265,6 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
mpViewForwarder.reset();
}
}
else if (const SvxViewChangedHint* pViewHint = dynamic_cast<const SvxViewChangedHint*>(&rHint))
{
Broadcast( *pViewHint );
}
else if (rHint.GetId() == SfxHintId::ThisIsAnSdrHint)
{
const SdrHint* pSdrHint = static_cast<const SdrHint*>(&rHint);
......@@ -377,6 +373,10 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
break;
}
}
else if (const SvxViewChangedHint* pViewHint = dynamic_cast<const SvxViewChangedHint*>(&rHint))
{
Broadcast( *pViewHint );
}
}
/* this is a callback from the attached SdrObject when it is actually deleted */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment