[Libreoffice-commits] core.git: 6 commits - configure.ac include/svtools include/vcl starmath/inc starmath/source svtools/source vcl/inc vcl/source

Caolán McNamara caolanm at redhat.com
Thu Feb 18 15:49:04 UTC 2016


 configure.ac                              |    5 -
 include/svtools/autocmpledit.hxx          |    2 
 include/svtools/inettbc.hxx               |    3 
 include/vcl/edit.hxx                      |   11 ---
 include/vcl/lstbox.hxx                    |    4 -
 include/vcl/settings.hxx                  |   12 ---
 starmath/inc/ElementsDockingWindow.hxx    |    6 -
 starmath/inc/pch/precompiled_sm.hxx       |    1 
 starmath/source/ElementsDockingWindow.cxx |   10 +-
 svtools/source/control/autocmpledit.cxx   |    5 -
 svtools/source/control/inettbc.cxx        |    7 --
 vcl/inc/listbox.hxx                       |   21 ++----
 vcl/inc/pch/precompiled_vcl.hxx           |    2 
 vcl/inc/spin.hxx                          |    9 ++
 vcl/source/control/combobox.cxx           |   44 ++++--------
 vcl/source/control/edit.cxx               |   34 ++-------
 vcl/source/control/imp_listbox.cxx        |   19 ++---
 vcl/source/control/listbox.cxx            |   16 +---
 vcl/source/control/scrbar.cxx             |   32 +--------
 vcl/source/control/spinfld.cxx            |  104 ++++++++++++------------------
 vcl/source/window/toolbox.cxx             |    4 -
 21 files changed, 128 insertions(+), 223 deletions(-)

New commits:
commit 4f034adcb79684bc4138e2f9708defd8a3532f74
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 18 14:42:39 2016 +0000

    Resolves: tdf#97953 spinbuttons are not suitable for reuse as up/down arrows
    
    Change-Id: Ibcd7bd4099210a26513caac6e3b16a88a4c8abad

diff --git a/vcl/inc/spin.hxx b/vcl/inc/spin.hxx
index 9b5c080..0ccfca5 100644
--- a/vcl/inc/spin.hxx
+++ b/vcl/inc/spin.hxx
@@ -24,11 +24,20 @@
 
 class Rectangle;
 
+// Draw Spinners as found in a SpinButton. Some themes like gtk3 will draw +- elements here,
+// so these are only suitable in the context of SpinButtons
 void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow,
                         const Rectangle& rUpperRect, const Rectangle& rLowerRect,
                         bool bUpperIn, bool bLowerIn, bool bUpperEnabled = true, bool bLowerEnabled = true,
                         bool bHorz = false, bool bMirrorHorz = false);
 
+// Draw Up/Down buttons suitable for use in any context
+void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext,
+                           const Rectangle& rUpperRect, const Rectangle& rLowerRect,
+                           bool bUpperIn, bool bLowerIn, bool bUpperEnabled = true, bool bLowerEnabled = true,
+                           bool bHorz = false, bool bMirrorHorz = false);
+
+
 #endif // INCLUDED_VCL_INC_SPIN_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 032bdc1..c8a601d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -197,6 +197,17 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
     if (bNativeOK)
         return;
 
+    ImplDrawUpDownButtons(rRenderContext,
+                          rUpperRect, rLowerRect,
+                          bUpperIn, bLowerIn, bUpperEnabled, bLowerEnabled,
+                          bHorz, bMirrorHorz);
+}
+
+void ImplDrawUpDownButtons(vcl::RenderContext& rRenderContext,
+                           const Rectangle& rUpperRect, const Rectangle& rLowerRect,
+                           bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled,
+                           bool bHorz, bool bMirrorHorz)
+{
     DecorationView aDecoView(&rRenderContext);
 
     SymbolType eType1, eType2;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index e65d04f..2dbad90 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2906,8 +2906,8 @@ void ToolBox::ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bUpperIn, bo
         bTmpLower = false;
     }
 
-    ImplDrawSpinButton(rRenderContext, this, maUpperRect, maLowerRect,
-                       bUpperIn, bLowerIn, bTmpUpper, bTmpLower, !mbHorz);
+    ImplDrawUpDownButtons(rRenderContext, maUpperRect, maLowerRect,
+                          bUpperIn, bLowerIn, bTmpUpper, bTmpLower, !mbHorz);
 }
 
 void ToolBox::ImplDrawSeparator(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, const Rectangle& rRect)
commit cee3b45977d34f290e50a8fbc8b0dd60ef10faae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 18 14:30:54 2016 +0000

    StyleSettingsOptions Only NONE, Mono and NoMnemonics are in use
    
    ditch the rest
    
    Change-Id: I3383023958f528d9d0d6ba715356d8d6a6aecd5a

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 72283aa..acbacf3 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -179,17 +179,11 @@ enum class StyleSettingsOptions
 {
     NONE           = 0x0000,
     Mono           = 0x0001,
-    Color          = 0x0002,
-    Flat           = 0x0004,
-    Great          = 0x0008,
-    Highlight      = 0x0010,
-    AdvancedUser   = 0x0020,
-    ScrollArrow    = 0x0040,
-    NoMnemonics    = 0x0080,
+    NoMnemonics    = 0x0002,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<StyleSettingsOptions> : is_typed_flags<StyleSettingsOptions, 0x00ff> {};
+    template<> struct typed_flags<StyleSettingsOptions> : is_typed_flags<StyleSettingsOptions, 0x0003> {};
 }
 
 enum class DragFullOptions
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 485d613..40b6161 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -642,20 +642,10 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
         DrawSymbolFlags nSymbolStyle = DrawSymbolFlags::NONE;
         if ((mnStateFlags & SCRBAR_STATE_BTN1_DISABLE) || !bEnabled)
             nSymbolStyle |= DrawSymbolFlags::Disable;
-        if (rStyleSettings.GetOptions() & StyleSettingsOptions::ScrollArrow)
-        {
-            if (GetStyle() & WB_HORZ)
-                eSymbolType = SymbolType::ARROW_LEFT;
-            else
-                eSymbolType = SymbolType::ARROW_UP;
-        }
+        if (GetStyle() & WB_HORZ)
+            eSymbolType = SymbolType::SPIN_LEFT;
         else
-        {
-            if (GetStyle() & WB_HORZ)
-                eSymbolType = SymbolType::SPIN_LEFT;
-            else
-                eSymbolType = SymbolType::SPIN_UP;
-        }
+            eSymbolType = SymbolType::SPIN_UP;
         aDecoView.DrawSymbol(aTempRect, eSymbolType, rStyleSettings.GetButtonTextColor(), nSymbolStyle);
     }
 
