diff options
author | Rajashri <rajashri.udhoji@synerzip.com> | 2014-03-20 13:27:17 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-21 17:27:11 +0000 |
commit | 5ff0e274bb146bbaede31e9e349cba301137d4f2 (patch) | |
tree | d93b9b8eee9a6c2e8228c0552422c4657560ede3 /sw/qa/extras | |
parent | 9ae556c626da301f3798c33dc7632c7c891f2a04 (diff) |
fdo#76361 : LO crash: LO crashes while saving the document to docx
The document contains an empty table with borders.
LO was treating this table as a nested table, which lead to
a TC tag mismatch.
In docxattributeoutput.cxx, inside 'switchHeaderFooter'
added a check against 'm_oldTableReference->m_pOldTablepInner'
For some documents, even if the above value was null, still
it was getting assigned to 'm_tableReference' . Thus in such situations
it leads to a crash.
Change-Id: I883267585cb804f961989797de57c4b843b96821
Reviewed-on: https://gerrit.libreoffice.org/8677
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx | bin | 0 -> 16327 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx b/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx Binary files differnew file mode 100644 index 000000000000..6d890acdb5d9 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index a1542d93a1a9..966e52cef79e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2887,6 +2887,18 @@ DECLARE_OOXMLEXPORT_TEST(test76108, "test76108.docx") assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:fldChar[1]", "fldCharType", "begin"); } +DECLARE_OOXMLEXPORT_TEST(testTCTagMisMatch, "TCTagMisMatch.docx") +{ + // TCTagMisMatch.docx : This document contains a empty table with borders. + // there was a TC tag mismatch which resulted into a crash. + + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if(!pXmlDoc) + return; + assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tr[1]/w:tc[1]",0); + assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]", 1); +} + DECLARE_OOXMLEXPORT_TEST(testHyperLinkTagEnded, "fdo76316.docx") { /* XML tag <w:hyperlink> was not getting closed when its inside another |