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/71229
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index dbfb5a5..9ea667c 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -265,10 +265,6 @@
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 @@
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 */