@@ -669,20 +659,10 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
         DrawSymbolFlags nSymbolStyle = DrawSymbolFlags::NONE;
         if ((mnStateFlags & SCRBAR_STATE_BTN2_DISABLE) || !bEnabled)
             nSymbolStyle |= DrawSymbolFlags::Disable;
-        if (rStyleSettings.GetOptions() & StyleSettingsOptions::ScrollArrow)
-        {
-            if (GetStyle() & WB_HORZ)
-                eSymbolType = SymbolType::ARROW_RIGHT;
-            else
-                eSymbolType = SymbolType::ARROW_DOWN;
-        }
+        if (GetStyle() & WB_HORZ)
+            eSymbolType = SymbolType::SPIN_RIGHT;
         else
-        {
-            if (GetStyle() & WB_HORZ)
-                eSymbolType = SymbolType::SPIN_RIGHT;
-            else
-                eSymbolType = SymbolType::SPIN_DOWN;
-        }
+            eSymbolType = SymbolType::SPIN_DOWN;
         aDecoView.DrawSymbol(aTempRect, eSymbolType, rStyleSettings.GetButtonTextColor(), nSymbolStyle);
     }
 
commit 305a164e8b1094a041373ab9808aedcf4c76a1b6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 18 14:28:47 2016 +0000

    StyleSettingsOptions::SpinArrow is not set by anyone
    
    Tragically this means the loss of a OS/2 comment
    
    Change-Id: Ia3f7b0a840e6b73cf4fae5f98dd4cf97d4e7b87c

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 5fe497b..72283aa 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -185,12 +185,11 @@ enum class StyleSettingsOptions
     Highlight      = 0x0010,
     AdvancedUser   = 0x0020,
     ScrollArrow    = 0x0040,
-    SpinArrow      = 0x0080,
-    NoMnemonics    = 0x0100,
+    NoMnemonics    = 0x0080,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<StyleSettingsOptions> : is_typed_flags<StyleSettingsOptions, 0x01ff> {};
+    template<> struct typed_flags<StyleSettingsOptions> : is_typed_flags<StyleSettingsOptions, 0x00ff> {};
 }
 
 enum class DragFullOptions
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 59208e3..032bdc1 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -201,33 +201,15 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
 
     SymbolType eType1, eType2;
 
-    const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
-    if ( rStyleSettings.GetOptions() & StyleSettingsOptions::SpinArrow )
+    if ( bHorz )
     {
-        // arrows are only use in OS/2 look
-        if ( bHorz )
-        {
-            eType1 = bMirrorHorz ? SymbolType::ARROW_RIGHT : SymbolType::ARROW_LEFT;
-            eType2 = bMirrorHorz ? SymbolType::ARROW_LEFT : SymbolType::ARROW_RIGHT;
-        }
-        else
-        {
-            eType1 = SymbolType::ARROW_UP;
-            eType2 = SymbolType::ARROW_DOWN;
-        }
+        eType1 = bMirrorHorz ? SymbolType::SPIN_RIGHT : SymbolType::SPIN_LEFT;
+        eType2 = bMirrorHorz ? SymbolType::SPIN_LEFT : SymbolType::SPIN_RIGHT;
     }
     else
     {
-        if ( bHorz )
-        {
-            eType1 = bMirrorHorz ? SymbolType::SPIN_RIGHT : SymbolType::SPIN_LEFT;
-            eType2 = bMirrorHorz ? SymbolType::SPIN_LEFT : SymbolType::SPIN_RIGHT;
-        }
-        else
-        {
-            eType1 = SymbolType::SPIN_UP;
-            eType2 = SymbolType::SPIN_DOWN;
-        }
+        eType1 = SymbolType::SPIN_UP;
+        eType2 = SymbolType::SPIN_DOWN;
     }
 
     DrawButtonFlags nStyle = DrawButtonFlags::NoLeftLightBorder;
@@ -283,6 +265,8 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
             aLowRect.Top()++;
     }
 
+    const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
+
     DrawSymbolFlags nSymStyle = DrawSymbolFlags::NONE;
     if (!bUpperEnabled)
         nSymStyle |= DrawSymbolFlags::Disable;
commit 473b03d1a4b7cdd72551a9039f6cc76a808cce58
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 18 14:20:47 2016 +0000

    StyleSettingsOptions::SpinUpDown is not set by anyone
    
    Change-Id: I26d5189b6a20844bac2a671a30def1b01aa786a8

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 537cb8f..5fe497b 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -186,12 +186,11 @@ enum class StyleSettingsOptions
     AdvancedUser   = 0x0020,
     ScrollArrow    = 0x0040,
     SpinArrow      = 0x0080,
-    SpinUpDown     = 0x0100,
-    NoMnemonics    = 0x0200,
+    NoMnemonics    = 0x0100,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<StyleSettingsOptions> : is_typed_flags<StyleSettingsOptions, 0x03ff> {};
+    template<> struct typed_flags<StyleSettingsOptions> : is_typed_flags<StyleSettingsOptions, 0x01ff> {};
 }
 
 enum class DragFullOptions
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index ed3d39c..f1fa9a2 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -49,10 +49,7 @@ using namespace ::com::sun::star;
 
 void ImplInitDropDownButton( PushButton* pButton )
 {
-    if ( pButton->GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::SpinUpDown )
-        pButton->SetSymbol( SymbolType::SPIN_UPDOWN );
-    else
-        pButton->SetSymbol( SymbolType::SPIN_DOWN );
+    pButton->SetSymbol( SymbolType::SPIN_DOWN );
 
     if ( pButton->IsNativeControlSupported(CTRL_LISTBOX, PART_ENTIRE_CONTROL)
             && ! pButton->IsNativeControlSupported(CTRL_LISTBOX, PART_BUTTON_DOWN) )
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 126152f..59208e3 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -631,9 +631,6 @@ void SpinField::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
         Rectangle aInnerRect = aView.DrawButton(maDropDownRect, nStyle);
 
         SymbolType eSymbol = SymbolType::SPIN_DOWN;
-        if (rRenderContext.GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::SpinUpDown)
-            eSymbol = SymbolType::SPIN_UPDOWN;
-
         DrawSymbolFlags nSymbolStyle = IsEnabled() ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable;
         aView.DrawSymbol(aInnerRect, eSymbol, rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor(), nSymbolStyle);
     }
@@ -1034,9 +1031,6 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D
             DrawButtonFlags nStyle = DrawButtonFlags::NoLightBorder;
             Rectangle aInnerRect = aView.DrawButton( aDD, nStyle );
             SymbolType eSymbol = SymbolType::SPIN_DOWN;
