summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-10-24 16:04:37 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-11-03 09:56:24 +0000
commitb1704274d3214405aa154a4b52c2ebe1901e5fa3 (patch)
tree32eca6006fce94b0da82bc7aaed1de1a1404d674 /editeng
parente3f21e63bf9bb173e569a0b26e5d7cabd17bb0bd (diff)
Wrong dynamic_cast
EditCharAttrib doesn't inherit from or related to SvxFieldItem Moreover, we can see lines like this: const SvxFieldItem* pFieldItem = dynamic_cast<const SvxFieldItem*>(pAttr->GetItem()); Change-Id: I9f5710dc4a9a4e71d31538620a9ddc1dedee063f Reviewed-on: https://gerrit.libreoffice.org/19575 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index a3b6ef6cdc3d..45c7c34eb5a0 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 SvxFieldItem* >( pAttr ) != nullptr, "Field of the wrong type! ");
+ DBG_ASSERT( dynamic_cast< const EditCharAttribField* >( pAttr ) != 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 SvxFieldItem* >( pAttr ) != nullptr, "Wrong type of field!" );
+ DBG_ASSERT( dynamic_cast< const EditCharAttribField* >( pAttr ) != nullptr, "Wrong type of field!" );
// add a meta file comment if we record to a metafile
if( bMetafileValid )