chart2/qa/extras/chart2export.cxx          |    2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx |    4 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx  |    2 +-
 sw/source/filter/ww8/wrtw8nds.cxx          |    1 -
 4 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 84a716a9f2fc9d81e17cb3e979daaa79ba6b6f99
Author:     Justin Luth <[email protected]>
AuthorDate: Sat Jan 31 10:12:18 2026 -0500
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Feb 5 09:34:00 2026 +0100

    tdf#170516 docx export: always write flies in separate w:r
    
    This clause was included in the original commit
       fdo#78333 : SdtContent and a Shape overlapping causes corruption
    but I can't fathom why it would be there.
    
    Content Controls (always?) have two of these marks.
    Fields have their own distinct markers.
    A single CH_TXTATR_BREAKWORD is primarily used for AS_CHAR flies,
    but also for comments and probably more stuff.
    
    IIUC, the difference between a fly and an inline
    is that the inline ALSO has a CH_TXTATR_BREAKWORD,
    but in both cases they are RES_TXTATR_FLYCNT.
    
    Generally, during my testing, things are better
    when there is a separate run.
    So lets remove this exception clause,
    since during my research I couldn't find
    a reason why it should have existed in the first place.
    
    It is way too generic of an exception anyway.
    If there is a particular situation where
    a separate run is undesirable,
    it needs to be handled explicitly.
    
    The unit tests that changed
    were simply to acknowledge the inline was in the new w:r.
    
    Change-Id: Ie212d1903eb5f90d325f9ad8d4bba6705f5910b8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198634
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index bed05f40097c..ebe8c216d8ef 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -995,7 +995,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest, 
testShapeFollowedByChart)
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
     CPPUNIT_ASSERT(pXmlDoc);
 
-    OUString aValueOfFirstDocPR = getXPath(pXmlDoc, 
"/w:document/w:body/w:p[3]/w:r[1]/w:drawing[1]/wp:inline[1]/wp:docPr[1]", "id");
+    OUString aValueOfFirstDocPR = getXPath(pXmlDoc, 
"/w:document/w:body/w:p[3]/w:r[2]/w:drawing[1]/wp:inline[1]/wp:docPr[1]", "id");
     OUString aValueOfSecondDocPR = getXPath(pXmlDoc, 
"/w:document/w:body/w:p[3]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:docPr[1]",
 "id");
 
     CPPUNIT_ASSERT( aValueOfFirstDocPR != aValueOfSecondDocPR );
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index b724869b42bf..7147812a028b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -983,9 +983,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf134618)
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
 
     //Without the fix it in place, it would have failed with
-    //- Expected: 1
+    //- Expected: 2
     //- Actual  : 9
-    assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 1);
+    assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 2);
 
     assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent", 2);
 }
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index dd7e7b2e6ae8..8f398e06a4b1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -56,7 +56,7 @@ CPPUNIT_TEST_FIXTURE(Test,  testChildNodesOfCubicBezierTo)
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
 
     assertXPath( pXmlDoc,
-        
"/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent[1]/mc:Choice/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wpg:wgp[1]/wps:wsp[3]/wps:spPr[1]/a:custGeom[1]/a:pathLst[1]/a:path[1]/a:cubicBezTo[2]/a:pt[3]");
+        
"/w:document/w:body/w:p[2]/w:r[2]/mc:AlternateContent[1]/mc:Choice/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wpg:wgp[1]/wps:wsp[3]/wps:spPr[1]/a:custGeom[1]/a:pathLst[1]/a:path[1]/a:cubicBezTo[2]/a:pt[3]");
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testMSwordHang)
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 8c128ef07bf3..616622473ec2 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2568,7 +2568,6 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
             // DOCX: Put the flies in their own run.
             // This is critical for plainText content controls and fields.
             if (nStateOfFlyFrame == FLY_PROCESSED && !aStr.isEmpty()
-                && aStr != OUStringChar(CH_TXTATR_BREAKWORD)
                 && GetExportFormat() == MSWordExportBase::ExportFormat::DOCX)
             {
                 // FLY_PROCESSED: there is at least 1 fly already written

Reply via email to