-            if (GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::SpinUpDown)
-                eSymbol = SymbolType::SPIN_UPDOWN;
-
             DrawSymbolFlags nSymbolStyle = (IsEnabled() || (nFlags & DrawFlags::NoDisable)) ? DrawSymbolFlags::NONE : DrawSymbolFlags::Disable;
             aView.DrawSymbol(aInnerRect, eSymbol, aButtonTextColor, nSymbolStyle);
         }
commit 55b33456c14aa5311fb0e3d71f1cad4fbd73cbef
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 18 14:16:23 2016 +0000

    refactor ImplDrawSpinButton
    
    there is (supposed to be anyway) no logic change here,
    just unwind the overly complex flow
    
    Change-Id: I9c96f41b0480a60c486b476f383d856b464cd62d

diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index e0bcf16..126152f 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -158,49 +158,7 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
                         bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled,
                         bool bHorz, bool bMirrorHorz)
 {
-    DecorationView aDecoView(&rRenderContext);
-
-    DrawButtonFlags nStyle = DrawButtonFlags::NoLeftLightBorder;
-    DrawSymbolFlags nSymStyle = DrawSymbolFlags::NONE;
-
-    SymbolType eType1, eType2;
-
-    const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
-    if ( rStyleSettings.GetOptions() & StyleSettingsOptions::SpinArrow )
-    {
-        // arrows are only use in OS/2 look
-        if ( bHorz )
-        {
-            eType1 = bMirrorHorz ? SymbolType::ARROW_RIGHT : SymbolType::ARROW_LEFT;
-            eType2 = bMirrorHorz ? SymbolType::ARROW_LEFT : SymbolType::ARROW_RIGHT;
-        }
-        else
-        {
-            eType1 = SymbolType::ARROW_UP;
-            eType2 = SymbolType::ARROW_DOWN;
-        }
-    }
-    else
-    {
-        if ( bHorz )
-        {
-            eType1 = bMirrorHorz ? SymbolType::SPIN_RIGHT : SymbolType::SPIN_LEFT;
-            eType2 = bMirrorHorz ? SymbolType::SPIN_LEFT : SymbolType::SPIN_RIGHT;
-        }
-        else
-        {
-            eType1 = SymbolType::SPIN_UP;
-            eType2 = SymbolType::SPIN_DOWN;
-        }
-    }
-
-    // draw upper/left Button
-    DrawButtonFlags nTempStyle = nStyle;
-    if (bUpperIn)
-        nTempStyle |= DrawButtonFlags::Pressed;
-
     bool bNativeOK = false;
-    Rectangle aUpRect;
 
     if (pWindow)
     {
@@ -236,15 +194,55 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
             bNativeOK = ImplDrawNativeSpinbuttons(rRenderContext, aValue);
     }
 
-    if (!bNativeOK)
-        aUpRect = aDecoView.DrawButton(rUpperRect, nTempStyle);
+    if (bNativeOK)
+        return;
+
+    DecorationView aDecoView(&rRenderContext);
 
+    SymbolType eType1, eType2;
+
+    const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
+    if ( rStyleSettings.GetOptions() & StyleSettingsOptions::SpinArrow )
+    {
+        // arrows are only use in OS/2 look
+        if ( bHorz )
+        {
+            eType1 = bMirrorHorz ? SymbolType::ARROW_RIGHT : SymbolType::ARROW_LEFT;
+            eType2 = bMirrorHorz ? SymbolType::ARROW_LEFT : SymbolType::ARROW_RIGHT;
+        }
+        else
+        {
+            eType1 = SymbolType::ARROW_UP;
+            eType2 = SymbolType::ARROW_DOWN;
+        }
+    }
+    else
+    {
+        if ( bHorz )
+        {
+            eType1 = bMirrorHorz ? SymbolType::SPIN_RIGHT : SymbolType::SPIN_LEFT;
+            eType2 = bMirrorHorz ? SymbolType::SPIN_LEFT : SymbolType::SPIN_RIGHT;
+        }
+        else
+        {
+            eType1 = SymbolType::SPIN_UP;
+            eType2 = SymbolType::SPIN_DOWN;
+        }
+    }
+
+    DrawButtonFlags nStyle = DrawButtonFlags::NoLeftLightBorder;
+    // draw upper/left Button
+    if (bUpperIn)
+        nStyle |= DrawButtonFlags::Pressed;
+
+    Rectangle aUpRect = aDecoView.DrawButton(rUpperRect, nStyle);
+
+    nStyle = DrawButtonFlags::NoLeftLightBorder;
     // draw lower/right Button
     if (bLowerIn)
         nStyle |= DrawButtonFlags::Pressed;
-    Rectangle aLowRect;
-    if(!bNativeOK)
-        aLowRect = aDecoView.DrawButton(rLowerRect, nStyle);
+
+    Rectangle aLowRect = aDecoView.DrawButton(rLowerRect, nStyle);
 
      // make use of additional default edge
     aUpRect.Left()--;
@@ -285,16 +283,15 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
             aLowRect.Top()++;
     }
 
-    DrawSymbolFlags nTempSymStyle = nSymStyle;
+    DrawSymbolFlags nSymStyle = DrawSymbolFlags::NONE;
     if (!bUpperEnabled)
-        nTempSymStyle |= DrawSymbolFlags::Disable;
-    if (!bNativeOK)
-        aDecoView.DrawSymbol(aUpRect, eType1, rStyleSettings.GetButtonTextColor(), nTempSymStyle);
+        nSymStyle |= DrawSymbolFlags::Disable;
+    aDecoView.DrawSymbol(aUpRect, eType1, rStyleSettings.GetButtonTextColor(), nSymStyle);
 
+    nSymStyle = DrawSymbolFlags::NONE;
     if (!bLowerEnabled)
         nSymStyle |= DrawSymbolFlags::Disable;
-    if (!bNativeOK)
-        aDecoView.DrawSymbol(aLowRect, eType2, rStyleSettings.GetButtonTextColor(), nSymStyle);
+    aDecoView.DrawSymbol(aLowRect, eType2, rStyleSettings.GetButtonTextColor(), nSymStyle);
 }
 
 void SpinField::ImplInitSpinFieldData()
commit 548c2274c9ba7542d6bcae5fefd1400ee4e22fc3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 18 13:38:12 2016 +0000

    move from boost::signal to typed Link
    
    it doesn't really gain us much to have a handful of
    boost::signal use in a sea of Links
    
    This also fixes a regression in
    
    commit 051b29e1025253f35f87a04e297760aa8b40611f
    Author: Luboš Luňák <l.lunak at collabora.com>
    Date:   Sun Sep 14 15:45:02 2014 +0200
    
        convert Edit autocomplete Hdl to boost signals2
    
    where the conversion was...
    
    - if ( maAutocompleteHdl.IsSet() )
    + if ( autocompleteSignal.empty() )
    
    instead of the correct
    
    + if ( !autocompleteSignal.empty() )
    
    Change-Id: I27270d94c782485c0a7e929bc4980af4527fe82b

