summaryrefslogtreecommitdiff
path: root/sd/source/ui
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 /sd/source/ui
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 'sd/source/ui')
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx3
-rw-r--r--sd/source/ui/view/drviews7.cxx7
2 files changed, 3 insertions, 7 deletions
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index d1942df124c8..ab583c471982 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -348,8 +348,7 @@ void SdDLL::RegisterRemotes()
if ( Application::IsHeadlessModeEnabled() )
return;
- uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
- if ( xContext.is() && !officecfg::Office::Impress::Misc::Start::EnableSdremote::get( xContext ) )
+ if ( !officecfg::Office::Impress::Misc::Start::EnableSdremote::get() )
return;
sd::RemoteServer::setup();
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index cf0eb92c3828..4f375dc6a05c 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1007,11 +1007,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
#ifndef ENABLE_SDREMOTE
bDisableSdremoteForGood = true;
#endif
- uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
- if ( xContext.is() )
- bDisableSdremoteForGood |= ! ( /*officecfg::Office::Common::Misc::ExperimentalMode::get( xContext ) &&*/
-
- officecfg::Office::Impress::Misc::Start::EnableSdremote::get( xContext ) );
+ bDisableSdremoteForGood |= ! ( /*officecfg::Office::Common::Misc::ExperimentalMode::get() &&*/
+ officecfg::Office::Impress::Misc::Start::EnableSdremote::get() );
// This dialog is only useful for TCP/IP remote control
// which is unusual, under-tested and a security issue.