[Libreoffice-commits] core.git: sfx2/source

Vert D (via logerrit) logerrit at kemper.freedesktop.org
Fri May 21 07:54:47 UTC 2021


 sfx2/source/control/templatelocalview.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9431984f8d39a4d7fb9428138ecc6971c212c122
Author:     Vert D <devoptmsoi at gmx.com>
AuthorDate: Thu Mar 18 13:42:04 2021 -0500
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri May 21 09:54:11 2021 +0200

    tdf#132042 fix nItem id when creating region
    
    Change-Id: I5f2d00dd58580922119b30aafce6695bacb6e2f4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113331
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index baf630c7fff0..a933a00285dd 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -324,7 +324,7 @@ TemplateLocalView::getFilteredItems(const std::function<bool (const TemplateItem
 sal_uInt16 TemplateLocalView::createRegion(const OUString &rName)
 {
     sal_uInt16 nRegionId = mpDocTemplates->GetRegionCount();    // Next regionId
-    sal_uInt16 nItemId = getNextItemId();
+    sal_uInt16 nItemId = maRegions.size() + 1;
 
     if (!mpDocTemplates->InsertDir(rName,nRegionId))
         return 0;


More information about the Libreoffice-commits mailing list