diff options
Diffstat (limited to 'sw/source/filter/ww8/ww8graf.cxx')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index c2efe73c3830..de8a1866ba36 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2200,11 +2200,12 @@ SdrObject* SwWW8ImplReader::CreateContactObject(SwFrameFormat* pFlyFormat) SdrObject* pNewObject = m_bNewDoc ? nullptr : pFlyFormat->FindRealSdrObject(); if (!pNewObject) pNewObject = pFlyFormat->FindSdrObject(); - if (!pNewObject && dynamic_cast< const SwFlyFrameFormat *>( pFlyFormat ) != nullptr) - { - SwFlyDrawContact* pContactObject(static_cast<SwFlyFrameFormat*>(pFlyFormat)->GetOrCreateContact()); - pNewObject = pContactObject->GetMaster(); - } + if (!pNewObject ) + if (auto pFlyFrameFormat = dynamic_cast<SwFlyFrameFormat *>( pFlyFormat )) + { + SwFlyDrawContact* pContactObject = pFlyFrameFormat->GetOrCreateContact(); + pNewObject = pContactObject->GetMaster(); + } return pNewObject; } return nullptr; |