diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-09-11 14:06:23 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-09-14 11:25:28 +0200 |
commit | 07a695ec1988ee8b02256cab2e07a1b429ead24b (patch) | |
tree | 839545990a7d2afb59cf7fedec7e431cefb04b67 | |
parent | bf1546df43a5de0cb72ce2545b852be5ca078e0a (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>
-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 61108557a752..7e598d8e4638 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 |