diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index 04896a44e252..8145db1de0c1 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -421,8 +422,7 @@ void Desktop::SynchronizeExtensionRepositories() deployment::ExtensionManager::get(context)->reinstallDeployedExtensions( true, "user", Reference(), silent); #if !HAVE_FEATURE_MACOSX_SANDBOX - // getenv is a hack to detect if we're running in a LOK unit test - if (!getenv("LOK_TEST")) + if (!comphelper::LibreOfficeKit::isActive()) task::OfficeRestartManager::get(context)->requestRestart( silent->getInteractionHandler()); #endif diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 60a06582120f..c5b4eec6812c 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -558,8 +559,7 @@ void syncRepositories( } } #if !HAVE_FEATURE_MACOSX_SANDBOX - // getenv is a hack to detect if we're running in a LOK unit test - if (bModified && !getenv("LOK_TEST")) + if (bModified && !comphelper::LibreOfficeKit::isActive()) { Reference restarter(task::OfficeRestartManager::get(comphelper::getProcessComponentContext())); if (restarter.is()) diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx index 7c956e6d0ec4..0d330970b044 100644 --- a/libreofficekit/qa/unit/tiledrendering.cxx +++ b/libreofficekit/qa/unit/tiledrendering.cxx @@ -84,9 +84,6 @@ void TiledRenderingTest::runAllTests() OUString sUserInstallURL = aWorkdirRootURL + "/unittest"; rtl::Bootstrap::set(OUString("UserInstallation"), sUserInstallURL); - // No restart in desktop. - setenv("LOK_TEST", "1", true); - scoped_ptr< Office > pOffice( lok_cpp_init( m_sLOPath.c_str() ) ); CPPUNIT_ASSERT( pOffice.get() );