diff --git a/configure.ac b/configure.ac
index 315bffa..daa1810 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8761,11 +8761,6 @@ if test "$with_system_boost" = "yes"; then
        [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
     AC_CHECK_HEADER(boost/function.hpp, [],
        [AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
-    AC_MSG_CHECKING([whether boost signals2 works])
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/signals2/signal.hpp>]],
-        [[ boost::signals2::signal<void()> s; s(); ]])],
-        [AC_MSG_RESULT([yes])],
-        [AC_MSG_ERROR([no, install boost >= 1.55 or use --without-system-boost])])
     CXXFLAGS="$CXXFLAGS -fno-exceptions"
     AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
diff --git a/include/svtools/autocmpledit.hxx b/include/svtools/autocmpledit.hxx
index 56df6e0..79e3601 100644
--- a/include/svtools/autocmpledit.hxx
+++ b/include/svtools/autocmpledit.hxx
@@ -23,7 +23,7 @@ private:
     std::vector< OUString > m_aMatching;
     std::vector< OUString >::size_type m_nCurrent;
 
-    void AutoCompleteHandler( Edit* );
+    DECL_DLLPRIVATE_LINK_TYPED(AutoCompleteHdl_Impl, Edit&, void);
     bool Match( const OUString& rText );
     bool PreNotify( NotifyEvent& rNEvt ) override;
 
diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx
index daef69b..e6435f1 100644
--- a/include/svtools/inettbc.hxx
+++ b/include/svtools/inettbc.hxx
@@ -48,10 +48,9 @@ friend class SvtURLBox_Impl;
     SVT_DLLPRIVATE bool             ProcessKey( const vcl::KeyCode& rCode );
     SVT_DLLPRIVATE void             TryAutoComplete();
     SVT_DLLPRIVATE void             UpdatePicklistForSmartProtocol_Impl();
+    DECL_DLLPRIVATE_LINK_TYPED(     AutoCompleteHdl_Impl, Edit&, void );
     SVT_DLLPRIVATE void             Init(bool bSetDefaultHelpID);
 
-    SAL_DLLPRIVATE void AutoCompleteHandler( Edit* );
-
 protected:
     virtual bool                    Notify( NotifyEvent& rNEvt ) override;
     virtual void                    Select() override;
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 30741d5..628ada5 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -32,9 +32,6 @@
 #include <vcl/vclptr.hxx>
 #include <com/sun/star/uno/Reference.h>
 
-// forward declare signals stuff - those headers are staggeringly expensive
-namespace boost { namespace signals2 { class connection; } }
-
 namespace com {
 namespace sun {
 namespace star {
@@ -72,9 +69,6 @@ class Timer;
 class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropClient
 {
 private:
-    struct Impl;
-    ::std::unique_ptr<Impl> m_pImpl;
-
     VclPtr<Edit>        mpSubEdit;
     Timer*              mpUpdateDataTimer;
     TextFilter*         mpFilterText;
@@ -102,6 +96,7 @@ private:
                         mbActivePopup:1;
     Link<Edit&,void>    maModifyHdl;
     Link<Edit&,void>    maUpdateDataHdl;
+    Link<Edit&,void>    maAutocompleteHdl;
 
     css::uno::Reference<css::i18n::XExtendedInputSequenceChecker> mxISC;
 
@@ -253,8 +248,8 @@ public:
     void                SetSubEdit( Edit* pEdit );
     Edit*               GetSubEdit() const { return mpSubEdit; }
 
-    void SignalConnectAutocomplete(::boost::signals2::connection * pConnection,
-            ::std::function<void (Edit *)>);
+    void                SetAutocompleteHdl( const Link<Edit&,void>& rLink ) { maAutocompleteHdl = rLink; }
+    const Link<Edit&,void>& GetAutocompleteHdl() const { return maAutocompleteHdl; }
     AutocompleteAction  GetAutocompleteAction() const { return meAutocompleteAction; }
 
     virtual Size        CalcMinimumSize() const;
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index e2050cf..5a5bc4d 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -98,11 +98,11 @@ private:
     DECL_DLLPRIVATE_LINK_TYPED( ImplDoubleClickHdl, ImplListBoxWindow*, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplPopupModeEndHdl, FloatingWindow*, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplSelectionChangedHdl, sal_Int32, void );
+    DECL_DLLPRIVATE_LINK_TYPED( ImplUserDrawHdl, UserDrawEvent*, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplFocusHdl, sal_Int32, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplListItemSelectHdl, LinkParamNone*, void );
 
-    SAL_DLLPRIVATE void ImplClickButtonHandler( Control* );
-    SAL_DLLPRIVATE void ImplUserDrawHandler( UserDrawEvent* );
+    DECL_DLLPRIVATE_LINK_TYPED( ImplClickBtnHdl, void*, void );
 
 protected:
     using Window::ImplInit;
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index a458d9d..6518326 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_STARMATH_INC_ELEMENTSDOCKINGWINDOW_HXX
 #define INCLUDED_STARMATH_INC_ELEMENTSDOCKINGWINDOW_HXX
 
-#include <boost/signals2/signal.hpp>
 #include <sfx2/dockwin.hxx>
 #include <svx/dlgctrl.hxx>
 #include <vcl/scrbar.hxx>
@@ -90,6 +89,7 @@ class SmElementsControl : public Control
     SmFormat      maFormat;
     sal_uInt16    maCurrentSetId;
     SmElement*    mpCurrentElement;
+    Link<SmElement&,void> maSelectHdlLink;
 
     std::vector< std::unique_ptr<SmElement> > maElementList;
     Size          maMaxElementDimensions;
@@ -122,7 +122,7 @@ public:
     DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void );
     void DoScroll(long nDelta);
 
-    boost::signals2::signal< void ( SmElement* ) > selectedSignal;
+    void SetSelectHdl(const Link<SmElement&,void>& rLink) { maSelectHdlLink = rLink; }
 };
 
 class SmElementsDockingWindow : public SfxDockingWindow
@@ -135,7 +135,7 @@ class SmElementsDockingWindow : public SfxDockingWindow
     virtual void Resize() override;
     SmViewShell* GetView();
 
-    void SelectClickHandler(SmElement* pElement);
+    DECL_LINK_TYPED(SelectClickHandler, SmElement&, void);
     DECL_LINK_TYPED(ElementSelectedHandle, ListBox&, void);
 
 public:
diff --git a/starmath/inc/pch/precompiled_sm.hxx b/starmath/inc/pch/precompiled_sm.hxx
index 2d3175a..7decc8c 100644
--- a/starmath/inc/pch/precompiled_sm.hxx
+++ b/starmath/inc/pch/precompiled_sm.hxx
@@ -41,7 +41,6 @@
 #include <boost/checked_delete.hpp>
 #include <boost/intrusive_ptr.hpp>
 #include <boost/optional/optional.hpp>
-#include <boost/signals2/signal.hpp>
 #include <osl/diagnose.h>
 #include <osl/module.hxx>
 #include <osl/mutex.hxx>
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 1fca973..ea1fde8 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -463,7 +463,7 @@ void SmElementsControl::MouseButtonDown(const MouseEvent& rMouseEvent)
 {
     GrabFocus();
 
-    if (rMouseEvent.IsLeft() && Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel()))
+    if (rMouseEvent.IsLeft() && Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel()) && maSelectHdlLink.IsSet())
     {
         for (size_t i = 0; i < maElementList.size() ; i++)
         {
@@ -471,7 +471,7 @@ void SmElementsControl::MouseButtonDown(const MouseEvent& rMouseEvent)
             Rectangle rect(element->mBoxLocation, element->mBoxSize);
             if (rect.IsInside(rMouseEvent.GetPosPixel()))
             {
-                selectedSignal(element);
+                maSelectHdlLink.Call(*element);
                 return;
             }
         }
@@ -720,7 +720,7 @@ SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, Sf
     mpElementsControl->SetBackground( Color( COL_WHITE ) );
     mpElementsControl->SetTextColor( Color( COL_BLACK ) );
     mpElementsControl->setElementSetId(RID_CATEGORY_UNARY_BINARY_OPERATORS);
-    mpElementsControl->selectedSignal.connect( boost::bind( &SmElementsDockingWindow::SelectClickHandler, this, _1 ) );
+    mpElementsControl->SetSelectHdl(LINK(this, SmElementsDockingWindow, SelectClickHandler));
 }
 
 SmElementsDockingWindow::~SmElementsDockingWindow ()
@@ -752,7 +752,7 @@ void SmElementsDockingWindow::EndDocking( const Rectangle& rReactangle, bool bFl
     mpElementsControl->setVerticalMode(bVertical);
 }
 
-void SmElementsDockingWindow::SelectClickHandler( SmElement* pElement )
+IMPL_LINK_TYPED(SmElementsDockingWindow, SelectClickHandler, SmElement&, rElement, void)
 {
     SmViewShell* pViewSh = GetView();
 
@@ -760,7 +760,7 @@ void SmElementsDockingWindow::SelectClickHandler( SmElement* pElement )
     {
         pViewSh->GetViewFrame()->GetDispatcher()->Execute(
             SID_INSERTCOMMANDTEXT, SfxCallMode::RECORD,
-            new SfxStringItem(SID_INSERTCOMMANDTEXT, pElement->getText()), 0L);
+            new SfxStringItem(SID_INSERTCOMMANDTEXT, rElement.getText()), 0L);
     }
 }
 
