diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-03-07 18:41:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-08 07:40:01 +0100 |
commit | c7b898df4d452746399621f6adc8e7da088f0f3a (patch) | |
tree | eb4cb09ceef899c3015724b6d3f81f1e8a4a6ce1 /svx/source/engine3d/view3d.cxx | |
parent | 04e7a34a19b3658de57c4f2b3b0fa8445b01f199 (diff) |
clean up some more dynamic/static casting
using a hacked version of the staticdynamic plugin
and some judgement
Change-Id: I5e6668b19320025e419f84bebceade4239577729
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112137
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/engine3d/view3d.cxx')
-rw-r--r-- | svx/source/engine3d/view3d.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 4ab95d4b5ca2..decbf61b7b0c 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -324,17 +324,18 @@ std::unique_ptr<SdrModel> E3dView::CreateMarkedObjModel() const { const SdrObject* pObj = GetMarkedObjectByIndex(nObjs); - if(!bSpecialHandling && dynamic_cast< const E3dCompoundObject*>(pObj)) - { - // if the object is selected, but it's scene not, - // we need special handling - pScene = static_cast<const E3dCompoundObject*>(pObj)->getRootE3dSceneFromE3dObject(); - - if(nullptr != pScene && !IsObjMarked(pScene)) + if(!bSpecialHandling) + if(auto pCompoundObj = dynamic_cast< const E3dCompoundObject*>(pObj)) { - bSpecialHandling = true; + // if the object is selected, but it's scene not, + // we need special handling + pScene = pCompoundObj->getRootE3dSceneFromE3dObject(); + + if(nullptr != pScene && !IsObjMarked(pScene)) + { + bSpecialHandling = true; + } } - } if(auto p3dObject = dynamic_cast< const E3dObject*>(pObj)) { |