From 24600dcf3118cb01d57c31518d36be870f73e79c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 22 May 2015 09:59:11 +0200 Subject: loplugin:constantfunction Change-Id: I7cb5b0c2cf9ade557173ca596ea5d42d853ff448 --- desktop/inc/app.hxx | 1 - desktop/source/app/app.cxx | 18 ++++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) (limited to 'desktop') diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index 5c6b708270df..ccab1f996963 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -152,7 +152,6 @@ class Desktop : public Application void OpenSplashScreen(); void CloseSplashScreen(); - static void EnableOleAutomation(); DECL_STATIC_LINK( Desktop, ImplInitFilterHdl, ConvertData* ); DECL_STATIC_LINK_TYPED( Desktop, AsyncInitFirstRun, Timer*, void ); /** checks if the office is run the first time diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 504275222dd4..5c775ca873c7 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1894,8 +1894,12 @@ IMPL_LINK_NOARG(Desktop, OpenClients_Impl) CloseSplashScreen(); CheckFirstRun( ); - EnableOleAutomation(); - +#ifdef WNT + // Registers a COM class factory of the service manager with the windows operating system. + Reference< XMultiServiceFactory > xSMgr= comphelper::getProcessServiceFactory(); + xSMgr->createInstance("com.sun.star.bridge.OleApplicationRegistration"); + xSMgr->createInstance("com.sun.star.comp.ole.EmbedServer"); +#endif const char *pExitPostStartup = getenv ("OOO_EXIT_POST_STARTUP"); if (pExitPostStartup && *pExitPostStartup) new ExitTimer(); @@ -1914,16 +1918,6 @@ IMPL_STATIC_LINK_NOARG(Desktop, EnableAcceptors_Impl) } -// Registers a COM class factory of the service manager with the windows operating system. -void Desktop::EnableOleAutomation() -{ -#ifdef WNT - Reference< XMultiServiceFactory > xSMgr= comphelper::getProcessServiceFactory(); - xSMgr->createInstance("com.sun.star.bridge.OleApplicationRegistration"); - xSMgr->createInstance("com.sun.star.comp.ole.EmbedServer"); -#endif -} - void Desktop::PreloadModuleData( const CommandLineArgs& rArgs ) { Sequence < com::sun::star::beans::PropertyValue > args(1); -- cgit