diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-10-19 14:14:02 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-10-19 15:19:02 +0200 |
commit | f3a82a8ba51195cf31b0f78164735acc7ebbcd2f (patch) | |
tree | da3d125b78a15f1f61fc8a6d304043f609f5afc5 /test | |
parent | fed64d0f8023b425b1151a1aada4632e6c5301d6 (diff) |
sc: factor out common code in tests
Change-Id: I58558dd87f235bf3699f3f65271522bb1e7a2ea0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141529
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/Library_subsequenttest.mk | 1 | ||||
-rw-r--r-- | test/source/calc_unoapi_test.cxx | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index 813b61ec538f..4e179080c70a 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -27,6 +27,7 @@ $(eval $(call gb_Library_use_libraries,subsequenttest,\ cppuhelper \ i18nlangtag \ sal \ + sfx \ test \ tl \ utl \ diff --git a/test/source/calc_unoapi_test.cxx b/test/source/calc_unoapi_test.cxx index 578ac9d97c2d..1aaed35f3fb5 100644 --- a/test/source/calc_unoapi_test.cxx +++ b/test/source/calc_unoapi_test.cxx @@ -8,6 +8,7 @@ */ #include <test/calc_unoapi_test.hxx> +#include <sfx2/objsh.hxx> using namespace css; using namespace css::uno; @@ -35,4 +36,17 @@ void CalcUnoApiTest::tearDown() UnoApiTest::tearDown(); } +uno::Any CalcUnoApiTest::executeMacro(const OUString& rScriptURL, const uno::Sequence<uno::Any>& rParams) +{ + uno::Any aRet; + uno::Sequence<sal_Int16> aOutParamIndex; + uno::Sequence<uno::Any> aOutParam; + + ErrCode result = SfxObjectShell::CallXScript( + mxComponent, rScriptURL, + rParams, aRet, aOutParamIndex, aOutParam); + CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, result); + + return aRet; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |