diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-22 12:26:29 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-22 18:54:52 +0000 |
commit | a19f981ea1c31a9a3af4a9368dc50f045701a047 (patch) | |
tree | 12f2c8415eab22c334a2722b5472a62d1c8abbff /sw | |
parent | c439d55042c5815b57987238b0e074869004196d (diff) |
convert Link<> to typed
Change-Id: I684a72cc3eeff0caf27132ff641f0d3b20ff7c08
Reviewed-on: https://gerrit.libreoffice.org/18770
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewdraw.cxx | 7 |
4 files changed, 8 insertions, 10 deletions
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index d4227e2598fb..8a2d5b777c36 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -433,7 +433,7 @@ public: void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM ); bool ExecSmartTagPopup( const Point& rPt ); - DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*); + DECL_LINK_TYPED( OnlineSpellCallback, SpellCallbackInfo&, void ); bool ExecDrwTextSpellPopup(const Point& rPt); void SetTabColFromDocPos( const Point &rPt ) { m_aTabColFromDocPos = rPt; } diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 1393fba85a25..d9d84f1ece05 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -317,13 +317,12 @@ void SidebarTextControl::MouseButtonUp( const MouseEvent& rMEvt ) GetTextView()->MouseButtonUp( rMEvt ); } -IMPL_LINK( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo*, pInfo ) +IMPL_LINK_TYPED( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void ) { - if ( pInfo->nCommand == SpellCallbackCommand::STARTSPELLDLG ) + if ( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG ) { mrDocView.GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON); } - return 0; } IMPL_LINK_TYPED( SidebarTextControl, Select, Menu*, pSelMenu, bool ) @@ -340,7 +339,7 @@ void SidebarTextControl::Command( const CommandEvent& rCEvt ) GetTextView() && GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(), true )) { - Link<> aLink = LINK(this, SidebarTextControl, OnlineSpellCallback); + Link<SpellCallbackInfo&,void> aLink = LINK(this, SidebarTextControl, OnlineSpellCallback); GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink); } else diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx index 74745852d623..99992b432e89 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.hxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx @@ -64,7 +64,7 @@ class SidebarTextControl : public Control OutlinerView* GetTextView() const; - DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*); + DECL_LINK_TYPED( OnlineSpellCallback, SpellCallbackInfo&, void ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index d342512ac89f..5001cee6fcf2 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -725,11 +725,10 @@ bool SwView::HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const } //#i87414# mod -IMPL_LINK(SwView, OnlineSpellCallback, SpellCallbackInfo*, pInfo) +IMPL_LINK_TYPED(SwView, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void) { - if (pInfo->nCommand == SpellCallbackCommand::STARTSPELLDLG) + if (rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG) GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON); - return 0; } bool SwView::ExecDrwTextSpellPopup(const Point& rPt) @@ -742,7 +741,7 @@ bool SwView::ExecDrwTextSpellPopup(const Point& rPt) if (pOLV->IsWrongSpelledWordAtPos( aPos )) { bRet = true; - Link<> aLink = LINK(this, SwView, OnlineSpellCallback); + Link<SpellCallbackInfo&,void> aLink = LINK(this, SwView, OnlineSpellCallback); pOLV->ExecuteSpellPopup( aPos,&aLink ); } return bRet; |