From 63572992755a9e2f5ba3e73bbe10ab145f102896 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Sat, 3 Aug 2013 10:50:14 +0200 Subject: [PATCH] minor tweaks to existing unittests Change-Id: I64769fee917c5d8c6450a19ad53fdf795e280c98 --- dbaccess/qa/extras/macros-test.cxx | 1 + 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 #include -#include #include #include @@ -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(pFoundShell); + ScDocShell* xDocSh = dynamic_cast(pFoundShell); + CPPUNIT_ASSERT(xDocSh != NULL); pFoundShell->CallXScript(xComponent, sUrl, aParams, aRet, aOutParamIndex,aOutParam); OUString sResult;