[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/source

Maxim Monastirsky momonasmon at gmail.com
Thu Jan 4 19:43:40 UTC 2018


 vcl/source/window/toolbox.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 4050b2c960db4f2bf17b954e65aae40a415c0761
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>
    (cherry picked from commit 291ea673180a37912697646850959b3f6553cc7a)
    Reviewed-on: https://gerrit.libreoffice.org/46145
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index b08cf4ca5261..71703b503de0 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -149,12 +149,13 @@ int ToolBox::ImplGetDragWidth() const
 ButtonType determineButtonType( ImplToolItem* 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