officeotron: w:pPrChange is incomplete
the schema says w:pPr is required under w:pPrChange.
I dont understand the unit test I changed here, it was
added with:
commit c2c08b7d0e
Author: Adam Co <rattles2013@gmail.com>
Date: Mon Jan 13 13:55:05 2014 +0200
Add unit-test for 'track changes - paragraph properties changed' preservation
But seems to be asserting that we __dont__ preserve w:pPr,
which makes no sense.
So fix that.
Change-Id: I536992bd3aec232f8dffda4f753c887148a877f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196786
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user