summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-07-31 17:20:43 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-07-31 17:46:38 +0200
commit8fea536cebefe319a7fd5971b28e0936ac91ecb9 (patch)
tree6ba3b9b0d059257c115acb683d94a7af8e6da91e /sw
parentddb24728b2971f6ed64a0372acb166251f1d9c8f (diff)
SdtHelper::createDateControl: clear the property list after reading it
Otherwise it may happen that the property list will be read twice, and on export we'll create two <w:sdt> for a single imported one. Change-Id: I57ab595f956c5e808fc73fe644ee3e249a1fc1ed
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docxbin0 -> 34071 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx9
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx b/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx
new file mode 100644
index 000000000000..038ab111dad9
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 73fab5433ee6..2e5844aa3ae4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -550,6 +550,15 @@ DECLARE_OOXMLEXPORT_TEST(testTableStart2Sdt, "table-start-2-sdt.docx")
}
}
+DECLARE_OOXMLEXPORT_TEST(testSdtDateDuplicate, "sdt-date-duplicate.docx")
+{
+ if (xmlDocPtr pXmlDoc = parseExport())
+ {
+ // Single <w:sdt> was exported as 2 <w:sdt> elements.
+ assertXPath(pXmlDoc, "//w:sdt", 1);
+ }
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();