summaryrefslogtreecommitdiff
path: root/vcl/source/window/menu.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/menu.cxx')
-rw-r--r--vcl/source/window/menu.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 803c8a456a1a..3a6e54c67f03 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -533,9 +533,7 @@ void Menu::InsertItem(const OUString& rCommand, const uno::Reference<frame::XFra
OUString aTooltip(CommandInfoProvider::Instance().GetTooltipForCommand(rCommand, rFrame));
Image aImage(CommandInfoProvider::Instance().GetImageForCommand(rCommand, /*bLarge=*/ false, rFrame));
- // let's invent an ItemId
- const sal_uInt16 COMMAND_ITEMID_START = 30000;
- sal_uInt16 nItemId = COMMAND_ITEMID_START + GetItemCount();
+ sal_uInt16 nItemId = GetItemCount() + 1;
InsertItem(nItemId, aLabel, aImage, nBits, rIdent, nPos);
SetItemCommand(nItemId, rCommand);