summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdedtv.cxx
diff options
context:
space:
mode:
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