sw/source/ui/index/swuiidxmrk.cxx | 20 ++++++++++---------- sw/source/uibase/inc/swuiidxmrk.hxx | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-)
New commits: commit aada49a5743c298e461660420fe48ef4c220e292 Author: Noel Grandin <noelgran...@gmail.com> Date: Tue Sep 22 21:48:35 2015 +0200 convert Link<> to typed Change-Id: I39f08451c546865327f2f1014cfa33c78cdcdc9b Reviewed-on: https://gerrit.libreoffice.org/18798 Reviewed-by: Noel Grandin <noelgran...@gmail.com> Tested-by: Noel Grandin <noelgran...@gmail.com> diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 269731c..879b27b 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -981,7 +981,7 @@ class SwCreateAuthEntryDlg_Impl : public ModalDialog VclPtr<OKButton> m_pOKBT; - Link<> aShortNameCheckLink; + Link<Edit*,bool> aShortNameCheckLink; SwWrtShell& rWrtSh; @@ -1003,7 +1003,7 @@ public: OUString GetEntryText(ToxAuthorityField eField) const; - void SetCheckNameHdl(const Link<>& rLink) {aShortNameCheckLink = rLink;} + void SetCheckNameHdl(const Link<Edit*,bool>& rLink) {aShortNameCheckLink = rLink;} }; @@ -1332,10 +1332,10 @@ IMPL_LINK_TYPED(SwAuthorMarkPane, ChangeSourceHdl, Button*, pButton, void) IMPL_LINK(SwAuthorMarkPane, EditModifyHdl, Edit*, pEdit) { - Link<> aAllowed = LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl); - long nResult = aAllowed.Call(pEdit); - m_pActionBT->Enable(nResult > 0); - if(nResult) + Link<Edit*,bool> aAllowed = LINK(this, SwAuthorMarkPane, IsEntryAllowedHdl); + bool bResult = aAllowed.Call(pEdit); + m_pActionBT->Enable(bResult); + if(bResult) { OUString sEntry(pEdit->GetText()); m_sFields[AUTH_FIELD_IDENTIFIER] = sEntry; @@ -1344,14 +1344,14 @@ IMPL_LINK(SwAuthorMarkPane, EditModifyHdl, Edit*, pEdit) return 0; }; -IMPL_LINK(SwAuthorMarkPane, IsEntryAllowedHdl, Edit*, pEdit) +IMPL_LINK_TYPED(SwAuthorMarkPane, IsEntryAllowedHdl, Edit*, pEdit, bool) { OUString sEntry = pEdit->GetText(); bool bAllowed = false; if(!sEntry.isEmpty()) { if(m_pEntryLB->GetEntryPos(sEntry) != LISTBOX_ENTRY_NOTFOUND) - return 0; + return false; else if(bIsFromComponent) { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( @@ -1363,7 +1363,7 @@ IMPL_LINK(SwAuthorMarkPane, IsEntryAllowedHdl, Edit*, pEdit) bAllowed = !xBibAccess.is() || !xBibAccess->hasByName(sEntry); } } - return bAllowed ? 1 : 0; + return bAllowed; } void SwAuthorMarkPane::InitControls() @@ -1581,7 +1581,7 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, ShortNameHdl, Edit*, pEdit) { if(aShortNameCheckLink.IsSet()) { - bool bEnable = 0 != aShortNameCheckLink.Call(pEdit); + bool bEnable = aShortNameCheckLink.Call(pEdit); m_bNameAllowed |= bEnable; m_pOKBT->Enable(pTypeListBox->GetSelectEntryCount() && bEnable); } diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx index 40772ab..1e394b4 100644 --- a/sw/source/uibase/inc/swuiidxmrk.hxx +++ b/sw/source/uibase/inc/swuiidxmrk.hxx @@ -210,7 +210,7 @@ class SwAuthorMarkPane DECL_LINK_TYPED(CreateEntryHdl, Button*, void); DECL_LINK(CompEntryHdl, ListBox*); DECL_LINK_TYPED(ChangeSourceHdl, Button*, void); - DECL_LINK(IsEntryAllowedHdl, Edit*); + DECL_LINK_TYPED(IsEntryAllowedHdl, Edit*, bool); DECL_LINK(EditModifyHdl, Edit*); void InitControls(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits