sw/source/filter/ww8/docxattributeoutput.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 86acbdf34ae5a13ce2d6d24a5a97583f176d6c83 Author: Noel Grandin <[email protected]> AuthorDate: Wed Jan 14 14:00:45 2026 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Fri Jan 16 13:44:57 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]> (cherry picked from commit 63eaa34ce3abbab971cf4a13582ad5a4bd0fed54) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197420 Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7287489147d7..501106661936 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -10317,6 +10317,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>(); @@ -10325,7 +10326,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") @@ -10345,6 +10349,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") {
