From 1da003fed409d0a94410bcd93fe110322a50f6f8 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Tue, 7 Dec 2021 16:18:49 +0100 Subject: do not repeatedly create a framework::AddonsOptions temporary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are actually internally refcounted, so this doesn't make a difference, but it was confusing when profiling and seeing that it's a noticeable cost in SfxLokHelper::setView(). Change-Id: I6330fbdd2bc02718e633c3f7ab5c3da12039677e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126486 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- sfx2/source/notebookbar/SfxNotebookBar.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index b4cd2cec4faf..e70c7a88bd55 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -65,7 +65,7 @@ static void NotebookbarAddonValues( { OUString sImage; rProp.Value >>= sImage; - aImage = Image(framework::AddonsOptions().GetImageFromURL(sImage, isBigImage)); + aImage = Image(aAddonsItems.GetImageFromURL(sImage, isBigImage)); } } aImageValues.push_back(aImage); -- cgit