diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index bed61269e457..ef2a3618cfa2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -190,12 +190,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTrackChangesParagraphProperties) { createSwDoc("testTrackChangesParagraphProperties.docx"); - //FIXME: validation error in OOXML export: Errors: 1 - skipValidation(); - save(TestFilter::DOCX); xmlDocUniquePtr pXmlDoc = parseExport(u"word/document.xml"_ustr); - assertXPathChildren(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pPrChange", 0); + assertXPathChildren(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pPrChange", 1); } CPPUNIT_TEST_FIXTURE(Test, testMsoSpt180) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index a645e9922cb2..703dcc18263f 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4282,6 +4282,8 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) if (!bNoDate) pAttributeList->add(FSNS( XML_w, XML_date ), DateTimeToOString( aDateTime )); m_pSerializer->startElementNS( XML_w, XML_pPrChange, pAttributeList ); + m_pSerializer->startElementNS(XML_w, XML_pPr); + m_pSerializer->mark(Tag_Redline_2, comphelper::containerToSequence(aParagraphPropertiesOrder)); // Check if there is any extra data stored in the redline object if (pRedlineData->GetExtraData()) @@ -4297,10 +4299,6 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) const UIName & sParaStyleName = pFormattingChanges->GetFormatName(); if (pChangesSet || !sParaStyleName.isEmpty()) { - m_pSerializer->startElementNS(XML_w, XML_pPr); - - m_pSerializer->mark(Tag_Redline_2, comphelper::containerToSequence(aParagraphPropertiesOrder)); - if (!sParaStyleName.isEmpty()) { OString sStyleName; @@ -4336,13 +4334,11 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) m_rExport.SdrExporter().getFlyAttrList() = std::move(pFlyAttrList_Original); m_pLRSpaceAttrList = std::move(pLRSpaceAttrList_Original); m_pParagraphSpacingAttrList = std::move(pParagraphSpacingAttrList_Original); - - m_pSerializer->mergeTopMarks(Tag_Redline_2); - - m_pSerializer->endElementNS( XML_w, XML_pPr ); } } } + m_pSerializer->mergeTopMarks(Tag_Redline_2); + m_pSerializer->endElementNS( XML_w, XML_pPr ); m_pSerializer->endElementNS( XML_w, XML_pPrChange ); break; }