[Libreoffice-commits] core.git: vcl/source
Maxim Monastirsky
momonasmon at gmail.com
Wed Dec 6 18:18:37 UTC 2017
vcl/source/window/toolbox.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 291ea673180a37912697646850959b3f6553cc7a
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Wed Dec 6 01:20:13 2017 +0200
tdf#114262 Respect text+image toolbar style
Regression of 67c9d054517fc3b5cbc203c330eedef4b50f0e57
("fdo#84938: replace TIB_ constants with enum").
Change-Id: Ib90473a80fd491f4a136b4e76864c107a9240990
Reviewed-on: https://gerrit.libreoffice.org/45920
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index c7b98962689b..0eb843cf167c 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -148,12 +148,13 @@ int ToolBox::ImplGetDragWidth() const
ButtonType determineButtonType( ImplToolItem const * pItem, ButtonType defaultType )
{
ButtonType tmpButtonType = defaultType;
- if ( pItem->mnBits & (ToolBoxItemBits::TEXT_ONLY | ToolBoxItemBits::ICON_ONLY) ) // item has custom setting
+ ToolBoxItemBits nBits = pItem->mnBits & ( ToolBoxItemBits::TEXT_ONLY | ToolBoxItemBits::ICON_ONLY );
+ if ( nBits != ToolBoxItemBits::NONE ) // item has custom setting
{
tmpButtonType = ButtonType::SYMBOLTEXT;
- if ( pItem->mnBits & ToolBoxItemBits::TEXT_ONLY )
+ if ( nBits == ToolBoxItemBits::TEXT_ONLY )
tmpButtonType = ButtonType::TEXT;
- else if ( pItem->mnBits & ToolBoxItemBits::ICON_ONLY )
+ else if ( nBits == ToolBoxItemBits::ICON_ONLY )
tmpButtonType = ButtonType::SYMBOLONLY;
}
return tmpButtonType;
More information about the Libreoffice-commits
mailing list