diff options
author | Serge Krot <Serge.Krot@cib.de> | 2020-07-20 15:15:47 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-08-05 23:21:15 +0200 |
commit | 89b6b2dbb728abea2186ff1ae158c0adb67d05be (patch) | |
tree | bae4ad54ee8c9d1757863cce8054b1f54252ca53 /sw | |
parent | 43ee0fc3ab9c049fd7ce95ee05b1348484343974 (diff) |
tdf#134572 DOCX: Incorrect default value in dropdown text fields
Change-Id: I3169e817c2f033d1525adc3b02ac3680ad220d70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99074
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 5 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index b0cce67a1b9c..ac2ca0c7d1f3 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -1058,7 +1058,7 @@ DECLARE_OOXMLEXPORT_TEST(tdf119809, "tdf119809.docx") CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown")); uno::Sequence<OUString> aItems = getProperty< uno::Sequence<OUString> >(aField, "Items"); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aItems.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aItems.getLength()); } } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 953a2434ba3f..80c9821cf0f6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -744,9 +744,10 @@ void Test::verifyComboBoxExport(bool aComboBoxAsDropDown) CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown")); uno::Sequence<OUString> aItems = getProperty< uno::Sequence<OUString> >(aField, "Items"); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aItems.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aItems.getLength()); CPPUNIT_ASSERT_EQUAL(OUString("manolo"), aItems[0]); CPPUNIT_ASSERT_EQUAL(OUString("pepito"), aItems[1]); + CPPUNIT_ASSERT_EQUAL(OUString("Manolo"), aItems[2]); } else { @@ -770,7 +771,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testComboBoxControl, "combobox-control.docx" xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[1]", "value", "manolo"); assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dropDownList/w:listItem[2]", "value", "pepito"); - assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", "manolo"); + assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t", "Manolo"); // check imported control verifyComboBoxExport(getShapes() == 0); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index c592eb7dec07..a5e11ec83484 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -958,9 +958,10 @@ DECLARE_OOXMLEXPORT_TEST(testN779630, "n779630.docx") CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.textfield.DropDown")); uno::Sequence<OUString> aItems = getProperty< uno::Sequence<OUString> >(aField, "Items"); - CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aItems.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aItems.getLength()); CPPUNIT_ASSERT_EQUAL(OUString("Yes"), aItems[0]); CPPUNIT_ASSERT_EQUAL(OUString("No"), aItems[1]); + CPPUNIT_ASSERT_EQUAL(OUString("dropdown default text"), aItems[2]); } } |