summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2020-01-13 10:29:28 +0100
committerXisco Faulí <xiscofauli@libreoffice.org>2020-01-23 09:35:15 +0100
commit05d8e497b3aef745a6ef21f430b4db7e3847b370 (patch)
treea779f2126bfa75e2eba1c2f028db63e81cc4df00
parent54368ea4b13bfb1437459d3a3b5bc009d263079b (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> (cherry picked from commit db8fdf20fbbb22e0510f0500140bbf7a3b2642f7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87214 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index fe873b96bb26..2c6666b024f5 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2089,7 +2089,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 65ba37f31739..b205802231df 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -712,7 +712,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;