From 5a7157d319477830426797532e02ac39d3b859f4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:29:03 +0200 Subject: Merging upstream version 4:24.2.1. Signed-off-by: Daniel Baumann --- sw/source/core/doc/docdraw.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'sw/source/core/doc/docdraw.cxx') diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index aecbe2ac82..521ca2b0ba 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -463,14 +463,17 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView ) SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); if( dynamic_cast( pObj) == nullptr ) { - SwDrawContact *pC = static_cast(GetUserCall(pObj)); - SwDrawFrameFormat *pFrameFormat = static_cast(pC->GetFormat()); - if( pFrameFormat && - RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() ) + if (SwDrawContact* pC = static_cast(GetUserCall(pObj))) { - rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), true ); - --i; - getIDocumentLayoutAccess().DelLayoutFormat( pFrameFormat ); + SwDrawFrameFormat* pFrameFormat + = static_cast(pC->GetFormat()); + if (pFrameFormat + && RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId()) + { + rDrawView.MarkObj(pObj, rDrawView.Imp().GetPageView(), true); + --i; + getIDocumentLayoutAccess().DelLayoutFormat(pFrameFormat); + } } } } -- cgit v1.2.3