diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-01-13 10:29:28 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-01-22 10:34:01 +0100 |
commit | db8fdf20fbbb22e0510f0500140bbf7a3b2642f7 (patch) | |
tree | 7f423d0f0dfd2d03cf4ee42424d37d8a1fea494d | |
parent | d847ca56ef2d020da5efa696ce5eb3c96e1ba474 (diff) |
tdf#129382: sw: assign names to shape object styles
Empty style names for drawing object will cause problems with
udo/redo which right now refers style names instead of style
pointers.
Change-Id: If2266f1db04c624dbfdd716b5599d5f6cbb5371e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86520
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 93f82fb4cbde..d56a4a0a72d4 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2080,7 +2080,7 @@ bool SwFEShell::ImpEndCreate() text::PositionLayoutDir::PositionInLayoutDirOfAnchor ); // #i44344#, #i44681# - positioning attributes already set pFormat->PosAttrSet(); - pFormat->SetName(GetUniqueShapeName()); + pFormat->SetName(rSdrObj.GetName()); SwDrawContact *pContact = new SwDrawContact( pFormat, &rSdrObj ); // #i35635# diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 492faee1582e..3b911846e66c 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -711,7 +711,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) if (pFormat) { if (pFormat->GetName().isEmpty()) - pFormat->SetName(pDoc->GetUniqueFrameName(), false); + pFormat->SetName(pSvxShape->GetSdrObject()->GetName(), false); pShape->SetFrameFormat(pFormat); } pShape->m_bDescriptor = false; |