summaryrefslogtreecommitdiff
path: root/svtools
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 /svtools
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 'svtools')
-rw-r--r--svtools/source/dialogs/PlaceEditDialog.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index d0c8b67d5de7..b61abd58e9ad 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -177,8 +177,6 @@ void PlaceEditDialog::InitDetails( )
{
// Create CMIS controls for each server type
- Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
-
// Load the ServerType entries
bool bSkipGDrive = OUString( GDRIVE_CLIENT_ID ).isEmpty() ||
OUString( GDRIVE_CLIENT_SECRET ).isEmpty();
@@ -187,8 +185,8 @@ void PlaceEditDialog::InitDetails( )
bool bSkipOneDrive= OUString( ONEDRIVE_CLIENT_ID ).isEmpty() ||
OUString( ONEDRIVE_CLIENT_SECRET ).isEmpty();
- Sequence< OUString > aTypesUrlsList( officecfg::Office::Common::Misc::CmisServersUrls::get( xContext ) );
- Sequence< OUString > aTypesNamesList( officecfg::Office::Common::Misc::CmisServersNames::get( xContext ) );
+ Sequence< OUString > aTypesUrlsList( officecfg::Office::Common::Misc::CmisServersUrls::get() );
+ Sequence< OUString > aTypesNamesList( officecfg::Office::Common::Misc::CmisServersNames::get() );
int nPos = 0;
auto nSize = std::min(aTypesUrlsList.getLength(), aTypesNamesList.getLength());