Repository.mk | 2 +- desktop/inc/app.hxx | 2 ++ desktop/source/app/app.cxx | 15 ++++++++++++++- desktop/source/app/cmdlineargs.cxx | 20 ++++++++++++++++++++ postprocess/Rdb_services.mk | 2 +- 5 files changed, 38 insertions(+), 3 deletions(-)
New commits: commit f38dca150d583b51019b9b7219fc3f7251968b28 Author: Armin Le Grand (Allotropia) <armin.le.gr...@me.com> AuthorDate: Fri Apr 30 17:26:41 2021 +0200 Commit: Armin Le Grand (Allotropia) <armin.le.gr...@me.com> CommitDate: Fri Apr 30 17:26:41 2021 +0200 SplashScreen and Startup SplashScreens spl.lib removed, services no longer register to UNO services (services.rdb) Startup uses hard-coded flags "-nolockcheck -norestore -nologo -writer" Change-Id: I276f8775176e750e56f76b66aece2169bada3652 diff --git a/Repository.mk b/Repository.mk index 3c9a242c663b..3541cf2854f0 100644 --- a/Repository.mk +++ b/Repository.mk @@ -417,7 +417,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ slideshow \ sot \ spell \ - $(if $(DISABLE_GUI),,spl) \ + $(if $(DISABLE_GUI) || $(ENABLE_WASM_STRIP),,spl) \ storagefd \ $(call gb_Helper_optional,SCRIPTING,stringresource) \ svgio \ diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index e2ecf5920aa0..ba9d6eafaa63 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -142,8 +142,10 @@ class Desktop final : public Application static OUString CreateErrorMsgString( utl::Bootstrap::FailureCode nFailureCode, const OUString& aFileURL ); +#ifndef ENABLE_WASM_STRIP css::uno::Reference<css::task::XStatusIndicator> m_rSplashScreen; void OpenSplashScreen(); +#endif void CloseSplashScreen(); DECL_STATIC_LINK( Desktop, ImplInitFilterHdl, ::ConvertData&, bool ); diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index b0c4fac53e10..a76e6f80cb1b 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1153,8 +1153,10 @@ void Desktop::Exception(ExceptionCategory nCategory) osl_removeSignalHandler( pSignalHandler ); restartOnMac(false); +#ifndef ENABLE_WASM_STRIP if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif _exit( EXITHELPER_CRASH_WITH_RESTART ); } @@ -1257,7 +1259,9 @@ int Desktop::Main() Translate::SetReadStringHook(ReplaceStringHookProc); // Startup screen +#ifndef ENABLE_WASM_STRIP OpenSplashScreen(); +#endif SetSplashScreenProgress(10); @@ -1697,8 +1701,10 @@ int Desktop::doShutdown() if ( bRR ) { restartOnMac(true); +#ifndef ENABLE_WASM_STRIP if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif return EXITHELPER_NORMAL_RESTART; } @@ -2377,6 +2383,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) } } +#ifndef ENABLE_WASM_STRIP void Desktop::OpenSplashScreen() { const CommandLineArgs &rCmdLine = GetCommandLineArgs(); @@ -2426,33 +2433,39 @@ void Desktop::OpenSplashScreen() if(m_rSplashScreen.is()) m_rSplashScreen->start("SplashScreen", 100); - } +#endif void Desktop::SetSplashScreenProgress(sal_Int32 iProgress) { +#ifndef ENABLE_WASM_STRIP if(m_rSplashScreen.is()) { m_rSplashScreen->setValue(iProgress); } +#endif } void Desktop::SetSplashScreenText( const OUString& rText ) { +#ifndef ENABLE_WASM_STRIP if( m_rSplashScreen.is() ) { m_rSplashScreen->setText( rText ); } +#endif } void Desktop::CloseSplashScreen() { +#ifndef ENABLE_WASM_STRIP if(m_rSplashScreen.is()) { SolarMutexGuard ensureSolarMutex; m_rSplashScreen->end(); m_rSplashScreen = nullptr; } +#endif } diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 4d5a3bb78396..6c64502e9d38 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -275,6 +275,26 @@ CommandLineArgs::CommandLineArgs( Supplier& supplier ) void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) { +#ifdef ENABLE_WASM_STRIP + // use hard-coded init-params for wasm '-nolockcheck -norestore -nologo -writer' + // no restore tries + m_norestore = true; + // no logo needed + m_nologo = true; +#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT + // no lock-checks needed + m_nolockcheck = true; +#endif + // start with writer only + m_writer = true; + m_bDocumentArgs = true; + + m_bEmpty = false; + + // return to avoid #elif + return; +#endif + m_cwdUrl = supplier.getCwdUrl(); CommandLineEvent eCurrentEvent = CommandLineEvent::Open; diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk index 447cd97941b8..c083034daf29 100644 --- a/postprocess/Rdb_services.mk +++ b/postprocess/Rdb_services.mk @@ -268,7 +268,7 @@ $(eval $(call gb_Rdb_add_components,services,\ desktop/source/migration/services/migrationoo2 \ desktop/source/migration/services/migrationoo3 \ desktop/source/offacc/offacc \ - $(if $(DISABLE_GUI),,desktop/source/splash/spl) \ + $(if $(DISABLE_GUI) || $(ENABLE_WASM_STRIP),,desktop/source/splash/spl) \ $(if $(ENABLE_LDAP),extensions/source/config/ldap/ldapbe2) \ $(if $(filter WNT,$(OS)),\ extensions/source/config/WinUserInfo/WinUserInfoBe \ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits