summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/activex_option_button_group.docxbin0 -> 15877 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx17
2 files changed, 17 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/activex_option_button_group.docx
Binary files 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<sal_uInt8>(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<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xControlShape.is());
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sGroupName, getProperty<OUString>(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<OUString>(xPropertySet, "GroupName"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */