From 4256c764aee0777770466115a97420d9b55c23ac Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Sat, 5 Mar 2022 11:23:38 +0100 Subject: do not pass XComponentContext to officecfg::...::get() calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's used only for the ConfigurationWrapper singleton, so it's used only the first time and then ignored. It also causes calls to comphelper::getProcessComponentContext() for every single invocation despite the value not being needed, and the calls may not be cheap (it's ~5% CPU during ODS save because relatively frequent calls to officecfg::Office::Common::Save::ODF::DefaultVersion::get()). Change-Id: I02c17a1a9cb498aeef220ddd5a0bde5523cb0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131056 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- desktop/source/app/appinit.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop/source/app/appinit.cxx') diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 98a1fa61ca2f..a70004e23b3f 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -84,7 +84,7 @@ void Desktop::InitApplicationServiceManager() comphelper::setProcessServiceFactory(sm); } -void Desktop::RegisterServices(Reference< XComponentContext > const & context) +void Desktop::RegisterServices() { if( m_bServicesRegistered ) return; @@ -100,7 +100,7 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context) // read accept string from configuration OUString conDcpCfg( - officecfg::Setup::Office::ooSetupConnectionURL::get(context)); + officecfg::Setup::Office::ooSetupConnectionURL::get()); if (!conDcpCfg.isEmpty()) { createAcceptor(conDcpCfg); } -- cgit