summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-09-22 21:45:56 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-09-23 13:05:18 +0000
commitbd9adac7753113a9f03e52b43bf238c4889b918d (patch)
treeb9a7ec750218b1f255204ea8c5d87eb026ca9066 /sw/source
parent4842877a91622f69ed0a861b202cf8e345119549 (diff)
convert Link<> to typed
Change-Id: I210ea5a66ebb78d6aa93c53e95ddf00e93fd81e0 Reviewed-on: https://gerrit.libreoffice.org/18797 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/index/cnttab.cxx26
-rw-r--r--sw/source/uibase/inc/swuicnttab.hxx2
2 files changed, 13 insertions, 15 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index e663612a1bc1..fdab9dc634a8 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1603,10 +1603,10 @@ void SwTOXEdit::AdjustSize()
class SwTOXButton : public PushButton
{
- SwFormToken aFormToken;
- Link<> aPrevNextControlLink;
- bool bNextControl;
- VclPtr<SwTokenWindow> m_pParent;
+ SwFormToken aFormToken;
+ Link<SwTOXButton&,void> aPrevNextControlLink;
+ bool bNextControl;
+ VclPtr<SwTokenWindow> m_pParent;
public:
SwTOXButton( vcl::Window* pParent, SwTokenWindow* pTokenWin,
const SwFormToken& rToken)
@@ -1623,7 +1623,7 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
bool IsNextControl() const {return bNextControl;}
- void SetPrevNextLink(const Link<>& rLink) {aPrevNextControlLink = rLink;}
+ void SetPrevNextLink(const Link<SwTOXButton&,void>& rLink) {aPrevNextControlLink = rLink;}
const SwFormToken& GetFormToken() const {return aFormToken;}
void SetCharStyleName(const OUString& rSet, sal_uInt16 nPoolId)
@@ -1721,7 +1721,7 @@ void SwTOXButton::KeyInput( const KeyEvent& rKEvt )
}
}
if(bCall && aPrevNextControlLink.IsSet())
- aPrevNextControlLink.Call(this);
+ aPrevNextControlLink.Call(*this);
else
PushButton::KeyInput(rKEvt);
}
@@ -3502,19 +3502,19 @@ IMPL_LINK(SwTokenWindow, TbxFocusHdl, SwTOXEdit*, pEdit)
return 0;
}
-IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn )
+IMPL_LINK_TYPED(SwTokenWindow, NextItemBtnHdl, SwTOXButton&, rBtn, void )
{
- ctrl_iterator it = std::find(aControlList.begin(),aControlList.end(),pBtn);
+ ctrl_iterator it = std::find(aControlList.begin(),aControlList.end(),&rBtn);
if (it == aControlList.end())
- return 0;
+ return;
ctrl_iterator itTest = it;
++itTest;
- if (!pBtn->IsNextControl() || (itTest != aControlList.end() && pBtn->IsNextControl()))
+ if (!rBtn.IsNextControl() || (itTest != aControlList.end() && rBtn.IsNextControl()))
{
- bool isNext = pBtn->IsNextControl();
+ bool isNext = rBtn.IsNextControl();
ctrl_iterator iterFocus = it;
isNext ? ++iterFocus : --iterFocus;
@@ -3533,12 +3533,10 @@ IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn )
static_cast<SwTOXEdit*>(pCtrlFocus)->SetSelection(aSel);
- pBtn->Check(false);
+ rBtn.Check(false);
AdjustScrolling();
}
-
- return 0;
}
IMPL_LINK(SwTokenWindow, TbxFocusBtnHdl, SwTOXButton*, pBtn )
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index e395ad2351ca..8d74ab91da88 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -270,7 +270,7 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer
DECL_LINK(EditResize, Edit*);
DECL_LINK_TYPED(NextItemHdl, SwTOXEdit&, void );
DECL_LINK(TbxFocusHdl, SwTOXEdit* );
- DECL_LINK(NextItemBtnHdl, SwTOXButton* );
+ DECL_LINK_TYPED(NextItemBtnHdl, SwTOXButton&, void );
DECL_LINK(TbxFocusBtnHdl, SwTOXButton* );
DECL_LINK_TYPED(ScrollHdl, Button*, void );