diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-03-05 11:23:38 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-03-07 15:37:22 +0100 |
commit | 4256c764aee0777770466115a97420d9b55c23ac (patch) | |
tree | 9452b0dc5c84355826d070ad3eccba498ef9c5e8 /xmlhelp | |
parent | 58c6a36bfcc853ca9da81fbc2d071fa50585655b (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 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/provider.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx index ff31b25ee9aa..c98d3704ceb1 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.cxx +++ b/xmlhelp/source/cxxhelp/provider/provider.cxx @@ -198,7 +198,7 @@ void ContentProvider::init() isInitialized = true; OUString instPath( - officecfg::Office::Common::Path::Current::Help::get(m_xContext)); + officecfg::Office::Common::Path::Current::Help::get()); if( instPath.isEmpty() ) // try to determine path from default instPath = "$(instpath)/" LIBO_SHARE_HELP_FOLDER; @@ -206,22 +206,21 @@ void ContentProvider::init() subst( instPath ); OUString stylesheet( - officecfg::Office::Common::Help::HelpStyleSheet::get(m_xContext)); + officecfg::Office::Common::Help::HelpStyleSheet::get()); // now adding as configuration change listener for the stylesheet m_xContainer.set( - officecfg::Office::Common::Help::get(m_xContext), + officecfg::Office::Common::Help::get(), css::uno::UNO_QUERY_THROW); m_xContainer->addContainerListener( this ); OUString setupversion( - officecfg::Setup::Product::ooSetupVersion::get(m_xContext)); + officecfg::Setup::Product::ooSetupVersion::get()); OUString setupextension( - officecfg::Setup::Product::ooSetupExtension::get(m_xContext)); + officecfg::Setup::Product::ooSetupExtension::get()); OUString productversion( setupversion + " " + setupextension ); - bool showBasic = officecfg::Office::Common::Help::ShowBasic::get( - m_xContext); + bool showBasic = officecfg::Office::Common::Help::ShowBasic::get(); m_pDatabases.reset( new Databases( showBasic, instPath, utl::ConfigManager::getProductName(), |