diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-20 21:31:30 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-24 13:51:10 +0200 |
commit | b12954531953fb8ad585847fe42677d714991ef1 (patch) | |
tree | 27a93059da4a0e36fb19af6545f46d0fd083be60 /desktop | |
parent | 22d551b3f636c15468e9411b93872f7ab3aecdea (diff) |
tubes: init TeleManager in desktop
- register clients when we run --invisible
- create ScDocFuncSend only if we are going to use it
Change-Id: I7e33cd5a2e42e34a055146dc6c2bdac3657d6529
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/Library_sofficeapp.mk | 8 | ||||
-rw-r--r-- | desktop/inc/app.hxx | 6 | ||||
-rw-r--r-- | desktop/source/app/app.cxx | 13 |
3 files changed, 27 insertions, 0 deletions
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 94958838e9de..607d75130051 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -88,6 +88,14 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ desktop/source/migration/migration \ )) +ifeq ($(ENABLE_TELEPATHY),TRUE) +$(eval $(call gb_Library_use_libraries,sofficeapp,tubes)) + +$(eval $(call gb_Library_add_defs,sofficeapp,\ + -DENABLE_TELEPATHY \ +)) +endif + # # We need the lo_main symbol for our boostrap loader # diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index 06dc4c76d027..09f0a4d4e4f1 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -41,6 +41,9 @@ #include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/uno/Reference.h> #include <osl/mutex.hxx> +#ifdef ENABLE_TELEPATHY +#include <tubes/manager.hxx> +#endif using namespace com::sun::star::task; using namespace com::sun::star::uno; @@ -205,6 +208,9 @@ class Desktop : public Application sal_uInt16 m_nAppEvents; BootstrapError m_aBootstrapError; BootstrapStatus m_aBootstrapStatus; +#ifdef ENABLE_TELEPATHY + TeleManager* m_pTeleManager; +#endif std::auto_ptr< Lockfile > m_pLockfile; Timer m_firstRunTimer; diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 3ee805bb6a42..65dd453e11c6 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -614,12 +614,19 @@ throw() Desktop::Desktop() : m_bServicesRegistered( false ) , m_aBootstrapError( BE_OK ) +#ifdef ENABLE_TELEPATHY +, m_pTeleManager( NULL ) +#endif { RTL_LOGFILE_TRACE( "desktop (cd100003) ::Desktop::Desktop" ); } Desktop::~Desktop() { +#ifdef ENABLE_TELEPATHY + if (m_pTeleManager) + m_pTeleManager->unref(); +#endif } void Desktop::Init() @@ -1700,6 +1707,12 @@ int Desktop::Main() aOptions.SetVCLSettings(); SetSplashScreenProgress(60); +#ifdef ENABLE_TELEPATHY + m_pTeleManager = TeleManager::get(); + bool bListen = rCmdLineArgs.IsInvisible(); + m_pTeleManager->init( bListen ); +#endif + if ( !pExecGlobals->bRestartRequested ) { Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) ); |