sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |    3 ---
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx   |    9 ---------
 sw/source/filter/ww8/docxattributeoutput.cxx |   10 ++++++----
 3 files changed, 6 insertions(+), 16 deletions(-)

New commits:
commit 345efadb6af33607e23a5f72436c27554efef832
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Jan 14 15:28:06 2026 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Jan 20 10:39:05 2026 +0100

    officeotron: ordering of w:startOverride wrong
    
    we end up with
    
        <w:lvlOverride w:ilvl="0">
            <w:lvl w:ilvl="0">
                ....
            </w:lvl>
            <w:startOverride w:val="1"/>
        </w:lvlOverride>
    
    but startOverride needs to come before w:lvl
    
    Change-Id: Ide251945b312d48101e277970f1a53fc52c8b5a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197290
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197430

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index bddf3715c7bd..3a42e7e3890d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -755,9 +755,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf142407, "tdf142407.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testWPGBodyPr, "WPGbodyPr.docx")
 {
-    // FIXME: validation error in OOXML export: Errors: 3
-    skipValidation();
-
     // There are a WPG shape and a picture
     CPPUNIT_ASSERT_EQUAL(2, getShapes());
 
@@ -803,9 +800,6 @@ DECLARE_OOXMLEXPORT_TEST(testWPGBodyPr, "WPGbodyPr.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTdf146851_1, "tdf146851_1.docx")
 {
-    // FIXME: validation error in OOXML export: Errors: 1
-    skipValidation();
-
     uno::Reference<beans::XPropertySet> xPara;
 
     xPara.set(getParagraph(1, u"qwerty"_ustr), uno::UNO_QUERY);
@@ -990,9 +984,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146955)
 {
     createSwDoc("tdf146955.odt");
 
-    // FIXME: validation error in OOXML export: Errors: 9
-    skipValidation();
-
     saveAndReload(TestFilter::DOCX);
     // import of a (broken?) DOCX export with dozens of frames raised a SAX 
exception,
     // when the code tried to access to a non-existent footnote
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 5681d8706a37..c59580cb3714 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7790,16 +7790,16 @@ void DocxAttributeOutput::OverrideNumberingDefinition(
 
             m_pSerializer->startElementNS(XML_w, XML_lvlOverride, FSNS(XML_w, 
XML_ilvl), OString::number(nLevel));
 
-            if (bListsAreDifferent)
-            {
-                GetExport().NumberingLevel(rRule, nLevel);
-            }
             if (levelOverride != rLevelOverrides.end())
             {
                 // list numbering restart override
                 m_pSerializer->singleElementNS(XML_w, XML_startOverride,
                     FSNS(XML_w, XML_val), 
OString::number(levelOverride->second));
             }
+            if (bListsAreDifferent)
+            {
+                GetExport().NumberingLevel(rRule, nLevel);
+            }
 
             m_pSerializer->endElementNS(XML_w, XML_lvlOverride);
         }
commit ef43364b5d2febbe99639048fe68f206475757d4
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Jan 15 14:36:41 2026 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Jan 20 10:38:59 2026 +0100

    officeotron: w:r inside w:pPr is invalid
    
    we end with the following in word/header1.xml:
    
    <w:hdr>
        <w:p>
            <w:pPr>
                <w:pStyle w:val="Header"/>
                <w:r>
                    <w:br w:type="page"/>
                </w:r>
                <w:rPr></w:rPr>
            </w:pPr>
    
    restrict the fix to the case of writing header data,
    just in case I missed some other case somewhere.
    
    Change-Id: I451480a075c55cafd016279d229dbf0698c01265
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197425
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 821e808610a9710d4875bff65604f34aacf4a29c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197590
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 4ada85283bde..851ba1e29f45 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -111,9 +111,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf121374_sectionHF)
 {
     createSwDoc("tdf121374_sectionHF.odt");
 
-    // FIXME: validation error in OOXML export: Errors: 1
-    skipValidation();
-
     saveAndReload(TestFilter::DOCX);
     uno::Reference<beans::XPropertySet> 
xPageStyle(getStyles(u"PageStyles"_ustr)->getByName(u"Standard"_ustr), 
uno::UNO_QUERY);
     uno::Reference<text::XTextRange> xFooterText = getProperty< 
uno::Reference<text::XTextRange> >(xPageStyle, u"FooterText"_ustr);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index a74fdf4a5b69..5681d8706a37 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7086,6 +7086,8 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak )
 
 void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const 
WW8_SepInfo* pSectionInfo, bool bExtraPageBreak)
 {
+    if (m_bWritingHeaderFooter && m_bOpenedParaPr)
+        return; // do not put a run inside <w:hdr>..<w:p>..<w:pPr>
     switch ( nC )
     {
         case msword::ColumnBreak:

Reply via email to