From e463c96092e108a8fad3b9a91b693457f3c26545 Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Sat, 26 Aug 2017 16:10:51 +0200 Subject: tdf#111980: DOCX: Handle ActiveX radio button group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3372b3b69623bda5c6e8587215e8fb7056fdf0a7 Reviewed-on: https://gerrit.libreoffice.org/41586 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- .../ooxmlexport/data/activex_option_button_group.docx | Bin 0 -> 15877 bytes sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 sw/qa/extras/ooxmlexport/data/activex_option_button_group.docx (limited to 'sw/qa/extras') diff --git a/sw/qa/extras/ooxmlexport/data/activex_option_button_group.docx b/sw/qa/extras/ooxmlexport/data/activex_option_button_group.docx new file mode 100755 index 000000000000..9da266a9278d Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/activex_option_button_group.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 515f40e4803b..f381de9c9032 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -1007,6 +1007,23 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkLayer, "watermark-layer.docx") CPPUNIT_ASSERT_EQUAL(static_cast(1), pObject->GetLayer().get()); } +DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_group.docx") +{ + // Optionbutton groups were not handled + // The two optionbutton should have the same group name + const OUString sGroupName = "GroupX"; + + uno::Reference xControlShape(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xControlShape.is()); + uno::Reference xPropertySet(xControlShape->getControl(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sGroupName, getProperty(xPropertySet, "GroupName")); + + xControlShape.set(getShape(2), uno::UNO_QUERY); + CPPUNIT_ASSERT(xControlShape.is()); + xPropertySet.set(xControlShape->getControl(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sGroupName, getProperty(xPropertySet, "GroupName")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit