include/vcl/menu.hxx | 2 -- vcl/source/window/menu.cxx | 22 ---------------------- 2 files changed, 24 deletions(-)
New commits: commit 416e38c589635b6817a550cb9272e68ddc9bc9e9 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Dec 12 21:28:01 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Dec 13 10:03:26 2021 +0100 remove newly unused Menu::InsertItem variant Change-Id: I796bc10d96ebf0b2269f313a700146c68956dcf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126712 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 7fd2e34492bd..a6ceb70d405b 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -241,8 +241,6 @@ public: MenuItemBits nItemBits = MenuItemBits::NONE, const OString &rIdent = OString(), sal_uInt16 nPos = MENU_APPEND); - void InsertItem(const OUString& rCommand, - const css::uno::Reference<css::frame::XFrame>& rFrame); void InsertSeparator(const OString &rIdent = OString(), sal_uInt16 nPos = MENU_APPEND); void RemoveItem( sal_uInt16 nPos ); void Clear(); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 68e01be87c65..e671341a8292 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -469,28 +469,6 @@ void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr, SetItemImage( nItemId, rImage ); } -void Menu::InsertItem(const OUString& rCommand, const css::uno::Reference<css::frame::XFrame>& rFrame) -{ - sal_uInt16 nItemId = GetItemCount() + 1; - - if (rFrame.is()) - { - OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(rFrame)); - auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(rCommand, aModuleName); - OUString aLabel(CommandInfoProvider::GetPopupLabelForCommand(aProperties)); - OUString aTooltip(CommandInfoProvider::GetTooltipForCommand(rCommand, aProperties, rFrame)); - Image aImage(CommandInfoProvider::GetImageForCommand(rCommand, rFrame)); - - InsertItem(nItemId, aLabel, aImage); - SetHelpText(nItemId, aTooltip); - } - else - InsertItem(nItemId, OUString()); - - SetItemCommand(nItemId, rCommand); -} - - void Menu::InsertSeparator(const OString &rIdent, sal_uInt16 nPos) { // do nothing if it's a menu bar