From 8d7e8a0a3b9a4a4f7b805e91674b79a4cca7cf72 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 13 Apr 2012 11:13:19 +0100 Subject: setup/teardown default component context once before/after all tests avoids the problems of dangling uno singletons invalidated after the first dispose and the chain of other singletons that don't expect to need to re-initialize, etc. reenable editeng cppunit test inherit i18npool cppunit test from unotest base drop LibreOfficeProtector, do "throwable" work in setUp/tearDown not in ctors/dtors --- test/source/bootstrapfixture.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index 284dbf7f3210..edb7b63b30a0 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -62,6 +62,12 @@ test::BootstrapFixture::BootstrapFixture( bool bAssertOnDialog, bool bNeedUCB ) : m_bNeedUCB( bNeedUCB ) , m_bAssertOnDialog( bAssertOnDialog ) { +} + +void test::BootstrapFixture::setUp() +{ + test::BootstrapFixtureBase::setUp(); + // force locale (and resource files loaded) to en-US const LanguageType eLang=LANGUAGE_ENGLISH_US; @@ -69,11 +75,7 @@ test::BootstrapFixture::BootstrapFixture( bool bAssertOnDialog, bool bNeedUCB ) MsLangId::convertLanguageToIsoNames(eLang, aLang, aCountry); lang::Locale aLocale(aLang, aCountry, rtl::OUString()); ResMgr::SetDefaultLocale( aLocale ); -} -void test::BootstrapFixture::setUp() -{ - test::BootstrapFixtureBase::setUp(); if (m_bNeedUCB) { // initialise UCB-Broker @@ -96,9 +98,8 @@ void test::BootstrapFixture::setUp() aLocalOptions.SetUILocaleConfigString( aLangISO ); InitVCL(m_xSFactory); - if (Application::IsHeadlessModeRequested()) { + if (Application::IsHeadlessModeRequested()) Application::EnableHeadlessMode(true); - } if( m_bAssertOnDialog ) ErrorHandler::RegisterDisplay( aBasicErrorFunc ); -- cgit