sdext/source/pdfimport/tree/writertreevisiting.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5589659829f8a1cef8ca1c8a468732105bbe231b
Author:     Kevin Suo <suokunl...@126.com>
AuthorDate: Wed Nov 22 16:11:33 2023 +0800
Commit:     Kevin Suo <suokunl...@126.com>
CommitDate: Tue Nov 28 03:08:39 2023 +0100

    tdf#157589 tdf#153969: Revert "sdext.pdfimport Writer: Do not visit...
    
    ... DrawElement twice in WriterXmlEmitter"
    
    This reverts commit 9ea9d3ccc0f8e4833e745d9655b61d42d6d8fe83.
    
    The reason for the revert:
    It causes regressions as indicated in tdf#157589 and tdf#153969.
    That commit may be my misunderstanding of the code.
    
    Change-Id: Idd188bf83721d309623a7f8484d064327a3a23af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159811
    Tested-by: Jenkins
    Reviewed-by: Kevin Suo <suokunl...@126.com>

diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx 
b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index 7941f7d35709..9ecce8f48be4 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -413,7 +413,7 @@ void WriterXmlEmitter::visit( DocumentElement& elem, const 
std::list< std::uniqu
     // only DrawElement types
     for( auto it = elem.Children.begin(); it != elem.Children.end(); ++it )
     {
-        if( dynamic_cast<DrawElement*>(it->get()) != nullptr )
+        if( dynamic_cast<DrawElement*>(it->get()) == nullptr )
             (*it)->visitedBy( *this, it );
     }
 

Reply via email to