[Libreoffice-commits] core.git: 2 commits - svx/source

Maxim Monastirsky momonasmon at gmail.com
Tue Feb 7 19:37:24 UTC 2017


 svx/source/tbxctrls/tbcontrl.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 4d4d25ee6fb5d52a690e52252d1749ddd8d7a6f3
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Tue Feb 7 19:52:11 2017 +0200

    Always use split button for .uno:CharBackColor
    
    Change-Id: I4dd01ec8692fff77a94d6fa698e438581f6dbf37

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index efedc30..7854060 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2778,6 +2778,7 @@ SvxColorToolBoxControl::SvxColorToolBoxControl(
             SAL_FALLTHROUGH;
 
         case SID_ATTR_CHAR_COLOR:
+        case SID_ATTR_CHAR_BACK_COLOR:
             m_bSplitButton = true;
             break;
 
commit 5350dfca60c90845df9143bc25002dfc45c3d49f
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Tue Feb 7 19:41:34 2017 +0200

    tdf#105631 Notebookbar doesn't use wide buttons
    
    So we want non-split behavior only in SidebarToolBox,
    not in the derived NotebookbarToolBox.
    
    Change-Id: I064bbe59b97da301a13889ad78a31227cfd693ee

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index c8862ca..efedc30 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <string>
+#include <typeinfo>
 #include <utility>
 
 #include <comphelper/propertysequence.hxx>
@@ -2767,7 +2768,7 @@ SvxColorToolBoxControl::SvxColorToolBoxControl(
     sal_uInt16 nId,
     ToolBox& rTbx ):
     ImplInheritanceHelper( nSlotId, nId, rTbx ),
-    m_bSplitButton(dynamic_cast< sfx2::sidebar::SidebarToolBox* >(&rTbx) == nullptr),
+    m_bSplitButton(typeid(rTbx) != typeid(sfx2::sidebar::SidebarToolBox)),
     m_aColorSelectFunction(PaletteManager::DispatchColorCommand)
 {
     switch( nSlotId )


More information about the Libreoffice-commits mailing list