sw/source/filter/html/htmlctxt.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 598cc6c5f03bf0aae525e80ae6960de2c78efeae
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Apr 25 18:20:20 2024 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue May 7 18:11:51 2024 +0200

    tdf#154581 tdf#157411 tdf#158549 sw: HTML import: fix SfxItemIter reuse
    
    This is obviously wrong, as ALG just pointed out: the aIter is at the
    end after the 1st loop, so the 2nd loop does nothing.
    Thx Gabor for checking all the reported bugs.
    
    (regression from commit db115bec9254417ef7a3faf687478fe5424ab378)
    
    Change-Id: Iae37b9ab5c630d0ee774f42c84d5e76349b92a90
    Tested-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166643
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit ac05822b8957d80018d3ce1cbf97cd9faa0dfe99)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166715
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/sw/source/filter/html/htmlctxt.cxx 
b/sw/source/filter/html/htmlctxt.cxx
index 80245ba2ea6a..0e87b83644f8 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -656,7 +656,8 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
             }
 #endif
 
-    for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = 
aIter.NextItem())
+    SfxItemIter aIter2(rItemSet);
+    for (const SfxPoolItem* pItem = aIter2.GetCurItem(); pItem; pItem = 
aIter2.NextItem())
     {
         HTMLAttr **ppAttr = nullptr;
 

Reply via email to