[Libreoffice-commits] core.git: editeng/source
Oliver Specht
oliver.specht at cib.de
Tue Nov 3 10:42:54 PST 2015
editeng/source/editeng/impedit3.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2b48a5f1550e6f62931c2973086e8970f88f58ee
Author: Oliver Specht <oliver.specht at cib.de>
Date: Tue Nov 3 16:53:07 2015 +0100
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 at libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht at cib.de>
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 45c7c34..f28970c 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 )
More information about the Libreoffice-commits
mailing list