sw/source/core/frmedt/fefly1.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit e6341e0f613237020fef9e2028e123022ff2ce38 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Feb 6 09:41:35 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Feb 6 13:32:42 2020 +0100 cid#1458160 Dereference before null check since... commit 6e2ed4ea934851f82611c3352b9551046fda89d0 Date: Mon Jan 20 11:55:02 2020 +0300 sw: set unique name for fontwork object and style on insertion Change-Id: I0030425c77bba9a8fe720002114c2b9076c93c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88078 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 51f2f7f04c75..ae5ed8246007 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -935,8 +935,8 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, } // insert drawing object into the document creating a new <SwDrawFrameFormat> instance SwDrawFrameFormat* pFormat = GetDoc()->getIDocumentContentOperations().InsertDrawObj( aPam, rDrawObj, rFlyAttrSet ); - pFormat->SetName(GetDoc()->GetUniqueShapeName()); - rDrawObj.SetName(pFormat->GetName()); + OUString sShapeName = GetDoc()->GetUniqueShapeName(); + rDrawObj.SetName(sShapeName); // move object to visible layer SwContact* pContact = static_cast<SwContact*>(rDrawObj.GetUserCall()); @@ -945,8 +945,9 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, pContact->MoveObjToVisibleLayer( &rDrawObj ); } - if ( pFormat ) + if (pFormat) { + pFormat->SetName(sShapeName); // select drawing object Imp()->GetDrawView()->MarkObj( &rDrawObj, Imp()->GetPageView() ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits