oox/qa/unit/mcgr.cxx                       |    1 +
 sw/qa/extras/ooxmlexport/ooxmlexport20.cxx |    2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx  |    2 +-
 sw/source/filter/ww8/docxsdrexport.cxx     |    2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 1958bd26aa71944579702e1b2878a3daa6115569
Author:     Noel Grandin <[email protected]>
AuthorDate: Thu Nov 13 20:16:44 2025 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Nov 20 22:51:58 2025 +0100

    officeotron: ID is not valid attribute in vml shape
    
    triggered in test
      testFontworkColorGradientWord
    with a custom build that turns on officeotron validation.
    
    Change-Id: Ie259e75c5b9987097c77c2c68ab4494c42bc498a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193984
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194099

diff --git a/oox/qa/unit/mcgr.cxx b/oox/qa/unit/mcgr.cxx
index 5cef50f06a8d..ecbf00eae216 100644
--- a/oox/qa/unit/mcgr.cxx
+++ b/oox/qa/unit/mcgr.cxx
@@ -65,6 +65,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord)
     assertXPath(pXmlDoc, sPath + "w14:gs[2]/w14:srgbClr", "val", u"ffff00");
     assertXPath(pXmlDoc, sPath + "w14:gs[3]", "pos", u"100000");
     assertXPath(pXmlDoc, sPath + "w14:gs[3]/w14:srgbClr", "val", u"00ffff");
+    validate(maTempFile.GetFileName(), u"Office Open XML Text");
 }
 
 CPPUNIT_TEST_FIXTURE(TestMCGR, testTdf155825_SourcOffsetRangeDifferent)
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
index de8b3ceedbc3..b4906a7a49be 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
@@ -829,7 +829,7 @@ CPPUNIT_TEST_FIXTURE(Test, testKDE302504)
     CPPUNIT_ASSERT_EQUAL(1, getShapes());
     CPPUNIT_ASSERT_EQUAL(1, getPages());
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
-    assertXPath(pXmlDoc, "//v:shape", "ID", u"KoPathShape");
+    assertXPath(pXmlDoc, "//v:shape", "id", u"shape_0");
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testKDE216114)
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index f17a6fa1b827..5bc5b36c3305 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -912,7 +912,7 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo79591)
     xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr);
 
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr",
 "name", u"_x0000_t0");
-    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", 
"ID", u"_x0000_t0");
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", 
"id", u"shape_0");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testBnc884615, "bnc884615.docx")
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index fa8875494418..02de909f553c 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1362,11 +1362,13 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* 
sdrObj, const SwFrameFormat
     const SwFormatVertOrient& rVertOri = rFrameFormat.GetVertOrient();
     SwFormatSurround const& rSurround(rFrameFormat.GetSurround());
 
+    m_pImpl->getExport().VMLExporter().SetSkipwzName(true);
     rtl::Reference<sax_fastparser::FastAttributeList> 
pAttrList(docx::SurroundToVMLWrap(rSurround));
     m_pImpl->getExport().VMLExporter().AddSdrObject(
         *sdrObj, rFlow.GetValue(), rHoriOri.GetHoriOrient(), 
rVertOri.GetVertOrient(),
         rHoriOri.GetRelationOrient(), rVertOri.GetRelationOrient(), 
pAttrList.get(), true);
     m_pImpl->getSerializer()->endElementNS(XML_w, XML_pict);
+    m_pImpl->getExport().VMLExporter().SetSkipwzName(false); // restore
 }
 
 static bool lcl_isLockedCanvas(const uno::Reference<drawing::XShape>& xShape)

Reply via email to