diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index b7ad99b0ad81..e9aefb82e9bf 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -83,6 +84,15 @@ void test_init_impl(bool bAssertOnDialog, bool bNeedUCB, } } +struct InitHook { + DECL_STATIC_LINK(InitHook, deinitHook, void*); +}; + +IMPL_STATIC_LINK_NOARG(InitHook, deinitHook) { + // nothing to do for now + return 0; +} + // this is called from pyuno SAL_DLLPUBLIC_EXPORT void test_init(lang::XMultiServiceFactory *pFactory) { @@ -105,6 +115,9 @@ SAL_DLLPUBLIC_EXPORT void test_init(lang::XMultiServiceFactory *pFactory) if (test::isHeadless()) Application::EnableHeadlessMode(true); + // avoid VCLXToolkit thinking that InitVCL hasn't been called + Application::setDeInitHook(LINK(nullptr, InitHook, deinitHook)); + test_init_impl(false, true, pFactory); } catch (...) { abort(); }