sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 3 --- sw/source/filter/ww8/docxtableexport.cxx | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit f0cdf8d8412fc5088ac5657bbcc671507476641a Author: Noel Grandin <[email protected]> AuthorDate: Mon Jan 19 16:56:32 2026 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Jan 20 11:05:49 2026 +0100 officeotron: w:shd must have val attribute Change-Id: Ia4ec654a6ba6c341a89994ac7a5f6e575ae1defa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197591 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> (cherry picked from commit 6ebb696bebb04e2296a6dfcba769ec4bd3f8ed88) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197636 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 18abf65f0303..08a1a1443914 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -36,9 +36,6 @@ public: DECLARE_OOXMLEXPORT_TEST(testTdf57589_hashColor, "tdf57589_hashColor.docx") { - // FIXME: validation error in OOXML export: Errors: 51 - skipValidation(); - CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), u"FillStyle"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_LIGHTMAGENTA, getProperty<Color>(getParagraph(1), u"ParaBackColor"_ustr)); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(2), u"FillStyle"_ustr)); diff --git a/sw/source/filter/ww8/docxtableexport.cxx b/sw/source/filter/ww8/docxtableexport.cxx index 6be12ab131ef..ab76c65ea2d3 100644 --- a/sw/source/filter/ww8/docxtableexport.cxx +++ b/sw/source/filter/ww8/docxtableexport.cxx @@ -571,6 +571,7 @@ void DocxAttributeOutput::TableBackgrounds( } else { + bool bAddedValAttr = false; rtl::Reference<sax_fastparser::FastAttributeList> pAttrList; for (const auto & [ name, val ] : rGrabBag) @@ -595,8 +596,14 @@ void DocxAttributeOutput::TableBackgrounds( else if (name == "color") AddToAttrList(pAttrList, FSNS(XML_w, XML_color), val.get<OUString>()); else if (name == "val") + { AddToAttrList(pAttrList, FSNS(XML_w, XML_val), val.get<OUString>()); + bAddedValAttr = true; + } } + // w:val attribute is required + if (!bAddedValAttr) + AddToAttrList(pAttrList, FSNS(XML_w, XML_val), "clear"); m_pSerializer->singleElementNS(XML_w, XML_shd, pAttrList); } }
