diff options
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltble.cxx | 5 |
2 files changed, 8 insertions, 8 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; diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index a681fc4cf38d..ad79a92e3732 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -1122,11 +1122,10 @@ void SwXMLExport::ExportTable( const SwTableNode& rTableNd ) SvXMLElementExport aElem(*this, *oPrefix, XML_TABLE, true, true); // export DDE source (if this is a DDE table) - if ( dynamic_cast<const SwDDETable*>( &rTable) != nullptr ) + if ( auto pSwDdeTable = dynamic_cast<const SwDDETable*>( &rTable) ) { // get DDE Field Type (contains the DDE connection) - const SwDDEFieldType* pDDEFieldType = - static_cast<const SwDDETable&>(rTable).GetDDEFieldType(); + const SwDDEFieldType* pDDEFieldType = pSwDdeTable->GetDDEFieldType(); // connection name AddAttribute( XML_NAMESPACE_OFFICE, XML_NAME, |