summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorDinesh Patil <dinesh.patil@synerzip.com>2014-03-14 16:56:17 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-17 15:51:00 +0000
commit4c1cdd43de6e45726054fffb4b8c80ef9269f24a (patch)
tree79959978ff64ba2daa0c040fcf235bff4ba53bfb /sw
parent55211e612d2cbed03dd81c039d07ea4e936c2804 (diff)
fdo#76109: LO Crashes while opening the docx file containing three fields
- DOCX file containing fields BIBLIOGRAPHY on first line, BIDIOUTLINE on second line and CITATION on third line is getting crashed while opening in LO - Fixed this issue and added unit test case for the same. Change-Id: Ia8394a3a26157f88693edcf60b0161947d8a9ac0 Reviewed-on: https://gerrit.libreoffice.org/8589 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/99_Fields.docxbin0 -> 15788 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/99_Fields.docx b/sw/qa/extras/ooxmlexport/data/99_Fields.docx
new file mode 100644
index 000000000000..e0ee431e33c2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/99_Fields.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 0bc7d601e3c8..f3124944bb07 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2719,6 +2719,17 @@ DECLARE_OOXMLEXPORT_TEST(test_OpeningBrace, "2120112713_OpenBrace.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/m:oMath[1]/m:d[1]/m:dPr[1]/m:begChr[1]","val","");
}
+DECLARE_OOXMLEXPORT_TEST(test_FieldType, "99_Fields.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ // Checking for three field types (BIBLIOGRAPHY, BIDIOUTLINE, CITATION) in sequence
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[2]/w:r[2]/w:instrText[1]",1);
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[5]/w:r[2]/w:instrText[1]",1);
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[6]/w:r[2]/w:instrText[1]",1);
+}
+
DECLARE_OOXMLEXPORT_TEST(testComboBoxControl, "combobox-control.docx")
{
// check XML