sw/source/core/txtnode/thints.cxx |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 6d235b1a87c281389daad6e4c653e75810e749a8
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jul 12 12:48:52 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jul 12 17:56:43 2021 +0200

    try to restore SwpHints::MergePortions (2nd attempt)
    
    seems
      commit 4a93efcf6e7982146fb71e4d32760a07a0f984c2
      Author: Noel Grandin <noelgran...@gmail.com>
      Date:   Thu Jul 8 15:16:29 2021 +0200
      try to restore SwpHints::MergePortions...
    was not good enough
    
    Change-Id: Ic5b9d9d7081ab3bc814388332672ff950fb84802
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118772
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins

diff --git a/sw/source/core/txtnode/thints.cxx 
b/sw/source/core/txtnode/thints.cxx
index 03fd7be3affc..a3659ebbdd3d 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2858,14 +2858,11 @@ static MergeResult lcl_Compare_Attributes(
             SfxItemIter iter1(rSet1);
             SfxItemIter iter2(rSet2);
             for (SfxPoolItem const* pItem1 = iter1.GetCurItem(),
-                                  * pItem2 = iter2.GetCurItem();
-                 pItem1 && pItem2;
-                 pItem1 = iter1.NextItem(),
-                 pItem2 = iter2.NextItem())
+                                  * pItem2 = iter2.GetCurItem();;)
             {
-                if (pItem1->Which() == RES_CHRATR_RSID)
+                if (pItem1 && pItem1->Which() == RES_CHRATR_RSID)
                     pItem1 = iter1.NextItem();
-                if (pItem2->Which() == RES_CHRATR_RSID)
+                if (pItem2 && pItem2->Which() == RES_CHRATR_RSID)
                     pItem2 = iter2.NextItem();
                 if (!pItem1 && !pItem2)
                 {
@@ -2881,8 +2878,9 @@ static MergeResult lcl_Compare_Attributes(
                     assert(IsInvalidItem(pItem1) || IsInvalidItem(pItem2) || 
pItem1->Which() != pItem2->Which() || *pItem1 != *pItem2);
                     return DIFFER;
                 }
+                pItem1 = iter1.NextItem();
+                pItem2 = iter2.NextItem();
             }
-            eMerge = DIFFER_ONLY_RSID;
         }
         ++aIter1;
         ++aIter2;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to