diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/sdt-before-field.docx | bin | 0 -> 12995 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-before-field.docx b/sw/qa/extras/ooxmlexport/data/sdt-before-field.docx Binary files differnew file mode 100644 index 000000000000..a83a76885c29 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/sdt-before-field.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx index 3eec094dbf30..923a82ffc969 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx @@ -599,6 +599,15 @@ DECLARE_OOXMLEXPORT_TEST(testfdo82123, "fdo82123.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:p/w:sdt[1]/w:sdtContent/w:r",1); } +DECLARE_OOXMLEXPORT_TEST(testSdtBeforeField, "sdt-before-field.docx") +{ + if (xmlDocPtr pXmlDoc = parseExport("word/document.xml")) + { + // Make sure the field doesn't sneak inside the SDT: the SDT should contain only a single run (there were 6 ones). + assertXPath(pXmlDoc, "//w:sdt/w:sdtContent/w:r", 1); + } +} + DECLARE_OOXMLEXPORT_TEST(testfdo81946, "fdo81946.docx") { xmlDocPtr pXmlDoc = parseExport("word/header1.xml"); |