summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2020-08-23 19:18:33 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2020-08-31 15:19:43 +0200
commit3e4968e6761c816c0a6aedf59485191af8a0fa4e (patch)
treee76c68df11b6f26ba5f27bb3e25e60eeb0880944 /vcl
parent9bf4e2aa77c208d09b32c3638afab6f904bf0257 (diff)
Remove remains of private:image/ via ImageIdentifier addon property
This is broken since commit 5c39b28a87060f80404079ab77604f664addb063 ("tdf#96059 Replaced imageproducer with CommandInfoProvider") but so far no one complained (maybe because the usefulness of such internal images from extensions is questionable at least). Given also that the whole ImageIdentifier feature (even its still working part) is obsolete since OOo 2.0.3 (according to the OOo dev guide), and that the availability of a particular image from an internal hardcoded image list by a particular numerical id is more an implementation detail, let's just remove the broken code instead of fixing it. In the meantime, the code was also copied into the newly introduced notebookbar addon code, so I handled it there too. There are also the registry schema and a sdk example that mention this feature, and need to be adjusted. Interesting that the particular example used there - private:image/3216 is actually broken since 2011 with commit 2559cab126f81375197051fb5b07ba6abb9efc77 ("FDO#42454 - EasyHack: remove code associated with unused icons"). Change-Id: I968b4fb8c5b207654476dd92c57d8db0815520ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101529 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/NotebookBarAddonsMerger.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx b/vcl/source/window/NotebookBarAddonsMerger.cxx
index c8c3c4bd2288..7ab27c038f13 100644
--- a/vcl/source/window/NotebookBarAddonsMerger.cxx
+++ b/vcl/source/window/NotebookBarAddonsMerger.cxx
@@ -33,7 +33,6 @@ const char STYLE_ICON[] = "Icon";
const char MERGE_NOTEBOOKBAR_URL[] = "URL";
const char MERGE_NOTEBOOKBAR_TITLE[] = "Title";
-const char MERGE_NOTEBOOKBAR_IMAGEID[] = "ImageIdentifier";
const char MERGE_NOTEBOOKBAR_CONTEXT[] = "Context";
const char MERGE_NOTEBOOKBAR_TARGET[] = "Target";
const char MERGE_NOTEBOOKBAR_CONTROLTYPE[] = "ControlType";
@@ -49,8 +48,6 @@ static void GetAddonNotebookBarItem(const css::uno::Sequence<css::beans::Propert
i.Value >>= aAddonNotebookBarItem.sCommandURL;
else if (i.Name == MERGE_NOTEBOOKBAR_TITLE)
i.Value >>= aAddonNotebookBarItem.sLabel;
- else if (i.Name == MERGE_NOTEBOOKBAR_IMAGEID)
- i.Value >>= aAddonNotebookBarItem.sImageIdentifier;
else if (i.Name == MERGE_NOTEBOOKBAR_CONTEXT)
i.Value >>= aAddonNotebookBarItem.sContext;
else if (i.Name == MERGE_NOTEBOOKBAR_TARGET)
@@ -89,8 +86,8 @@ static void CreateNotebookBarToolBox(vcl::Window* pNotebookbarToolBox,
sImage = aImageVec[nIter];
if (!sImage)
{
- sImage = vcl::CommandInfoProvider::GetImageForCommand(
- aAddonNotebookBarItem.sImageIdentifier, m_xFrame);
+ sImage = vcl::CommandInfoProvider::GetImageForCommand(aAddonNotebookBarItem.sCommandURL,
+ m_xFrame);
}
}