[Libreoffice-commits] core.git: sw/qa writerfilter/source
Dinesh Patil
dinesh.patil at synerzip.com
Mon Mar 17 08:51:23 PDT 2014
sw/qa/extras/ooxmlexport/data/99_Fields.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 11 +++++++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1 +
3 files changed, 12 insertions(+)
New commits:
commit 4c1cdd43de6e45726054fffb4b8c80ef9269f24a
Author: Dinesh Patil <dinesh.patil at synerzip.com>
Date: Fri Mar 14 16:56:17 2014 +0530
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 at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
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 0000000..e0ee431
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/99_Fields.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 0bc7d60..f312494 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 2d647fc..a5c954b 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;
More information about the Libreoffice-commits
mailing list