diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-07-26 23:57:28 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-07-27 09:18:30 +0200 |
commit | b45926a3a1dd89ffec3ed766ab5647604c23eec0 (patch) | |
tree | 372061672b7744472d4c3dfc39aee8e5eef91c83 /sc | |
parent | f26ca9283beaa03c7155d567622281b952337488 (diff) |
add test for tdf#109132
Change-Id: I115590658708bafc7c7778612251ad7eb716b30b
Reviewed-on: https://gerrit.libreoffice.org/58150
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/CppunitTest_sc_subsequent_filters_test.mk | 2 | ||||
-rw-r--r-- | sc/qa/unit/data/ods/vba_macro_functions.ods | bin | 0 -> 13283 bytes | |||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 15 |
3 files changed, 17 insertions, 0 deletions
diff --git a/sc/CppunitTest_sc_subsequent_filters_test.mk b/sc/CppunitTest_sc_subsequent_filters_test.mk index 2127e1e81f42..7be332992978 100644 --- a/sc/CppunitTest_sc_subsequent_filters_test.mk +++ b/sc/CppunitTest_sc_subsequent_filters_test.mk @@ -73,6 +73,7 @@ $(eval $(call gb_CppunitTest_use_vcl,sc_subsequent_filters_test)) $(eval $(call gb_CppunitTest_use_components,sc_subsequent_filters_test,\ basic/util/sb \ + basctl/util/basctl \ chart2/source/chartcore \ chart2/source/controller/chartcontroller \ comphelper/util/comphelp \ @@ -95,6 +96,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_subsequent_filters_test,\ scaddins/source/datefunc/date \ sc/util/sc \ sc/util/scfilt \ + sc/util/vbaobj \ sfx2/util/sfx \ sot/util/sot \ svl/util/svl \ diff --git a/sc/qa/unit/data/ods/vba_macro_functions.ods b/sc/qa/unit/data/ods/vba_macro_functions.ods Binary files differnew file mode 100644 index 000000000000..62bbe339a393 --- /dev/null +++ b/sc/qa/unit/data/ods/vba_macro_functions.ods diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index f9a35f334156..882750621586 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -247,6 +247,7 @@ public: void testHiddenRowsColumnsXLSXML(); void testColumnWidthRowHeightXLSXML(); void testTdf62268(); + void testVBAMacroFunctionODS(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBooleanFormatXLSX); @@ -380,6 +381,7 @@ public: CPPUNIT_TEST(testColumnWidthRowHeightXLSXML); CPPUNIT_TEST(testCondFormatFormulaListenerXLSX); CPPUNIT_TEST(testTdf62268); + CPPUNIT_TEST(testVBAMacroFunctionODS); CPPUNIT_TEST_SUITE_END(); @@ -4113,6 +4115,19 @@ void ScFiltersTest::testTdf62268() xDocSh->DoClose(); } +void ScFiltersTest::testVBAMacroFunctionODS() +{ + ScDocShellRef xDocSh = loadDoc("vba_macro_functions.", FORMAT_ODS); + ScDocument& rDoc = xDocSh->GetDocument(); + + OUString aFunction; + rDoc.GetFormula(2, 0, 0, aFunction); + std::cout << aFunction << std::endl; + CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, rDoc.GetValue(2, 0, 0), 1e-6); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "sc/qa/unit/data" ) { |