summaryrefslogtreecommitdiff
path: root/sw/source/core/draw/dcontact.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/draw/dcontact.cxx')
-rw-r--r--sw/source/core/draw/dcontact.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index c4f890aba37e..5481b4d9e4c3 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1666,11 +1666,10 @@ void SwDrawContact::RemoveMasterFromDrawPage()
// also working.
void SwDrawContact::DisconnectObjFromLayout( SdrObject* _pDrawObj )
{
- if ( dynamic_cast<const SwDrawVirtObj*>( _pDrawObj) != nullptr )
+ if ( auto pSwDrawVirtObj = dynamic_cast<SwDrawVirtObj*>( _pDrawObj) )
{
- SwDrawVirtObj* pDrawVirtObj = static_cast<SwDrawVirtObj*>(_pDrawObj);
- pDrawVirtObj->RemoveFromWriterLayout();
- pDrawVirtObj->RemoveFromDrawingPage();
+ pSwDrawVirtObj->RemoveFromWriterLayout();
+ pSwDrawVirtObj->RemoveFromDrawingPage();
}
else
{