summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-07-31 10:50:44 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-07-31 11:03:51 +0200
commit48f52a509aeed8c8a780bf07d3761a7699e8a36b (patch)
tree9c5bbc61f55f58531e5c2f0d016ff5218bb1c574 /sw/qa
parent7f9732e998e6e90cafa8bd36886af5e8bc7a71a1 (diff)
DocxAttributeOutput::WriteSdtBlock: never write <w:id> twice
Change-Id: Iab68a4e809a7924e753db5a85d9914308419b845
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/2-id.docxbin0 -> 12782 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/2-id.docx b/sw/qa/extras/ooxmlexport/data/2-id.docx
new file mode 100644
index 000000000000..6d05e68a6c63
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/2-id.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 76cb59206635..1e0b98d03c50 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -532,6 +532,15 @@ DECLARE_OOXMLEXPORT_TEST(testSdt2Run, "sdt-2-para.docx")
}
}
+DECLARE_OOXMLEXPORT_TEST(test2Id, "2-id.docx")
+{
+ if (xmlDocPtr pXmlDoc = parseExport())
+ {
+ // This was 2, but only one w:id is allowed.
+ assertXPath(pXmlDoc, "//w:sdtPr/w:id", 1);
+ }
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();