diff options
author | Dinesh Patil <dinesh.patil@synerzip.com> | 2014-03-14 16:56:17 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-17 15:51:00 +0000 |
commit | 4c1cdd43de6e45726054fffb4b8c80ef9269f24a (patch) | |
tree | 79959978ff64ba2daa0c040fcf235bff4ba53bfb | |
parent | 55211e612d2cbed03dd81c039d07ea4e936c2804 (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>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/99_Fields.docx | bin | 0 -> 15788 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 11 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/99_Fields.docx b/sw/qa/extras/ooxmlexport/data/99_Fields.docx Binary files differnew file mode 100644 index 000000000000..e0ee431e33c2 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/99_Fields.docx 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 diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 2d647fcd50f8..a5c954b05322 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3869,6 +3869,7 @@ void DomainMapper_Impl::PopFieldContext() { m_bStartedTOC = false; m_aTextAppendStack.pop(); + m_bTextInserted = false; } m_bStartTOC = false; m_bStartIndex = false; |