diff --git a/svtools/source/control/autocmpledit.cxx b/svtools/source/control/autocmpledit.cxx
index 8032b6e..737f140 100644
--- a/svtools/source/control/autocmpledit.cxx
+++ b/svtools/source/control/autocmpledit.cxx
@@ -14,8 +14,7 @@ AutocompleteEdit::AutocompleteEdit( vcl::Window* pParent )
     : Edit( pParent )
     , m_nCurrent( 0 )
 {
-    SignalConnectAutocomplete( nullptr,
-            [this] ( Edit *const pEdit ) { this->AutoCompleteHandler( pEdit ); } );
+    SetAutocompleteHdl(LINK(this, AutocompleteEdit, AutoCompleteHdl_Impl));
 }
 
 void AutocompleteEdit::AddEntry( const OUString& rEntry )
@@ -29,7 +28,7 @@ void AutocompleteEdit::ClearEntries()
     m_aMatching.clear();
 }
 
-void AutocompleteEdit::AutoCompleteHandler( Edit* )
+IMPL_LINK_NOARG_TYPED(AutocompleteEdit, AutoCompleteHdl_Impl, Edit&, void)
 {
     if( GetAutocompleteAction() != AUTOCOMPLETE_KEYINPUT )
         return;
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index ad71624..98555b7 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -883,8 +883,7 @@ void SvtURLBox::Init(bool bSetDefaultHelpID)
 
     SetText( OUString() );
 
-    GetSubEdit()->SignalConnectAutocomplete(nullptr,
-        [this] (Edit *const pEdit) { this->AutoCompleteHandler(pEdit); } );
+    GetSubEdit()->SetAutocompleteHdl(LINK(this, SvtURLBox, AutoCompleteHdl_Impl));
     UpdatePicklistForSmartProtocol_Impl();
 
     EnableAutoSize(GetStyle() & WB_AUTOSIZE);
@@ -1114,14 +1113,12 @@ bool SvtURLBox::PreNotify( NotifyEvent& rNEvt )
     return ComboBox::PreNotify( rNEvt );
 }
 
-
-void SvtURLBox::AutoCompleteHandler( Edit* )
+IMPL_LINK_NOARG_TYPED(SvtURLBox, AutoCompleteHdl_Impl, Edit&, void)
 {
     if ( GetSubEdit()->GetAutocompleteAction() == AUTOCOMPLETE_KEYINPUT )
         TryAutoComplete();
 }
 
