summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-03-05 11:23:38 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-03-07 15:37:22 +0100
commit4256c764aee0777770466115a97420d9b55c23ac (patch)
tree9452b0dc5c84355826d070ad3eccba498ef9c5e8 /desktop
parent58c6a36bfcc853ca9da81fbc2d071fa50585655b (diff)
do not pass XComponentContext to officecfg::...::get() calls
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 <l.lunak@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/inc/app.hxx3
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--desktop/source/app/appinit.cxx4
3 files changed, 4 insertions, 5 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index e2ecf5920aa0..3372e751dbf1 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -123,8 +123,7 @@ class Desktop final : public Application
// throws an exception upon failure
private:
- void RegisterServices(
- css::uno::Reference< css::uno::XComponentContext > const & context);
+ void RegisterServices();
static void DeregisterServices();
public:
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 9c272314dadf..caf9358683cf 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1305,7 +1305,7 @@ int Desktop::Main()
Reference< XDesktop2 > xDesktop;
- RegisterServices(xContext);
+ RegisterServices();
SetSplashScreenProgress(25);
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);
}