diff options
author | Justin Luth <justin.luth@collabora.com> | 2023-01-14 10:52:20 -0500 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-01-15 04:15:14 +0000 |
commit | 5b92a7f211adb229a45c7dedf1ce63e15fcfe5d9 (patch) | |
tree | 6dae64902f7a9e92d3957cb7b90b63cae9398f0e /sc/qa/unit | |
parent | d50eca2a30bdabdc1735c590d6ec1913c6dd22fd (diff) |
tdf#117266 sc oox: macro button unit test
Change-Id: I50b8b5a2d29a5892490a7dbd4cc428786147d500
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145519
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/data/xlsm/tdf117266_macroButton.xlsm | bin | 0 -> 8664 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_export_test2.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xlsm/tdf117266_macroButton.xlsm b/sc/qa/unit/data/xlsm/tdf117266_macroButton.xlsm Binary files differnew file mode 100644 index 000000000000..f587ba639c7e --- /dev/null +++ b/sc/qa/unit/data/xlsm/tdf117266_macroButton.xlsm diff --git a/sc/qa/unit/subsequent_export_test2.cxx b/sc/qa/unit/subsequent_export_test2.cxx index 5a1ebc5c2d3c..9ac4aa7704b8 100644 --- a/sc/qa/unit/subsequent_export_test2.cxx +++ b/sc/qa/unit/subsequent_export_test2.cxx @@ -64,6 +64,7 @@ public: void testTdf121260(); void testTextDirectionXLSX(); void testTdf120168(); + void testTdf117266(); void testTdf66668(); void testTdf130108(); void testTdf76949(); @@ -195,6 +196,7 @@ public: CPPUNIT_TEST(testTdf121260); CPPUNIT_TEST(testTextDirectionXLSX); CPPUNIT_TEST(testTdf120168); + CPPUNIT_TEST(testTdf117266); CPPUNIT_TEST(testTdf66668); CPPUNIT_TEST(testTdf130108); CPPUNIT_TEST(testTdf76949); @@ -532,6 +534,21 @@ void ScExportTest2::testTdf120168() assertXPath(pDoc, "/x:styleSheet/x:cellXfs/x:xf[3]/x:alignment", "horizontal", "right"); } +void ScExportTest2::testTdf117266() +{ + createScDoc("xlsm/tdf117266_macroButton.xlsm"); + + save("Calc MS Excel 2007 VBA XML"); + xmlDocUniquePtr pVmlDrawing = parseExport("xl/drawings/vmlDrawing1.vml"); + + OUString sName = getXPath(pVmlDrawing, "/xml/v:shape", "id"); + CPPUNIT_ASSERT(sName.startsWith("_x0000_s")); + + assertXPathContent(pVmlDrawing, "/xml/v:shape/v:textbox/div/font", "Button 1 \"y\" z"); + // Why the xx:, I have no idea..., but it certainly doesn't work with just x:. + assertXPathContent(pVmlDrawing, "/xml/v:shape//xx:FmlaMacro", "Module1.Button1_Click"); +} + void ScExportTest2::testTdf66668() { // Would hang on exporting without the fix in place |