Use comphelper::LibreOfficeKit::isActive() instead of LOK_TEST env var
Change-Id: Iaa0c751f101df6db25e9fca9123b81ac63033159
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
#include <unotools/configmgr.hxx>
|
#include <unotools/configmgr.hxx>
|
||||||
#include <toolkit/helper/vclunohelper.hxx>
|
#include <toolkit/helper/vclunohelper.hxx>
|
||||||
|
|
||||||
|
#include <comphelper/lok.hxx>
|
||||||
#include <comphelper/processfactory.hxx>
|
#include <comphelper/processfactory.hxx>
|
||||||
#include <comphelper/sequence.hxx>
|
#include <comphelper/sequence.hxx>
|
||||||
#include <cppuhelper/bootstrap.hxx>
|
#include <cppuhelper/bootstrap.hxx>
|
||||||
@@ -421,8 +422,7 @@ void Desktop::SynchronizeExtensionRepositories()
|
|||||||
deployment::ExtensionManager::get(context)->reinstallDeployedExtensions(
|
deployment::ExtensionManager::get(context)->reinstallDeployedExtensions(
|
||||||
true, "user", Reference<task::XAbortChannel>(), silent);
|
true, "user", Reference<task::XAbortChannel>(), silent);
|
||||||
#if !HAVE_FEATURE_MACOSX_SANDBOX
|
#if !HAVE_FEATURE_MACOSX_SANDBOX
|
||||||
// getenv is a hack to detect if we're running in a LOK unit test
|
if (!comphelper::LibreOfficeKit::isActive())
|
||||||
if (!getenv("LOK_TEST"))
|
|
||||||
task::OfficeRestartManager::get(context)->requestRestart(
|
task::OfficeRestartManager::get(context)->requestRestart(
|
||||||
silent->getInteractionHandler());
|
silent->getInteractionHandler());
|
||||||
#endif
|
#endif
|
||||||
|
@@ -42,6 +42,7 @@
|
|||||||
#include <com/sun/star/task/OfficeRestartManager.hpp>
|
#include <com/sun/star/task/OfficeRestartManager.hpp>
|
||||||
#include <boost/scoped_array.hpp>
|
#include <boost/scoped_array.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <comphelper/lok.hxx>
|
||||||
#include <comphelper/processfactory.hxx>
|
#include <comphelper/processfactory.hxx>
|
||||||
#include <salhelper/linkhelper.hxx>
|
#include <salhelper/linkhelper.hxx>
|
||||||
|
|
||||||
@@ -558,8 +559,7 @@ void syncRepositories(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if !HAVE_FEATURE_MACOSX_SANDBOX
|
#if !HAVE_FEATURE_MACOSX_SANDBOX
|
||||||
// getenv is a hack to detect if we're running in a LOK unit test
|
if (bModified && !comphelper::LibreOfficeKit::isActive())
|
||||||
if (bModified && !getenv("LOK_TEST"))
|
|
||||||
{
|
{
|
||||||
Reference<task::XRestartManager> restarter(task::OfficeRestartManager::get(comphelper::getProcessComponentContext()));
|
Reference<task::XRestartManager> restarter(task::OfficeRestartManager::get(comphelper::getProcessComponentContext()));
|
||||||
if (restarter.is())
|
if (restarter.is())
|
||||||
|
@@ -84,9 +84,6 @@ void TiledRenderingTest::runAllTests()
|
|||||||
OUString sUserInstallURL = aWorkdirRootURL + "/unittest";
|
OUString sUserInstallURL = aWorkdirRootURL + "/unittest";
|
||||||
rtl::Bootstrap::set(OUString("UserInstallation"), sUserInstallURL);
|
rtl::Bootstrap::set(OUString("UserInstallation"), sUserInstallURL);
|
||||||
|
|
||||||
// No restart in desktop.
|
|
||||||
setenv("LOK_TEST", "1", true);
|
|
||||||
|
|
||||||
scoped_ptr< Office > pOffice( lok_cpp_init(
|
scoped_ptr< Office > pOffice( lok_cpp_init(
|
||||||
m_sLOPath.c_str() ) );
|
m_sLOPath.c_str() ) );
|
||||||
CPPUNIT_ASSERT( pOffice.get() );
|
CPPUNIT_ASSERT( pOffice.get() );
|
||||||
|
Reference in New Issue
Block a user