-
 bool SvtURLBox::Notify( NotifyEvent &rEvt )
 {
     if ( MouseNotifyEvent::GETFOCUS == rEvt.GetType() )
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 611f6b0..f316e8f 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -24,8 +24,6 @@
 #include <vcl/floatwin.hxx>
 #include <vcl/quickselectionengine.hxx>
 
-#include <boost/signals2/signal.hpp>
-
 #include <vector>
 #include <memory>
 
@@ -231,6 +229,7 @@ private:
     Link<LinkParamNone*,void>      maSelectHdl;
     Link<LinkParamNone*,void>      maCancelHdl;
     Link<ImplListBoxWindow*,void>  maDoubleClickHdl;
+    Link<UserDrawEvent*, void>     maUserDrawHdl;
     Link<LinkParamNone*,void>      maMRUChangedHdl;
     Link<sal_Int32,void>           maFocusHdl;
     Link<LinkParamNone*,void>      maListItemSelectHdl;
@@ -332,11 +331,10 @@ public:
     void            SetSelectHdl( const Link<LinkParamNone*,void>& rLink ) { maSelectHdl = rLink; }
     void            SetCancelHdl( const Link<LinkParamNone*,void>& rLink ) { maCancelHdl = rLink; }
     void            SetDoubleClickHdl( const Link<ImplListBoxWindow*,void>& rLink ) { maDoubleClickHdl = rLink; }
+    void            SetUserDrawHdl( const Link<UserDrawEvent*, void>& rLink ) { maUserDrawHdl = rLink; }
     void            SetMRUChangedHdl( const Link<LinkParamNone*,void>& rLink ) { maMRUChangedHdl = rLink; }
     void            SetFocusHdl( const Link<sal_Int32,void>& rLink )  { maFocusHdl = rLink ; }
 
-    boost::signals2::signal< void ( UserDrawEvent* ) > userDrawSignal;
-
     void            SetListItemSelectHdl( const Link<LinkParamNone*,void>& rLink ) { maListItemSelectHdl = rLink ; }
     bool            IsSelectionChanged() const { return mbSelectionChanged; }
     sal_uInt16      GetSelectModifier() const { return mnSelectModifier; }
@@ -460,9 +458,7 @@ public:
     void            SetSelectHdl( const Link<LinkParamNone*,void>& rLink ) { maLBWindow->SetSelectHdl( rLink ); }
     void            SetCancelHdl( const Link<LinkParamNone*,void>& rLink ) { maLBWindow->SetCancelHdl( rLink ); }
     void            SetDoubleClickHdl( const Link<ImplListBoxWindow*,void>& rLink ) { maLBWindow->SetDoubleClickHdl( rLink ); }
-
-    boost::signals2::signal< void ( UserDrawEvent* ) > userDrawSignal;
-
+    void            SetUserDrawHdl( const Link<UserDrawEvent*, void>& rLink ) { maLBWindow->SetUserDrawHdl( rLink ); }
     void            SetFocusHdl( const Link<sal_Int32,void>& rLink )  { maLBWindow->SetFocusHdl( rLink ); }
     void            SetListItemSelectHdl( const Link<LinkParamNone*,void>& rLink ) { maLBWindow->SetListItemSelectHdl( rLink ); }
     void            SetSelectionChangedHdl( const Link<sal_Int32,void>& rLnk ) { maLBWindow->GetEntryList()->SetSelectionChangedHdl( rLnk ); }
@@ -535,6 +531,9 @@ private:
     Rectangle       maFocusRect;
     Size            maUserItemSize;
 
+    Link<void*,void> maMBDownHdl;
+    Link<UserDrawEvent*, void> maUserDrawHdl;
+
     /// bitfield
     bool            mbUserDrawEnabled : 1;
     bool            mbInUserDraw : 1;
@@ -563,8 +562,8 @@ public:
 
     void            MBDown();
 
-    boost::signals2::signal< void ( ImplWin* ) > buttonDownSignal;
-    boost::signals2::signal< void ( UserDrawEvent* ) > userDrawSignal;
+    void            SetMBDownHdl( const Link<void*,void>& rLink ) { maMBDownHdl = rLink; }
+    void            SetUserDrawHdl( const Link<UserDrawEvent*, void>& rLink ) { maUserDrawHdl = rLink; }
 
     void            SetUserItemSize( const Size& rSz )  { maUserItemSize = rSz; }
 
@@ -588,14 +587,14 @@ class ImplBtn : public PushButton
 {
 private:
     bool            mbDown;
+    Link<void*,void> maMBDownHdl;
 
 public:
                     ImplBtn( vcl::Window* pParent, WinBits nWinStyle = 0 );
 
     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) override;
     void    MBDown();
-
-    boost::signals2::signal< void ( ImplBtn* ) > buttonDownSignal;
+    void            SetMBDownHdl( const Link<void*,void>& rLink ) { maMBDownHdl = rLink; }
 };
 
 void ImplInitDropDownButton( PushButton* pButton );
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index 4d79b7c..d3ef819 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -59,8 +59,6 @@
 #include <boost/multi_array.hpp>
 #include <boost/optional.hpp>
 #include <boost/shared_array.hpp>
-#include <boost/signals2/connection.hpp>
-#include <boost/signals2/signal.hpp>
 #include <osl/conditn.hxx>
 #include <osl/diagnose.h>
 #include <osl/diagnose.hxx>
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 9d0bc7e..c474cd3 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -21,8 +21,6 @@
 
 #include <set>
 
-#include <boost/signals2/connection.hpp>
-
 #include <comphelper/string.hxx>
 #include <tools/debug.hxx>
 #include <tools/rc.h>
@@ -61,7 +59,6 @@ struct ComboBox::Impl
     sal_Int32           m_nMaxWidthChars;
     Link<ComboBox&,void>               m_SelectHdl;
     Link<ComboBox&,void>               m_DoubleClickHdl;
-    boost::signals2::scoped_connection m_AutocompleteConnection;
 
     explicit Impl(ComboBox & rThis)
         : m_rThis(rThis)
@@ -82,13 +79,12 @@ struct ComboBox::Impl
     DECL_DLLPRIVATE_LINK_TYPED( ImplSelectHdl, LinkParamNone*, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplCancelHdl, LinkParamNone*, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplDoubleClickHdl, ImplListBoxWindow*, void );
+    DECL_DLLPRIVATE_LINK_TYPED( ImplClickBtnHdl, void*, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplPopupModeEndHdl, FloatingWindow*, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplSelectionChangedHdl, sal_Int32, void );
+    DECL_DLLPRIVATE_LINK_TYPED( ImplUserDrawHdl, UserDrawEvent*, void );
+    DECL_DLLPRIVATE_LINK_TYPED( ImplAutocompleteHdl, Edit&, void );
     DECL_DLLPRIVATE_LINK_TYPED( ImplListItemSelectHdl , LinkParamNone*, void );
-
-    void ImplClickButtonHandler( ImplBtn* );
-    void ImplUserDrawHandler( UserDrawEvent* );
-    void ImplAutocompleteHandler( Edit* );
 };
 
 
@@ -215,8 +211,7 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
 
         m_pImpl->m_pBtn = VclPtr<ImplBtn>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE );
         ImplInitDropDownButton( m_pImpl->m_pBtn );
-        m_pImpl->m_pBtn->buttonDownSignal.connect( [this]( ImplBtn* pImplBtn )
-                                                   { this->m_pImpl->ImplClickButtonHandler( pImplBtn ); } );
+        m_pImpl->m_pBtn->SetMBDownHdl( LINK( m_pImpl.get(), ComboBox::Impl, ImplClickBtnHdl ) );
         m_pImpl->m_pBtn->Show();
 
         nEditStyle |= WB_NOBORDER;
@@ -248,8 +243,7 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
     m_pImpl->m_pImplLB->SetSelectHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplSelectHdl) );
     m_pImpl->m_pImplLB->SetCancelHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplCancelHdl) );
     m_pImpl->m_pImplLB->SetDoubleClickHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplDoubleClickHdl) );
