diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-12 12:48:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-13 10:46:16 +0200 |
commit | edf806974728a8f4da3f474eb8c04a55521c0a86 (patch) | |
tree | 41817bb753fdafbfc0ec8ccab23ccdfceda858e2 /sw | |
parent | ed9a864a21b38e25ea118c4f42fedf21f1b549fb (diff) |
try to restore SwpHints::MergePortions (2nd attempt)
seems
commit 4a93efcf6e7982146fb71e4d32760a07a0f984c2
Author: Noel Grandin <noelgrandin@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.stahl@allotropia.de>
Tested-by: Jenkins
(cherry picked from commit 6d235b1a87c281389daad6e4c653e75810e749a8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118795
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 6d448885abdb..d67ba3250566 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -2919,14 +2919,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) { @@ -2942,8 +2939,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; |