summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2020-05-05 15:47:44 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-05-11 10:52:13 +0200
commit0b0de876bad66c84a8dd0d8d19944109e59cf21a (patch)
tree47fd990baf8cdea19e44a604d824ac819a9ce422 /sw/source
parentea414f8f255d75e3be71c0d65731ff3f42f589ed (diff)
sw: set unique name for shape format even if shape name is empty
Change-Id: I26cc8ec7ec831286c7afa8e17b94e6c0a270cf20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93479 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unodraw.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index a90358d43afb..9181ef940072 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;