summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdedtv.cxx
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-05 08:37:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-06 13:08:26 +0100
commitbd37588605f7773d41b5388b18952e5c90f12214 (patch)
tree498116ae9376e7671bf0441e476dad16f2bd197e /svx/source/svdraw/svdedtv.cxx
parent4474d167e1b69ab9ca8a97c636f0400a5084641a (diff)
loplugin:staticdynamic look for static after dynamic
Change-Id: Ic3066d9a9441e369370cc6aa0fbffb9a321bc928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdedtv.cxx')
-rw-r--r--svx/source/svdraw/svdedtv.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 2fd71bee4092..56cd41c700b1 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -1014,15 +1014,13 @@ void SdrEditView::ReplaceObjectAtView(SdrObject* pOldObj, SdrPageView& rPV, SdrO
if(IsTextEdit())
{
#ifdef DBG_UTIL
- if(dynamic_cast< SdrTextObj* >(pOldObj) && static_cast< SdrTextObj* >(pOldObj)->IsTextEditActive())
- {
- OSL_ENSURE(false, "OldObject is in TextEdit mode, this has to be ended before replacing it using SdrEndTextEdit (!)");
- }
+ if(auto pTextObj = dynamic_cast< SdrTextObj* >(pOldObj))
+ if (pTextObj->IsTextEditActive())
+ OSL_ENSURE(false, "OldObject is in TextEdit mode, this has to be ended before replacing it using SdrEndTextEdit (!)");
- if(dynamic_cast< SdrTextObj* >(pNewObj) && static_cast< SdrTextObj* >(pNewObj)->IsTextEditActive())
- {
- OSL_ENSURE(false, "NewObject is in TextEdit mode, this has to be ended before replacing it using SdrEndTextEdit (!)");
- }
+ if(auto pTextObj = dynamic_cast< SdrTextObj* >(pNewObj))
+ if (pTextObj->IsTextEditActive())
+ OSL_ENSURE(false, "NewObject is in TextEdit mode, this has to be ended before replacing it using SdrEndTextEdit (!)");
#endif
// #i123468# emergency repair situation, needs to cast up to a class derived from