sw/source/core/doc/doclay.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 07a695ec1988ee8b02256cab2e07a1b429ead24b
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Fri Sep 11 14:06:23 2020 +0300
Commit:     Thorsten Behrens <thorsten.behr...@cib.de>
CommitDate: Mon Sep 14 11:25:28 2020 +0200

    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.behr...@cib.de>

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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to