sw/source/filter/ww8/docxattributeoutput.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 2ea14d5ab7592cde9e27ddf3819c45d6336395c2
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Jan 14 14:00:45 2026 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Jan 17 20:07:43 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]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197510
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 91f75cc6ff49..3668c9b1aef5 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -10471,6 +10471,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>();
@@ -10479,7 +10480,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")
@@ -10499,6 +10503,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")
         {

Reply via email to