sw/source/filter/ww8/docxtableexport.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit ad0f8a0aa2478cf199b8820c8239a1b4723b2757 Author: Noel Grandin <[email protected]> AuthorDate: Mon Jan 19 16:56:32 2026 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Jan 20 17:02:22 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]> (cherry picked from commit f0cdf8d8412fc5088ac5657bbcc671507476641a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197649 diff --git a/sw/source/filter/ww8/docxtableexport.cxx b/sw/source/filter/ww8/docxtableexport.cxx index 4d18255dfdac..1272c0179453 100644 --- a/sw/source/filter/ww8/docxtableexport.cxx +++ b/sw/source/filter/ww8/docxtableexport.cxx @@ -573,6 +573,7 @@ void DocxAttributeOutput::TableBackgrounds( } else { + bool bAddedValAttr = false; rtl::Reference<sax_fastparser::FastAttributeList> pAttrList; for (const auto & [ name, val ] : rGrabBag) @@ -597,8 +598,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); } }
