diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-18 13:38:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-18 15:48:31 +0000 |
commit | 548c2274c9ba7542d6bcae5fefd1400ee4e22fc3 (patch) | |
tree | 7963bec49ed00b89090bd213a7db36a85bc88f87 /svtools | |
parent | 423b79e7366203db3f57dea75b8cb9eb852b5614 (diff) |
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@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
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/autocmpledit.cxx | 5 | ||||
-rw-r--r-- | svtools/source/control/inettbc.cxx | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/svtools/source/control/autocmpledit.cxx b/svtools/source/control/autocmpledit.cxx index 8032b6e9c7c3..737f14056345 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 ad7162407709..98555b7b0db1 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() ) |