diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-09-11 14:06:23 +0300 |
---|---|---|
committer | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-09-14 14:05:08 +0200 |
commit | c514e9cfca2901f325644a65ee1b87455a56e7f0 (patch) | |
tree | d59bf5852a299dc37bd2da8f95a902e960857e1a | |
parent | 0ae68cfb76ea38ffefb79eb27e2329475f8bc71b (diff) |
tdf#135623: modified generation of unique fly name
Modified lcl_GetUniqueFlyName() is right now always marks
current fly format name number as used. Yes, this can
lead to some gaps in numbering is some cases, but meanwhile
guarantee that there will be no duplicates if format name
does not match SdrObject name.
Change-Id: If39ed993614ae1665deba21ae8d5e6bd542fb6e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102460
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 07a695ec1988ee8b02256cab2e07a1b429ead24b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102636
Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 9929ec8ae599..ce33b8c213c6 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1353,11 +1353,9 @@ static OUString lcl_GetUniqueFlyName(const SwDoc* pDoc, const char* pDefStrId, s if (pObj) lcl_collectUsedNums(aUsedNums, nNmLen, *pObj, aName); } - else - { - OUString sName = pFlyFormat->GetName(); - lcl_collectUsedNums(aUsedNums, nNmLen, sName, aName); - } + + OUString sName = pFlyFormat->GetName(); + lcl_collectUsedNums(aUsedNums, nNmLen, sName, aName); } // All numbers are flagged accordingly, so determine the right one |