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 /cui/source/dialogs/cuicharmap.cxx | |
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 'cui/source/dialogs/cuicharmap.cxx')
-rw-r--r-- | cui/source/dialogs/cuicharmap.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 78d6fad653ee..bda30b764f26 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -352,7 +352,7 @@ void SvxCharacterMap::updateRecentCharacterList(const OUString& sTitle, const OU aRecentCharFontListRange[i] = maRecentCharFontList[i]; } - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(mxContext)); + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::RecentCharacters::RecentCharacterList::set(aRecentCharList, batch); officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::set(aRecentCharFontList, batch); batch->commit(); @@ -391,7 +391,7 @@ void SvxCharacterMap::updateFavCharacterList(const OUString& sTitle, const OUStr aFavCharFontListRange[i] = maFavCharFontList[i]; } - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(mxContext)); + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set(aFavCharList, batch); officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set(aFavCharFontList, batch); batch->commit(); @@ -444,7 +444,7 @@ void SvxCharacterMap::deleteFavCharacterFromList(std::u16string_view sTitle, std aFavCharFontListRange[i] = maFavCharFontList[i]; } - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(mxContext)); + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set(aFavCharList, batch); officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set(aFavCharFontList, batch); batch->commit(); @@ -799,7 +799,7 @@ IMPL_LINK(SvxCharacterMap, RecentClearClickHdl, SvxCharView*, rView, void) aRecentCharFontListRange[i] = maRecentCharFontList[i]; } - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(mxContext)); + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::RecentCharacters::RecentCharacterList::set(aRecentCharList, batch); officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::set(aRecentCharFontList, batch); batch->commit(); @@ -812,7 +812,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, RecentClearAllClickHdl, SvxCharView*, void) maRecentCharList.clear(); maRecentCharFontList.clear(); - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(mxContext)); + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::RecentCharacters::RecentCharacterList::set({ }, batch); officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::set({ }, batch); batch->commit(); @@ -831,7 +831,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, FavClearAllClickHdl, SvxCharView*, void) maFavCharList.clear(); maFavCharFontList.clear(); - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(mxContext)); + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set({ }, batch); officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set({ }, batch); batch->commit(); |