oox/qa/unit/mcgr.cxx | 1 + sw/qa/extras/ooxmlexport/ooxmlexport20.cxx | 2 +- sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 2 +- sw/source/filter/ww8/docxexport.cxx | 19 +++++++++---------- sw/source/filter/ww8/docxsdrexport.cxx | 2 ++ 5 files changed, 14 insertions(+), 12 deletions(-)
New commits: commit 0c29ba0c4690e9f135390f2cef5da02842987329 Author: Noel Grandin <[email protected]> AuthorDate: Fri Nov 14 17:47:34 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Nov 14 20:13:00 2025 +0100 officeotron: config elements out of schema order triggered in test testToolsLineNumbering with a custom build that turns on officeotron validation. Change-Id: I527febfc66732a0d34b0e196883faebbe3289dfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194042 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 58b50c3eee0f..896b8401d794 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1069,9 +1069,10 @@ static auto WriteCompat(SwDoc const& rDoc, ::sax_fastparser::FSHelperPtr const& rpFS) -> void { const IDocumentSettingAccess& rIDSA = rDoc.getIDocumentSettingAccess(); - if (!rIDSA.get(DocumentSettingId::ADD_EXT_LEADING)) + // tdf#88908 adjust CJK-context normal spaces to half of an ideographic space + if (rIDSA.get(DocumentSettingId::BALANCE_SPACES_AND_IDEOGRAPHIC_SPACES)) { - rpFS->singleElementNS(XML_w, XML_noLeading); + rpFS->singleElementNS(XML_w, XML_balanceSingleByteDoubleByteWidth); } if (rIDSA.get(DocumentSettingId::MS_WORD_UL_TRAIL_SPACE)) rpFS->singleElementNS(XML_w, XML_ulTrailSpace); @@ -1080,25 +1081,23 @@ WriteCompat(SwDoc const& rDoc, ::sax_fastparser::FSHelperPtr const& rpFS) -> voi { rpFS->singleElementNS(XML_w, XML_doNotExpandShiftReturn); } - // tdf#88908 adjust CJK-context normal spaces to half of an ideographic space - if (rIDSA.get(DocumentSettingId::BALANCE_SPACES_AND_IDEOGRAPHIC_SPACES)) + if (!rIDSA.get(DocumentSettingId::ADD_EXT_LEADING)) { - rpFS->singleElementNS(XML_w, XML_balanceSingleByteDoubleByteWidth); + rpFS->singleElementNS(XML_w, XML_noLeading); } // tdf#146515 export "Use printer metrics for document formatting" if (!rIDSA.get(DocumentSettingId::USE_VIRTUAL_DEVICE)) rpFS->singleElementNS(XML_w, XML_usePrinterMetrics); - + if (rIDSA.get(DocumentSettingId::ADJUST_TABLE_LINE_HEIGHTS_TO_GRID_HEIGHT)) + { + rpFS->singleElementNS(XML_w, XML_adjustLineHeightInTable); + } if (rIDSA.get(DocumentSettingId::DO_NOT_BREAK_WRAPPED_TABLES)) { // Map the DoNotBreakWrappedTables compat flag to <w:doNotBreakWrappedTables>. rpFS->singleElementNS(XML_w, XML_doNotBreakWrappedTables); } - if (rIDSA.get(DocumentSettingId::ADJUST_TABLE_LINE_HEIGHTS_TO_GRID_HEIGHT)) - { - rpFS->singleElementNS(XML_w, XML_adjustLineHeightInTable); - } } void DocxExport::WriteSettings() commit 8a1406164584262002a84849341739f5ef85906e Author: Noel Grandin <[email protected]> AuthorDate: Thu Nov 13 20:16:44 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Nov 14 20:12:46 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 diff --git a/oox/qa/unit/mcgr.cxx b/oox/qa/unit/mcgr.cxx index 88bc2bce99a4..b327c710585e 100644 --- a/oox/qa/unit/mcgr.cxx +++ b/oox/qa/unit/mcgr.cxx @@ -65,6 +65,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord) assertXPathInsensitive(pXmlDoc, sPath + "w14:gs[2]/w14:srgbClr", "val", u"ffff00"); assertXPath(pXmlDoc, sPath + "w14:gs[3]", "pos", u"100000"); assertXPathInsensitive(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 85ebb3da58ff..24a80e22d538 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 246e43742cac..4c84b825cb26 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)
