summaryrefslogtreecommitdiff
path: root/vcl/source/window/toolbox2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r--vcl/source/window/toolbox2.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 88995776f914..26d74981592e 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -601,10 +601,7 @@ void ToolBox::InsertItem(const OUString& rCommand, const uno::Reference<frame::X
OUString aTooltip(vcl::CommandInfoProvider::Instance().GetTooltipForCommand(rCommand, rFrame));
Image aImage(vcl::CommandInfoProvider::Instance().GetImageForCommand(rCommand, (GetToolboxButtonSize() == TOOLBOX_BUTTONSIZE_LARGE), 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, aImage, aLabel, nBits, nPos);
SetItemCommand(nItemId, rCommand);
SetQuickHelpText(nItemId, aTooltip);