summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-11-09 05:54:59 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2013-11-09 06:36:45 +0100
commita071a29d4f7e8065a36a313027a007edac102e20 (patch)
tree3e6495d3988a3efa55f2034ffc194dcedd875d85 /test
parente937995ca3718042efabaf04a5161c0c76107b9c (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/source/unoapi_test.cxx8
1 files changed, 2 insertions, 6 deletions
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();
}