summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-03-06 16:34:44 +0000
committerNoel Power <noel.power@suse.com>2013-03-07 09:21:32 +0000
commit5eb1628b67c11d32158c2e4a63dc2f1614be4c7c (patch)
tree03b6c216f46c227e9495bd0477c062e65edaf7fa
parent895898596c72fd14db2abec3aeaab74d583769e5 (diff)
enable bag load of excel specific VBA api tests
Note: some of the test documents have some tests disabled in order to run without errors, these are identified by the following lines Rem [#FIXME disabled 3.6 ] in the macro source. note: some of these errors are expected and were always happening, some errors e.g. those pastespecial specific ones in qa/unit/data/xls/TestCalc_Rangetest2.xls seem to be to do with problems with the test harness. note: there are some others ( e.g. in Window.xls & windows2.xls ) that seem to be related to hard sizes and screen resolution ( these should be adjusted sensibly ) Change-Id: I07a43a2802d4e1794ac2f8c648f666b5bcd13a04
-rw-r--r--sc/CppunitTest_sc_macros_test.mk3
-rw-r--r--sc/qa/extras/macros-test.cxx74
-rw-r--r--sc/qa/extras/testdocuments/AutoFilter.xlsbin0 -> 39936 bytes
-rw-r--r--sc/qa/extras/testdocuments/CalcFont.xlsbin0 -> 55296 bytes
-rw-r--r--sc/qa/extras/testdocuments/MiscRangeTests.xlsbin0 -> 121344 bytes
-rw-r--r--sc/qa/extras/testdocuments/PageBreaks.xlsbin0 -> 49152 bytes
-rw-r--r--sc/qa/extras/testdocuments/Ranges-2.xlsbin0 -> 2190848 bytes
-rw-r--r--sc/qa/extras/testdocuments/Ranges-3.xlsbin0 -> 34304 bytes
-rw-r--r--sc/qa/extras/testdocuments/Ranges.xlsbin0 -> 2277376 bytes
-rw-r--r--sc/qa/extras/testdocuments/Shapes.xlsbin0 -> 55808 bytes
-rw-r--r--sc/qa/extras/testdocuments/TestCalc_Rangetest.xlsbin0 -> 74240 bytes
-rw-r--r--sc/qa/extras/testdocuments/TestCalc_Rangetest2.xlsbin0 -> 58368 bytes
-rw-r--r--sc/qa/extras/testdocuments/TestIntersection.xlsbin0 -> 35328 bytes
-rw-r--r--sc/qa/extras/testdocuments/TestUnion.xlsbin0 -> 31232 bytes
-rw-r--r--sc/qa/extras/testdocuments/Window.xlsbin0 -> 58880 bytes
-rw-r--r--sc/qa/extras/testdocuments/bytearraystring.xlsbin0 -> 45568 bytes
-rw-r--r--sc/qa/extras/testdocuments/pagesetup.xlsbin0 -> 58368 bytes
-rw-r--r--sc/qa/extras/testdocuments/range-4.xlsbin0 -> 2162176 bytes
-rw-r--r--sc/qa/extras/testdocuments/window2.xlsbin0 -> 60416 bytes
19 files changed, 76 insertions, 1 deletions
diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk
index f989dcf5f851..e5ca56cb61dc 100644
--- a/sc/CppunitTest_sc_macros_test.mk
+++ b/sc/CppunitTest_sc_macros_test.mk
@@ -112,6 +112,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_macros_test,\
sot/util/sot \
svl/source/fsstor/fsstorage \
svtools/util/svt \
+ svx/util/svx \
toolkit/util/tk \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
@@ -120,6 +121,8 @@ $(eval $(call gb_CppunitTest_use_components,sc_macros_test,\
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
xmloff/util/xo \
+ eventattacher/source/evtatt \
+ i18npool/source/search/i18nsearch \
))
$(eval $(call gb_CppunitTest_use_configuration,sc_macros_test))
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 244c61accb86..389ddc1cc346 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -115,7 +115,77 @@ void ScMacrosTest::testVba()
{
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vba.")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.Modul1.Modul1?language=Basic&location=document")),
- }
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MiscRangeTests.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bytearraystring.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacro.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoFilter.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CalcFont.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestIntersection.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestUnion.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("range-4.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ranges-3.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestCalc_Rangetest.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestCalc_Rangetest2.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ranges-2.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pagesetup.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Window.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("window2.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageBreaks.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Shapes.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+#if VBA_TEST_WORKING
+ {
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ranges.")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
+ },
+#endif
};
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( testInfo ); ++i )
@@ -135,6 +205,8 @@ void ScMacrosTest::testVba()
SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
+ std::cout << "about to invoke vba test in " << rtl::OUStringToOString( aFileName, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
+
pFoundShell->CallXScript(xComponent, sUrl, aParams, aRet, aOutParamIndex,aOutParam);
rtl::OUString aStringRes;
aRet >>= aStringRes;
diff --git a/sc/qa/extras/testdocuments/AutoFilter.xls b/sc/qa/extras/testdocuments/AutoFilter.xls
new file mode 100644
index 000000000000..75efd8ddc609
--- /dev/null
+++ b/sc/qa/extras/testdocuments/AutoFilter.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/CalcFont.xls b/sc/qa/extras/testdocuments/CalcFont.xls
new file mode 100644
index 000000000000..86304063c45a
--- /dev/null
+++ b/sc/qa/extras/testdocuments/CalcFont.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/MiscRangeTests.xls b/sc/qa/extras/testdocuments/MiscRangeTests.xls
new file mode 100644
index 000000000000..c6dffd475442
--- /dev/null
+++ b/sc/qa/extras/testdocuments/MiscRangeTests.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/PageBreaks.xls b/sc/qa/extras/testdocuments/PageBreaks.xls
new file mode 100644
index 000000000000..2affd99ffda1
--- /dev/null
+++ b/sc/qa/extras/testdocuments/PageBreaks.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/Ranges-2.xls b/sc/qa/extras/testdocuments/Ranges-2.xls
new file mode 100644
index 000000000000..84fdc45c0dfb
--- /dev/null
+++ b/sc/qa/extras/testdocuments/Ranges-2.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/Ranges-3.xls b/sc/qa/extras/testdocuments/Ranges-3.xls
new file mode 100644
index 000000000000..e68f6a84d6d9
--- /dev/null
+++ b/sc/qa/extras/testdocuments/Ranges-3.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/Ranges.xls b/sc/qa/extras/testdocuments/Ranges.xls
new file mode 100644
index 000000000000..cc12d3fa6787
--- /dev/null
+++ b/sc/qa/extras/testdocuments/Ranges.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/Shapes.xls b/sc/qa/extras/testdocuments/Shapes.xls
new file mode 100644
index 000000000000..ff15272f8f87
--- /dev/null
+++ b/sc/qa/extras/testdocuments/Shapes.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/TestCalc_Rangetest.xls b/sc/qa/extras/testdocuments/TestCalc_Rangetest.xls
new file mode 100644
index 000000000000..9c00f5522c80
--- /dev/null
+++ b/sc/qa/extras/testdocuments/TestCalc_Rangetest.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/TestCalc_Rangetest2.xls b/sc/qa/extras/testdocuments/TestCalc_Rangetest2.xls
new file mode 100644
index 000000000000..409459df646f
--- /dev/null
+++ b/sc/qa/extras/testdocuments/TestCalc_Rangetest2.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/TestIntersection.xls b/sc/qa/extras/testdocuments/TestIntersection.xls
new file mode 100644
index 000000000000..5872be7ca1ba
--- /dev/null
+++ b/sc/qa/extras/testdocuments/TestIntersection.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/TestUnion.xls b/sc/qa/extras/testdocuments/TestUnion.xls
new file mode 100644
index 000000000000..bde207e7462d
--- /dev/null
+++ b/sc/qa/extras/testdocuments/TestUnion.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/Window.xls b/sc/qa/extras/testdocuments/Window.xls
new file mode 100644
index 000000000000..3daebfb99b95
--- /dev/null
+++ b/sc/qa/extras/testdocuments/Window.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/bytearraystring.xls b/sc/qa/extras/testdocuments/bytearraystring.xls
new file mode 100644
index 000000000000..22da6de48408
--- /dev/null
+++ b/sc/qa/extras/testdocuments/bytearraystring.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/pagesetup.xls b/sc/qa/extras/testdocuments/pagesetup.xls
new file mode 100644
index 000000000000..b1f0b9cba008
--- /dev/null
+++ b/sc/qa/extras/testdocuments/pagesetup.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/range-4.xls b/sc/qa/extras/testdocuments/range-4.xls
new file mode 100644
index 000000000000..67d1ad7aa69a
--- /dev/null
+++ b/sc/qa/extras/testdocuments/range-4.xls
Binary files differ
diff --git a/sc/qa/extras/testdocuments/window2.xls b/sc/qa/extras/testdocuments/window2.xls
new file mode 100644
index 000000000000..1c84a13d6804
--- /dev/null
+++ b/sc/qa/extras/testdocuments/window2.xls
Binary files differ