sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 3 --- sw/source/filter/ww8/docxtableexport.cxx | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit 6ebb696bebb04e2296a6dfcba769ec4bd3f8ed88 Author: Noel Grandin <[email protected]> AuthorDate: Mon Jan 19 16:56:32 2026 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Jan 20 07:15:11 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]> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 291a953ae839..d05610e0b012 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -38,9 +38,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 3957ba7a3285..c9ce5f68a6b2 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); } }
