summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdpage.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-23 16:06:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-23 19:35:35 +0200
commit79e1d1353b4bed9a120c44b3a0436d4b041c30f7 (patch)
tree283a04d6c81cfc10356c6b338a6f0922183a40d1 /svx/source/svdraw/svdpage.cxx
parentb23b1295af584162f95c1559a3d8f8bbe4824413 (diff)
tdf#119388 use virtual to bypass dynamic_cast
in SdrObjList::ReformatAllEdgeObjects, shaves 10% of the time off Change-Id: Iceee362d0e3326d046f1ef5039457941160cee4f Reviewed-on: https://gerrit.libreoffice.org/78019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdpage.cxx')
-rw-r--r--svx/source/svdraw/svdpage.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 77941e810db9..0d38249b2d04 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -612,12 +612,12 @@ void SdrObjList::ReformatAllEdgeObjects()
while(aIter.IsMore())
{
- SdrEdgeObj* pSdrEdgeObj = dynamic_cast< SdrEdgeObj* >(aIter.Next());
+ SdrObject* pObj = aIter.Next();
+ if (!pObj->IsSdrEdgeObj())
+ continue;
- if(pSdrEdgeObj)
- {
- pSdrEdgeObj->Reformat();
- }
+ SdrEdgeObj* pSdrEdgeObj = static_cast< SdrEdgeObj* >(pObj);
+ pSdrEdgeObj->Reformat();
}
}