diff options
author | László Németh <nemeth@numbertext.org> | 2019-10-02 14:57:16 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-10-03 07:59:10 +0200 |
commit | f9aac900ada3d507526eeeed5b51fc7a10ab4cae (patch) | |
tree | dbfbd92ceecadd91dd4f8b931ac486a37de671a9 /sw | |
parent | 1af2f8f75e4e15c1b0c3e5a04e405fc4b354ef2b (diff) |
tdf#81100 DOCX import: repeat header according to table style
Table style based repeating table header wasn't repeated,
only direct table formatting.
Change-Id: I119e6d32bf22c6c85a84aa42ae4cd6c5f60166b2
Reviewed-on: https://gerrit.libreoffice.org/80053
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf81100.docx | bin | 19329 -> 29760 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf81100.docx b/sw/qa/extras/ooxmlexport/data/tdf81100.docx Binary files differindex 61038d190c7e..cd46100f0556 100644 --- a/sw/qa/extras/ooxmlexport/data/tdf81100.docx +++ b/sw/qa/extras/ooxmlexport/data/tdf81100.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 47d5500a76f4..835e991f5651 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -974,6 +974,17 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf81100, "tdf81100.docx") CPPUNIT_ASSERT(pXmlDoc); // keep "repeat table header" setting of table styles assertXPath(pXmlDoc, "/w:styles/w:style/w:tblStylePr/w:trPr/w:tblHeader", 4); + + xmlDocPtr pDump = parseLayoutDump(); + CPPUNIT_ASSERT_EQUAL(3, getPages()); + + // table starts on page 1 and finished on page 2 + // and it has got only a single repeating header line + assertXPath(pDump, "/root/page[2]/body/tab[1]", 1); + assertXPath(pDump, "/root/page[2]/body/tab[1]/row", 2); + assertXPath(pDump, "/root/page[3]/body/tab", 1); + if (!mbExported) // TODO export tblHeader=false + assertXPath(pDump, "/root/page[3]/body/tab/row", 1); } DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121597TrackedDeletionOfMultipleParagraphs, "tdf121597.odt") diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index cab57300c1da..eec9e5039519 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3540,7 +3540,7 @@ void DocxAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t c // Header row: tblHeader const SwTable *pTable = pTableTextNodeInfoInner->getTable( ); if ( pTable->GetRowsToRepeat( ) > pTableTextNodeInfoInner->getRow( ) ) - m_pSerializer->singleElementNS(XML_w, XML_tblHeader, FSNS(XML_w, XML_val), "true"); + m_pSerializer->singleElementNS(XML_w, XML_tblHeader, FSNS(XML_w, XML_val), "true"); // TODO to overwrite table style may need explicit false TableRowRedline( pTableTextNodeInfoInner ); TableHeight( pTableTextNodeInfoInner ); |