From 2b48a5f1550e6f62931c2973086e8970f88f58ee Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Tue, 3 Nov 2015 16:53:07 +0100 Subject: dynamic_cast fixed again changes commit 5ae015fc74330ac4c24b67370c59518084f1d201 to check the SvxFieldItem Change-Id: I2c327a0a16fdd3e9341365554e10fb6fe04e1efe Reviewed-on: https://gerrit.libreoffice.org/19757 Tested-by: Jenkins Reviewed-by: Oliver Specht --- editeng/source/editeng/impedit3.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 45c7c34eb5a0..f28970cb8dbe 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3175,7 +3175,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt { const EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature(nIndex); DBG_ASSERT( pAttr, "Field not found"); - DBG_ASSERT( dynamic_cast< const EditCharAttribField* >( pAttr ) != nullptr, "Field of the wrong type! "); + DBG_ASSERT( pAttr && dynamic_cast< const SvxFieldItem* >( pAttr->GetItem() ) != nullptr, "Field of the wrong type! "); aText = static_cast(pAttr)->GetFieldValue(); nTextStart = 0; nTextLen = aText.getLength(); @@ -3523,7 +3523,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt { const EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature(nIndex); DBG_ASSERT( pAttr, "Field not found" ); - DBG_ASSERT( dynamic_cast< const EditCharAttribField* >( pAttr ) != nullptr, "Wrong type of field!" ); + DBG_ASSERT( pAttr && dynamic_cast< const SvxFieldItem* >( pAttr->GetItem() ) != nullptr, "Wrong type of field!" ); // add a meta file comment if we record to a metafile if( bMetafileValid ) -- cgit v1.2.1