diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/swserv.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/text/txtfly.cxx | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index cc2d3fe5dbf5..2236938a5ad2 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -299,14 +299,14 @@ SwDataChanged::~SwDataChanged() { ::sfx2::SvLinkSourceRef refObj( rpLinkSrc ); // Anyone else interested in the Object? - if( refObj->HasDataLinks() && dynamic_cast<const SwServerObject*>( refObj.get() ) != nullptr) - { - SwServerObject& rObj = *static_cast<SwServerObject*>( refObj.get() ); - if( m_pPos ) - rObj.SendDataChanged( *m_pPos ); - else - rObj.SendDataChanged( *m_pPam ); - } + if( refObj->HasDataLinks()) + if (auto pServerObj = dynamic_cast<SwServerObject*>( refObj.get() )) + { + if( m_pPos ) + pServerObj->SendDataChanged( *m_pPos ); + else + pServerObj->SendDataChanged( *m_pPam ); + } // We shouldn't have a connection anymore if( !refObj->HasDataLinks() ) diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 2e8e58b533ab..92508cde9bc3 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -224,7 +224,7 @@ SwRect SwContourCache::ContourRect( const SwFormat* pFormat, // the graphic to change its size, call ClrObject() tools::PolyPolygon aPoly; if( !pVirtFlyDrawObj->GetFlyFrame()->GetContour( aPoly ) ) - aPoly = tools::PolyPolygon( static_cast<const SwVirtFlyDrawObj*>(pObj)-> + aPoly = tools::PolyPolygon( pVirtFlyDrawObj-> GetFlyFrame()->getFrameArea().SVRect() ); aPolyPolygon.clear(); aPolyPolygon.append(aPoly.getB2DPolyPolygon()); |