diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-04-09 20:28:18 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-04-09 23:27:45 +0300 |
commit | 72e7bf859df4941e7c86b57d12a4a2254b202ac1 (patch) | |
tree | a583187d3fe6979a0aaa2ff83fd564bbb76598f2 | |
parent | 2dede8bfbab5d353f91acc5f5fa7c21b1b1a4fea (diff) |
Use comphelper::LibreOfficeKit::isActive() instead of LOK_TEST env var
Change-Id: Iaa0c751f101df6db25e9fca9123b81ac63033159
-rw-r--r-- | desktop/source/app/check_ext_deps.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_misc.cxx | 4 | ||||
-rw-r--r-- | libreofficekit/qa/unit/tiledrendering.cxx | 3 |
3 files changed, 4 insertions, 7 deletions
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 <unotools/configmgr.hxx> #include <toolkit/helper/vclunohelper.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> #include <cppuhelper/bootstrap.hxx> @@ -421,8 +422,7 @@ void Desktop::SynchronizeExtensionRepositories() deployment::ExtensionManager::get(context)->reinstallDeployedExtensions( true, "user", Reference<task::XAbortChannel>(), 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 <com/sun/star/task/OfficeRestartManager.hpp> #include <boost/scoped_array.hpp> #include <boost/shared_ptr.hpp> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <salhelper/linkhelper.hxx> @@ -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<task::XRestartManager> 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() ); |