sw/qa/extras/ooxmlexport/data/CT-with-frame.docx     |binary
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx           |   10 ++++++++++
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx |    1 +
 3 files changed, 11 insertions(+)

New commits:
commit a18e9cc9c043a14e0a7ffd15f40bfe7f5035fdd4
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Feb 25 16:03:20 2025 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Feb 26 12:07:34 2025 +0100

    tdf#165330 writerfilter: fix import of redline in paragraph after frame
    
    The flag m_bIsActualParagraphFramed is reset only in
    ExecuteFrameConversion() which is called at the end of the paragraph
    that follows the one that is in the frame, so all redlines in that
    paragraph were erroneously moved to the frame; reset it when a paragraph
    ends, if the next paragraph is also in the frame it can set the flag
    again.
    
    (regression from commit e8bae67b3dbcc90ace8264b6b1aefaf0ce459aba)
    
    Change-Id: I75a18d2e7b600737958e984c135ebf6201e6f979
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182181
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit d09f3f24c38eda633825f4ac214731db06bc9a9a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182191
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/CT-with-frame.docx 
b/sw/qa/extras/ooxmlexport/data/CT-with-frame.docx
new file mode 100644
index 000000000000..85653b0caaec
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/CT-with-frame.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index a929f37a1eae..d9056a70222c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -1639,6 +1639,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf128156)
     assertXPath(pXmlDoc, "//w:ins"_ostr, 2);
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf165330)
+{
+    loadAndSave("CT-with-frame.docx");
+
+    xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
+    // check that *both* tracked changes were round tripped
+    assertXPathContent(pXmlDoc, "//w:p[1]/w:ins/w:r/w:t", u"world! "_ustr);
+    assertXPathContent(pXmlDoc, "//w:p[3]/w:ins/w:r/w:t", u"hello "_ustr);
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testTdf125546)
 {
     loadAndSave("tdf125546.docx");
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index 411213cd9f96..2e225a1c86e0 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -2987,6 +2987,7 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
     else
         SetIsPreviousParagraphFramed(false);
 
+    m_bIsActualParagraphFramed = false;
     m_StreamStateStack.top().bRemoveThisParagraph = false;
     if( !IsInHeaderFooter() && !IsInShape()
         && (!pParaContext || !pParaContext->props().IsFrameMode()) )

Reply via email to