fdo#74150:Numbered list getting display after RT -table-within-table-1.docx
Description: For pStyle = 'NumberedList1', iLvl and numId was not preserved. These tags needs to be preserved under numPr in document.xml These tags are preserved now. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: Ib6734c9ae55bd72d4fbc0f6d6cae85764ac1a244 Reviewed-on: https://gerrit.libreoffice.org/7767 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
This commit is contained in:
parent
e404080a60
commit
a7f68538f5
BIN
sw/qa/extras/ooxmlexport/data/NumberedList.docx
Normal file
BIN
sw/qa/extras/ooxmlexport/data/NumberedList.docx
Normal file
Binary file not shown.
@ -3129,6 +3129,21 @@ DECLARE_OOXMLEXPORT_TEST(test77219, "test77219.docx")
|
||||
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[6]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "behindDoc", "1");
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testNumberedList,"NumberedList.docx")
|
||||
{
|
||||
//fdo74150:In document.xml, for pStyle = "NumberedList1", iLvl and numId was not preserved
|
||||
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
|
||||
if (!pXmlDoc)
|
||||
return;
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr[1]/w:pStyle", "val", "NumberedList1");
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr[1]/w:numPr/w:ilvl","val", "0");
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr[1]/w:numPr/w:numId","val", "0");
|
||||
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[3]/w:pPr[1]/w:pStyle","val", "NumberedList1");
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[3]/w:pPr[1]/w:numPr/w:ilvl","val", "0");
|
||||
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[3]/w:pPr[1]/w:numPr/w:numId","val", "0");
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testFDO76597, "fdo76597.docx")
|
||||
{
|
||||
// check XML
|
||||
|
@ -6106,7 +6106,7 @@ void DocxAttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone )
|
||||
|
||||
void DocxAttributeOutput::ParaNumRule_Impl( const SwTxtNode* /*pTxtNd*/, sal_Int32 nLvl, sal_Int32 nNumId )
|
||||
{
|
||||
if ( USHRT_MAX != nNumId && 0 != nNumId )
|
||||
if ( USHRT_MAX != nNumId )
|
||||
{
|
||||
m_pSerializer->startElementNS( XML_w, XML_numPr, FSEND );
|
||||
m_pSerializer->singleElementNS( XML_w, XML_ilvl, FSNS( XML_w, XML_val ), OString::number( nLvl).getStr(), FSEND );
|
||||
|
Loading…
x
Reference in New Issue
Block a user