diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-12 14:07:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-12 14:07:14 +0100 |
commit | c6d0dd62f7aa92be723317c8be518136eec26893 (patch) | |
tree | 926101cce104660c8d8397923ec69391cc7e9fc4 | |
parent | ff414feabe5bb5b7504cd02c70fa4e708ca557c0 (diff) |
Better use 0 instead of TOOLBOX_ITEM_NOTFOUND for "no ID available"
...return value from ToolBox::GetItemId, as is done in all other places where
such is returned from one of the ToolBox::GetItemId overloads. And
TOOLBOX_ITEM_NOTFOUND is otherwise only used for item positions, not item IDs.
(This lone odd use of TOOLBOX_ITEM_NOTFOUND was introduced with
ae5f75ab0515f8ee63813ec9284fbfb2124f0a5d "Allow a common op. on a disposed
toolbox", probably by accident.)
Change-Id: Id767b1d8d0b3cdfdc0ec525f165d75ae0cef7301
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 83eaffc28adc..a4da7c3ca4c5 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -789,7 +789,7 @@ Size ToolBox::GetItemContentSize( sal_uInt16 nItemId ) const sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const { if (!mpData) - return TOOLBOX_ITEM_NOTFOUND; + return 0; for (std::vector<ImplToolItem>::const_iterator it = mpData->m_aItems.begin(); it != mpData->m_aItems.end(); ++it) { |