[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 18 10:54:59 UTC 2020
sw/source/core/unocore/unodraw.cxx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 0a4d3852794bae8887dc11613b47cb8d2c4aa829
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Tue May 5 15:47:44 2020 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon May 18 12:54:28 2020 +0200
tdf#128665: sw: set unique name for shape format
Set name even if received shape name is empty. This is required
to have unique style name for undo/redo correct work.
Change-Id: I26cc8ec7ec831286c7afa8e17b94e6c0a270cf20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93479
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94373
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index b205802231df..698b05b5ac96 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -712,7 +712,16 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
if (pFormat)
{
if (pFormat->GetName().isEmpty())
- pFormat->SetName(pSvxShape->GetSdrObject()->GetName(), false);
+ {
+ if (pSvxShape->GetSdrObject()->GetName().isEmpty())
+ {
+ pFormat->SetName(pDoc->GetUniqueShapeName(), false);
+ }
+ else
+ {
+ pFormat->SetName(pSvxShape->GetSdrObject()->GetName(), false);
+ }
+ }
pShape->SetFrameFormat(pFormat);
}
pShape->m_bDescriptor = false;
More information about the Libreoffice-commits
mailing list