diff options
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/app/app.cxx | 28 | ||||
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 20 | ||||
-rw-r--r-- | desktop/source/deployment/deployment.component | 8 | ||||
-rw-r--r-- | desktop/source/deployment/deployment.extended.component | 30 |
4 files changed, 76 insertions, 10 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index b0c4fac53e10..98e64ec9df2c 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -24,6 +24,7 @@ #include <config_java.h> #include <config_folders.h> #include <config_extensions.h> +#include <config_wasm_strip.h> #include <sal/config.h> @@ -957,6 +958,7 @@ struct RefClearGuard @param bEmergencySave differs between EMERGENCY_SAVE and RECOVERY */ +#ifndef ENABLE_WASM_STRIP_RECOVERYUI bool impl_callRecoveryUI(bool bEmergencySave , bool bExistsRecoveryData) { @@ -988,6 +990,7 @@ bool impl_callRecoveryUI(bool bEmergencySave , aRet >>= bRet; return bRet; } +#endif bool impl_bringToFrontRecoveryUI() { @@ -1137,9 +1140,11 @@ void Desktop::Exception(ExceptionCategory nCategory) // Save all open documents so they will be reopened // the next time the application is started // returns true if at least one document could be saved... +#ifndef ENABLE_WASM_STRIP_RECOVERYUI bRestart = impl_callRecoveryUI( true , // force emergency save false); +#endif } FlushConfiguration(); @@ -1153,8 +1158,10 @@ void Desktop::Exception(ExceptionCategory nCategory) osl_removeSignalHandler( pSignalHandler ); restartOnMac(false); +#ifndef ENABLE_WASM_STRIP_SPLASH if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif _exit( EXITHELPER_CRASH_WITH_RESTART ); } @@ -1257,7 +1264,9 @@ int Desktop::Main() Translate::SetReadStringHook(ReplaceStringHookProc); // Startup screen +#ifndef ENABLE_WASM_STRIP_SPLASH OpenSplashScreen(); +#endif SetSplashScreenProgress(10); @@ -1697,8 +1706,10 @@ int Desktop::doShutdown() if ( bRR ) { restartOnMac(true); +#ifndef ENABLE_WASM_STRIP_SPLASH if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif return EXITHELPER_NORMAL_RESTART; } @@ -1992,8 +2003,9 @@ void Desktop::OpenClients() } else { - bool bCrashed = false; bool bExistsRecoveryData = false; +#ifndef ENABLE_WASM_STRIP_RECOVERYUI + bool bCrashed = false; bool bExistsSessionData = false; bool const bDisableRecovery = getenv("OOO_DISABLE_RECOVERY") != nullptr @@ -2019,6 +2031,7 @@ void Desktop::OpenClients() TOOLS_WARN_EXCEPTION( "desktop.app", "Error during recovery"); } } +#endif Reference< XSessionManagerListener2 > xSessionListener; try @@ -2377,6 +2390,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) } } +#ifndef ENABLE_WASM_STRIP_SPLASH void Desktop::OpenSplashScreen() { const CommandLineArgs &rCmdLine = GetCommandLineArgs(); @@ -2426,33 +2440,43 @@ void Desktop::OpenSplashScreen() if(m_rSplashScreen.is()) m_rSplashScreen->start("SplashScreen", 100); - } +#endif void Desktop::SetSplashScreenProgress(sal_Int32 iProgress) { +#ifdef ENABLE_WASM_STRIP_SPLASH + (void) iProgress; +#else if(m_rSplashScreen.is()) { m_rSplashScreen->setValue(iProgress); } +#endif } void Desktop::SetSplashScreenText( const OUString& rText ) { +#ifdef ENABLE_WASM_STRIP_SPLASH + (void) rText; +#else if( m_rSplashScreen.is() ) { m_rSplashScreen->setText( rText ); } +#endif } void Desktop::CloseSplashScreen() { +#ifndef ENABLE_WASM_STRIP_SPLASH 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/desktop/source/deployment/deployment.component b/desktop/source/deployment/deployment.component index f7a481bf43c9..79c966deadc0 100644 --- a/desktop/source/deployment/deployment.component +++ b/desktop/source/deployment/deployment.component @@ -38,10 +38,6 @@ constructor="com_sun_star_comp_deployment_ProgressLog_get_implementation"> <service name="com.sun.star.comp.deployment.ProgressLog"/> </implementation> - <implementation name="com.sun.star.comp.deployment.component.PackageRegistryBackend" - constructor="com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation"> - <service name="com.sun.star.deployment.PackageRegistryBackend"/> - </implementation> <implementation name="com.sun.star.comp.deployment.configuration.PackageRegistryBackend" constructor="com_sun_star_comp_deployment_configuration_PackageRegistryBackend_get_implementation"> <service name="com.sun.star.deployment.PackageRegistryBackend"/> @@ -50,10 +46,6 @@ constructor="com_sun_star_comp_deployment_executable_PackageRegistryBackend_get_implementation"> <service name="com.sun.star.deployment.PackageRegistryBackend"/> </implementation> - <implementation name="com.sun.star.comp.deployment.help.PackageRegistryBackend" - constructor="com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation"> - <service name="com.sun.star.deployment.PackageRegistryBackend"/> - </implementation> <implementation name="com.sun.star.comp.deployment.script.PackageRegistryBackend" constructor="com_sun_star_comp_deployment_script_PackageRegistryBackend_get_implementation"> <service name="com.sun.star.deployment.PackageRegistryBackend"/> diff --git a/desktop/source/deployment/deployment.extended.component b/desktop/source/deployment/deployment.extended.component new file mode 100644 index 000000000000..8d0b70a9c028 --- /dev/null +++ b/desktop/source/deployment/deployment.extended.component @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + --> + +<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.deployment.component.PackageRegistryBackend" + constructor="com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation"> + <service name="com.sun.star.deployment.PackageRegistryBackend"/> + </implementation> + <implementation name="com.sun.star.comp.deployment.help.PackageRegistryBackend" + constructor="com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation"> + <service name="com.sun.star.deployment.PackageRegistryBackend"/> + </implementation> +</component> |