diff options
author | Oliver Specht <oliver.specht@cib.de> | 2015-11-03 16:53:07 +0100 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-11-03 18:42:30 +0000 |
commit | 2b48a5f1550e6f62931c2973086e8970f88f58ee (patch) | |
tree | 934f9248a8a5be5d42fb2584f2e04d39a6084d52 /editeng | |
parent | b59bf9f6397641750ad3db50312a1133d7e8fc3f (diff) |
dynamic_cast fixed again
changes commit 5ae015fc74330ac4c24b67370c59518084f1d201 to check the
SvxFieldItem
Change-Id: I2c327a0a16fdd3e9341365554e10fb6fe04e1efe
Reviewed-on: https://gerrit.libreoffice.org/19757
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 4 |
1 files 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<const EditCharAttribField*>(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 ) |