diff options
-rw-r--r-- | dbaccess/qa/extras/macros-test.cxx | 1 | ||||
-rw-r--r-- | sc/qa/extras/macros-test.cxx | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx index 24f78e5d5797..cc0a437af2da 100644 --- a/dbaccess/qa/extras/macros-test.cxx +++ b/dbaccess/qa/extras/macros-test.cxx @@ -80,6 +80,7 @@ void DBAccessTest::setUp() // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure, // which is a private symbol to us, gets called mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) ); + CPPUNIT_ASSERT(mxDesktop.is()); } void DBAccessTest::tearDown() diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx index 023f627f2328..074edb54a5d6 100644 --- a/sc/qa/extras/macros-test.cxx +++ b/sc/qa/extras/macros-test.cxx @@ -9,7 +9,6 @@ #include <sal/config.h> #include <test/unoapi_test.hxx> -#include <unotest/macros_test.hxx> #include <rtl/strbuf.hxx> #include <osl/file.hxx> @@ -81,7 +80,8 @@ void ScMacrosTest::testMSP() SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent); CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell); - ScDocShell* xDocSh = static_cast<ScDocShell*>(pFoundShell); + ScDocShell* xDocSh = dynamic_cast<ScDocShell*>(pFoundShell); + CPPUNIT_ASSERT(xDocSh != NULL); pFoundShell->CallXScript(xComponent, sUrl, aParams, aRet, aOutParamIndex,aOutParam); OUString sResult; |