-    m_pImpl->m_pImplLB->userDrawSignal.connect( [this]( UserDrawEvent* pUserDrawEvent )
-                                                { this->m_pImpl->ImplUserDrawHandler( pUserDrawEvent ); } );
+    m_pImpl->m_pImplLB->SetUserDrawHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplUserDrawHdl) );
     m_pImpl->m_pImplLB->SetSelectionChangedHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplSelectionChangedHdl) );
     m_pImpl->m_pImplLB->SetListItemSelectHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplListItemSelectHdl) );
     m_pImpl->m_pImplLB->Show();
@@ -293,25 +287,17 @@ void ComboBox::EnableAutocomplete( bool bEnable, bool bMatchCase )
     m_pImpl->m_isMatchCase = bMatchCase;
 
     if ( bEnable )
-    {
-        if( !m_pImpl->m_AutocompleteConnection.connected())
-        {
-            m_pImpl->m_pSubEdit->SignalConnectAutocomplete(
-                &m_pImpl->m_AutocompleteConnection,
-                [this] (Edit *const pEdit) { m_pImpl->ImplAutocompleteHandler(pEdit); }
-                );
-        }
-    }
+        m_pImpl->m_pSubEdit->SetAutocompleteHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplAutocompleteHdl) );
     else
-        m_pImpl->m_AutocompleteConnection.disconnect();
+        m_pImpl->m_pSubEdit->SetAutocompleteHdl( Link<Edit&,void>() );
 }
 
 bool ComboBox::IsAutocompleteEnabled() const
 {
-    return m_pImpl->m_AutocompleteConnection.connected();
+    return m_pImpl->m_pSubEdit->GetAutocompleteHdl().IsSet();
 }
 
