summaryrefslogtreecommitdiff
path: root/sfx2/source/control/emojiview.cxx
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 /sfx2/source/control/emojiview.cxx
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 'sfx2/source/control/emojiview.cxx')
-rw-r--r--sfx2/source/control/emojiview.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sfx2/source/control/emojiview.cxx b/sfx2/source/control/emojiview.cxx
index a257ac85bf2c..02ee330e2c2a 100644
--- a/sfx2/source/control/emojiview.cxx
+++ b/sfx2/source/control/emojiview.cxx
@@ -85,8 +85,7 @@ void EmojiView::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
ThumbnailView::SetDrawingArea(pDrawingArea);
- uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
- OUString sFontName(officecfg::Office::Common::Misc::EmojiFont::get(xContext));
+ OUString sFontName(officecfg::Office::Common::Misc::EmojiFont::get());
vcl::Font aFont = pDrawingArea->get_font();
aFont.SetFamilyName(sFontName);
OutputDevice& rDevice = pDrawingArea->get_ref_device();