sw/source/filter/ww8/docxtableexport.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit a5d8cfd0d68f82ebb31ad64502c4ffd17cec7a7d Author: Noel Grandin <[email protected]> AuthorDate: Mon Jan 19 16:56:32 2026 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Tue Jan 20 20:36:09 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/+/197614 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/sw/source/filter/ww8/docxtableexport.cxx b/sw/source/filter/ww8/docxtableexport.cxx index 11ee65800f03..389f0397a4d8 100644 --- a/sw/source/filter/ww8/docxtableexport.cxx +++ b/sw/source/filter/ww8/docxtableexport.cxx @@ -592,6 +592,7 @@ void DocxAttributeOutput::TableBackgrounds( } else { + bool bAddedValAttr = false; rtl::Reference<sax_fastparser::FastAttributeList> pAttrList; for (const auto & [ name, val ] : rGrabBag) @@ -616,8 +617,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); } }
