sw/qa/extras/ooxmlexport/ooxmlexport18.cxx   |    6 ------
 sw/qa/extras/ooxmlexport/ooxmlexport20.cxx   |    3 ---
 sw/source/filter/ww8/docxattributeoutput.cxx |    7 +++++++
 3 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 63eaa34ce3abbab971cf4a13582ad5a4bd0fed54
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Jan 14 14:00:45 2026 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Fri Jan 16 09:08:15 2026 +0100

    officeotron: w:val attribute is required for w:shd
    
    we end up with
    
      <w:shd w:fill="548DD4"/>
    
    I forced a default value of "clear" in the absense of any better idea.
    
    Change-Id: I6e680f18aca3bc71743b42da4e152a664e9d9303
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197289
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index bce66556cbef..dcee47b8e3cd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -193,9 +193,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf153592_columnBreaks)
 
 DECLARE_OOXMLEXPORT_TEST(testTdf104394_lostTextbox, 
"tdf104394_lostTextbox.docx")
 {
-    //FIXME: validation error in OOXML export: Errors: 4
-    skipValidation();
-
     // This was only one page b/c the textbox was missing.
     CPPUNIT_ASSERT_EQUAL(2, getPages());
 }
@@ -306,9 +303,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154703_framePr2)
     createSwDoc("tdf154703_framePr2.rtf");
     verify();
 
-    //FIXME: validation error in OOXML export: Errors: 1
-    skipValidation();
-
     saveAndReload(TestFilter::DOCX);
     verify(/*bIsExport*/ true);
 
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index f553ea9a2878..326253db5c5d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -10467,6 +10467,7 @@ void DocxAttributeOutput::ParaGrabBag(const 
SfxGrabBagItem& rItem)
             uno::Sequence<beans::PropertyValue> aGrabBagSeq;
             rGrabBagElement.second >>= aGrabBagSeq;
 
+            bool bAddedValAttr = false;
             for (const auto& rProp : aGrabBagSeq)
             {
                 OUString sVal = rProp.Value.get<OUString>();
@@ -10475,7 +10476,10 @@ void DocxAttributeOutput::ParaGrabBag(const 
SfxGrabBagItem& rItem)
                     continue;
 
                 if (rProp.Name == "val")
+                {
                     AddToAttrList(m_pBackgroundAttrList, FSNS(XML_w, XML_val), 
sVal);
+                    bAddedValAttr = true;
+                }
                 else if (rProp.Name == "color")
                     AddToAttrList(m_pBackgroundAttrList, FSNS(XML_w, 
XML_color), sVal);
                 else if (rProp.Name == "themeColor")
@@ -10495,6 +10499,9 @@ void DocxAttributeOutput::ParaGrabBag(const 
SfxGrabBagItem& rItem)
                 else if (rProp.Name == "originalColor")
                     rProp.Value >>= m_sOriginalBackgroundColor;
             }
+            // w:val attribute is required
+            if (!bAddedValAttr)
+                AddToAttrList(m_pBackgroundAttrList, FSNS(XML_w, XML_val), 
"clear");
         }
         else if (rGrabBagElement.first == "SdtPr")
         {
commit 088fe91d162200b860c1e3419720cf1a77bfd92b
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Jan 14 13:48:32 2026 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Fri Jan 16 09:08:03 2026 +0100

    this test passes validation now
    
    Change-Id: I60532d22578d2f3974b840e0b66d25f968a3500a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197288
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
index f77f9aa65a4e..3151be3d74fa 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
@@ -906,9 +906,6 @@ CPPUNIT_TEST_FIXTURE(Test, fdo60957)
 {
     createSwDoc("fdo60957-2.docx");
 
-    //FIXME: validation error in OOXML export: Errors: 3
-    skipValidation();
-
     save(TestFilter::DOCX);
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
     assertXPath(pXmlDoc, "//w:tbl", 2);

Reply via email to