-void ComboBox::Impl::ImplClickButtonHandler( ImplBtn* )
+IMPL_LINK_NOARG_TYPED(ComboBox::Impl, ImplClickBtnHdl, void*, void)
 {
     m_rThis.CallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
     m_pSubEdit->GrabFocus();
@@ -352,10 +338,10 @@ IMPL_LINK_NOARG_TYPED(ComboBox::Impl, ImplPopupModeEndHdl, FloatingWindow*, void
     m_rThis.CallEventListeners( VCLEVENT_DROPDOWN_CLOSE );
 }
 
-void ComboBox::Impl::ImplAutocompleteHandler( Edit* pEdit )
+IMPL_LINK_TYPED(ComboBox::Impl, ImplAutocompleteHdl, Edit&, rEdit, void)
 {
-    Selection           aSel = pEdit->GetSelection();
-    AutocompleteAction  eAction = pEdit->GetAutocompleteAction();
+    Selection           aSel = rEdit.GetSelection();
+    AutocompleteAction  eAction = rEdit.GetAutocompleteAction();
 
     /* If there is no current selection do not auto complete on
        Tab/Shift-Tab since then we would not cycle to the next field.
@@ -363,7 +349,7 @@ void ComboBox::Impl::ImplAutocompleteHandler( Edit* pEdit )
     if ( aSel.Len() ||
          ((eAction != AUTOCOMPLETE_TABFORWARD) && (eAction != AUTOCOMPLETE_TABBACKWARD)) )
     {
-        OUString    aFullText = pEdit->GetText();
+        OUString    aFullText = rEdit.GetText();
         OUString    aStartText = aFullText.copy( 0, (sal_Int32)aSel.Max() );
         sal_Int32   nStart = m_pImplLB->GetCurrentPos();
 
@@ -407,7 +393,7 @@ void ComboBox::Impl::ImplAutocompleteHandler( Edit* pEdit )
         {
             OUString aText = m_pImplLB->GetEntryList()->GetEntryText( nPos );
             Selection aSelection( aText.getLength(), aStartText.getLength() );
-            pEdit->SetText( aText, aSelection );
+            rEdit.SetText( aText, aSelection );
         }
     }
 }
@@ -1319,7 +1305,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D
 
 }
 
-void ComboBox::Impl::ImplUserDrawHandler( UserDrawEvent* pEvent )
+IMPL_LINK_TYPED(ComboBox::Impl, ImplUserDrawHdl, UserDrawEvent*, pEvent, void)
 {
     m_rThis.UserDraw(*pEvent);
 }
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7520cb4..5af9723 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -66,8 +66,6 @@
 
 #include <officecfg/Office/Common.hxx>
 
-#include <boost/signals2/signal.hpp>
-
 #include <memory>
 
 using namespace ::com::sun::star;
@@ -157,21 +155,14 @@ void Impl_IMEInfos::DestroyAttribs()
     nLen = 0;
 }
 
-struct Edit::Impl
-{
-    boost::signals2::signal< void (Edit *) > m_AutocompleteSignal;
-};
-
 Edit::Edit( WindowType nType )
     : Control( nType )
-    , m_pImpl(new Impl)
 {
     ImplInitEditData();
 }
 
 Edit::Edit( vcl::Window* pParent, WinBits nStyle )
     : Control( WINDOW_EDIT )
-    , m_pImpl(new Impl)
 {
     ImplInitEditData();
     ImplInit( pParent, nStyle );
@@ -179,7 +170,6 @@ Edit::Edit( vcl::Window* pParent, WinBits nStyle )
 
 Edit::Edit( vcl::Window* pParent, const ResId& rResId )
     : Control( WINDOW_EDIT )
-    , m_pImpl(new Impl)
 {
     rResId.SetRT( RSC_EDIT );
     WinBits nStyle = ImplInitRes( rResId );
@@ -1659,12 +1649,12 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
                         ImplCopyToSelectionClipboard();
                     }
 
-                    if (bGoEnd && !m_pImpl->m_AutocompleteSignal.empty() && !rKEvt.GetKeyCode().GetModifier())
+                    if (bGoEnd && maAutocompleteHdl.IsSet() && !rKEvt.GetKeyCode().GetModifier())
                     {
                         if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) )
                         {
                             meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
-                            m_pImpl->m_AutocompleteSignal( this );
+                            maAutocompleteHdl.Call(*this);
                         }
                     }
 
@@ -1759,12 +1749,12 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
                     if ( !mbReadOnly )
                     {
                         ImplInsertText(OUString(rKEvt.GetCharCode()), nullptr, true);
-                        if (!m_pImpl->m_AutocompleteSignal.empty())
+                        if (maAutocompleteHdl.IsSet())
                         {
                             if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) )
                             {
                                 meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
-                                m_pImpl->m_AutocompleteSignal( this );
+                                maAutocompleteHdl.Call(*this);
                             }
                         }
                     }
@@ -2125,12 +2115,12 @@ void Edit::Command( const CommandEvent& rCEvt )
         Invalidate();
 
         // #i25161# call auto complete handler for ext text commit also
-        if (m_pImpl->m_AutocompleteSignal.empty())
+        if (maAutocompleteHdl.IsSet())
         {
             if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) )
             {
                 meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
-                m_pImpl->m_AutocompleteSignal( this );
+                maAutocompleteHdl.Call(*this);
             }
         }
     }
@@ -2752,7 +2742,7 @@ void Edit::SetSubEdit(Edit* pEdit)
         mpSubEdit->mbIsSubEdit = true;
 
         mpSubEdit->SetReadOnly(mbReadOnly);
-        mpSubEdit->m_pImpl->m_AutocompleteSignal.connect(m_pImpl->m_AutocompleteSignal);
+        mpSubEdit->maAutocompleteHdl = maAutocompleteHdl;
     }
 }
 
@@ -3079,14 +3069,4 @@ Selection Edit::GetSurroundingTextSelection() const
   return GetSelection();
 }
 
-void Edit::SignalConnectAutocomplete(
-        boost::signals2::connection *const pConnection,
-        std::function<void (Edit *)> slot)
-{
-    boost::signals2::connection const& rConnection(
-            m_pImpl->m_AutocompleteSignal.connect(slot));
-    if (pConnection)
-        *pConnection = rConnection;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 65fd57a..ed3d39c 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -1745,7 +1745,7 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32
         nCurr = sal::static_int_cast<sal_Int32>(nCurr - GetEntryList()->GetMRUCount());
 
         UserDrawEvent aUDEvt(this, &rRenderContext, aRect, nPos, nCurr);
-        userDrawSignal(&aUDEvt);
+        maUserDrawHdl.Call( &aUDEvt );
         mbInUserDraw = false;
     }
     else
@@ -2136,8 +2136,6 @@ ImplListBox::ImplListBox( vcl::Window* pParent, WinBits nWinStyle ) :
     Control( pParent, nWinStyle ),
     maLBWindow(VclPtr<ImplListBoxWindow>::Create( this, nWinStyle&(~WB_BORDER) ))
 {
-    maLBWindow->userDrawSignal.connect( userDrawSignal );
-
     // for native widget rendering we must be able to detect this window type
     SetType( WINDOW_LISTBOXWINDOW );
 
@@ -2611,8 +2609,8 @@ ImplWin::ImplWin( vcl::Window* pParent, WinBits nWinStyle ) :
 
 void ImplWin::MBDown()
 {
-    if( IsEnabled() )
-        buttonDownSignal( this );
+    if (IsEnabled())
+        maMBDownHdl.Call(this);
 }
 
 void ImplWin::MouseButtonDown( const MouseEvent& )
@@ -2751,7 +2749,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
     {
         mbInUserDraw = true;
         UserDrawEvent aUDEvt(this, &rRenderContext, maFocusRect, mnItemPos, 0);
-        userDrawSignal( &aUDEvt );
+        maUserDrawHdl.Call( &aUDEvt );
         mbInUserDraw = false;
     }
     else
@@ -2921,8 +2919,8 @@ ImplBtn::ImplBtn( vcl::Window* pParent, WinBits nWinStyle ) :
 
 void ImplBtn::MBDown()
 {
-    if( IsEnabled() )
-       buttonDownSignal( this );
+    if (IsEnabled())
+        maMBDownHdl.Call(this);
 }
 
 void ImplBtn::MouseButtonDown( const MouseEvent& )
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index e7cc026..ba78bc6 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -137,18 +137,15 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
         mpFloatWin->GetDropTarget()->addDropTargetListener(xDrop);
 
         mpImplWin = VclPtr<ImplWin>::Create( this, (nStyle & (WB_LEFT|WB_RIGHT|WB_CENTER))|WB_NOBORDER );
-        mpImplWin->buttonDownSignal.connect( [this]( Control* pControl )
-                                             { this->ImplClickButtonHandler( pControl ); } );
-        mpImplWin->userDrawSignal.connect( [this]( UserDrawEvent* pUserDrawEvent )
-                                           { this->ImplUserDrawHandler( pUserDrawEvent ); } );
+        mpImplWin->SetMBDownHdl( LINK( this, ListBox, ImplClickBtnHdl ) );
+        mpImplWin->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl ) );
         mpImplWin->Show();
         mpImplWin->GetDropTarget()->addDropTargetListener(xDrop);
         mpImplWin->SetEdgeBlending(GetEdgeBlending());
 
         mpBtn = VclPtr<ImplBtn>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE );
         ImplInitDropDownButton( mpBtn );
-        mpBtn->buttonDownSignal.connect( [this]( Control* pControl )
-                                         { this->ImplClickButtonHandler( pControl ); } );
+        mpBtn->SetMBDownHdl( LINK( this, ListBox, ImplClickBtnHdl ) );
         mpBtn->Show();
         mpBtn->GetDropTarget()->addDropTargetListener(xDrop);
     }
@@ -161,8 +158,7 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
     mpImplLB->SetScrollHdl( LINK( this, ListBox, ImplScrollHdl ) );
     mpImplLB->SetCancelHdl( LINK( this, ListBox, ImplCancelHdl ) );
     mpImplLB->SetDoubleClickHdl( LINK( this, ListBox, ImplDoubleClickHdl ) );
-    mpImplLB->userDrawSignal.connect( [this]( UserDrawEvent* pUserDrawEvent )
-                                      { this->ImplUserDrawHandler( pUserDrawEvent ); } );
+    mpImplLB->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl ) );
     mpImplLB->SetFocusHdl( LINK( this, ListBox, ImplFocusHdl ) );
     mpImplLB->SetListItemSelectHdl( LINK( this, ListBox, ImplListItemSelectHdl ) );
     mpImplLB->SetPosPixel( Point() );
@@ -294,7 +290,7 @@ IMPL_LINK_NOARG_TYPED(ListBox, ImplDoubleClickHdl, ImplListBoxWindow*, void)
     DoubleClick();
 }
 
-void ListBox::ImplClickButtonHandler( Control* )
+IMPL_LINK_NOARG_TYPED(ListBox, ImplClickBtnHdl, void*, void)
 {
     if( !mpFloatWin->IsInPopupMode() )
     {
@@ -1381,7 +1377,7 @@ void ListBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines
     }
 }
 
-void ListBox::ImplUserDrawHandler( UserDrawEvent* pEvent )
+IMPL_LINK_TYPED( ListBox, ImplUserDrawHdl, UserDrawEvent*, pEvent, void )
 {
     UserDraw( *pEvent );
 }


More information about the Libreoffice-commits mailing list