From a071a29d4f7e8065a36a313027a007edac102e20 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Sat, 9 Nov 2013 05:54:59 +0100 Subject: UnoApiTest don't require Calc There is no reason for the generic UnoApiTest to require Calc specifically. Calc tests can/should instantiate a Calc instance. We can create a CalcUnoApiTest for that that inherits from UnoApiTest; however this does not seem necessary, "make sc.clean" succeeds. Anyway, the ScGlobals::ensure mentioned in the comment does not seem to exist. This allows us to eliminate some code duplication in tests that were reimplementing UnoApiTest minus the Calc instantiation. Change-Id: I37bea9df41e3960df0458fe689cf6c046a243617 --- test/source/unoapi_test.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx index 214ed174ec2e..256e1f377bdf 100644 --- a/test/source/unoapi_test.cxx +++ b/test/source/unoapi_test.cxx @@ -25,17 +25,13 @@ void UnoApiTest::setUp() { test::BootstrapFixture::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 - m_xCalcComponent = - getMultiServiceFactory()->createInstance("com.sun.star.comp.Calc.SpreadsheetDocument"); - CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is()); mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) ); + CPPUNIT_ASSERT_MESSAGE("no desktop!", mxDesktop.is()); } void UnoApiTest::tearDown() { - uno::Reference< lang::XComponent >( m_xCalcComponent, UNO_QUERY_THROW )->dispose(); + uno::Reference< lang::XComponent >( mxDesktop )->dispose(); test::BootstrapFixture::tearDown(); } -- cgit