summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-06-26 20:04:37 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-06-27 16:28:39 +0200
commite48aa5f55fd80f3e50d642c86a89c7506e04c4f8 (patch)
treea7f4c3b7a2b04cf77e199d7e505eb4b8fb807edc /sw
parent18a92a86906d3f68e7cdebb2c55122f735b4f10e (diff)
tdf#126114 - Form fields are displayed twice (double)
We need to make sure that IsFieldResultAsString() returns true for drop-down field, to ignore the placeholder string. Change-Id: I127800bdff78eb68e000fdbfe433bc88181ac2c3 Reviewed-on: https://gerrit.libreoffice.org/74752 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 8e5982d799e23bee86404f3ccb3aaed524ae9675) Reviewed-on: https://gerrit.libreoffice.org/74796
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf126114.docxbin0 -> 16877 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx7
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf126114.docx b/sw/qa/extras/ooxmlimport/data/tdf126114.docx
new file mode 100644
index 000000000000..33e0395689c6
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf126114.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 1c7282623b00..629c390de4ca 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -365,6 +365,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf124670, "tdf124670.docx")
paragraph->getString());
}
+DECLARE_OOXMLIMPORT_TEST(testTdf126114, "tdf126114.docx")
+{
+ // The problem was that after the drop-down form field, also the placeholder string
+ // was imported as text. Beside the duplication of the field, it also caused a crash.
+ CPPUNIT_ASSERT_EQUAL(7, getLength());
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();