[Libreoffice-commits] core.git: sw/source
Noel Grandin
noelgrandin at gmail.com
Wed Sep 23 06:05:48 PDT 2015
sw/source/ui/index/cnttab.cxx | 26 ++++++++++++--------------
sw/source/uibase/inc/swuicnttab.hxx | 2 +-
2 files changed, 13 insertions(+), 15 deletions(-)
New commits:
commit bd9adac7753113a9f03e52b43bf238c4889b918d
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Tue Sep 22 21:45:56 2015 +0200
convert Link<> to typed
Change-Id: I210ea5a66ebb78d6aa93c53e95ddf00e93fd81e0
Reviewed-on: https://gerrit.libreoffice.org/18797
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index e663612..fdab9dc 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 e395ad2..8d74ab9 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 );
More information about the Libreoffice-commits
mailing list