sw/source/ui/dbui/mmaddressblockpage.cxx | 11 +++++------ sw/source/ui/dbui/mmaddressblockpage.hxx | 14 +++++++------- 2 files changed, 12 insertions(+), 13 deletions(-)
New commits: commit 9b47e752419b03b96e17cb776eb4db374a6d09c1 Author: Noel Grandin <n...@peralex.com> Date: Fri Sep 18 09:03:07 2015 +0200 convert Link<> to typed Change-Id: I8db191c87e80b11fe20370703f4bd6780d18f378 Reviewed-on: https://gerrit.libreoffice.org/18695 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index e0821ee..4b4d6b7 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -668,19 +668,19 @@ bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData) return m_pDragED->GetText().indexOf("<" + sEntry + ">") >= 0; } -IMPL_LINK(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, AddressMultiLineEdit*, pEdit) +IMPL_LINK_TYPED(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, AddressMultiLineEdit&, rEdit, void) { // called in case the selection of the edit field changes. // determine selection - if it's one of the editable fields then // enable the related ComboBox and fill it static bool bOnEntry = false; if(bOnEntry) - return 0; + return; bOnEntry = true; sal_Int32 nSelected = GetSelectedItem_Impl(); if(USER_DATA_NONE != nSelected) - pEdit->SelectCurrentItem(); + rEdit.SelectCurrentItem(); if(m_pFieldCB->IsVisible() && (USER_DATA_NONE != nSelected) && (nSelected < 0)) { @@ -718,7 +718,6 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, AddressMultiL UpdateImageButtons_Impl(); bOnEntry = false; - return 0; } IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl) @@ -1354,7 +1353,7 @@ void AddressMultiLineEdit::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) if (rTextHint.GetId() == TEXT_HINT_VIEWSELECTIONCHANGED || rTextHint.GetId() == TEXT_HINT_VIEWCARETCHANGED) { - m_aSelectionLink.Call(this); + m_aSelectionLink.Call(*this); } } } @@ -1457,7 +1456,7 @@ void AddressMultiLineEdit::InsertNewEntryAtPosition( const OUString& rStr, sal_u TextSelection aEntrySel(aInsertPos); ExtTextView* pTextView = GetTextView(); pTextView->SetSelection(aEntrySel); - m_aSelectionLink.Call(this); + m_aSelectionLink.Call(*this); } void AddressMultiLineEdit::RemoveCurrentEntry() diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index c216408..8e9fe5d 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -110,12 +110,12 @@ public: virtual ~SwSelectAddressBlockDialog(); virtual void dispose() SAL_OVERRIDE; - void SetAddressBlocks(const com::sun::star::uno::Sequence< OUString>& rBlocks, + void SetAddressBlocks(const css::uno::Sequence< OUString>& rBlocks, sal_uInt16 nSelected); - const com::sun::star::uno::Sequence< OUString>& GetAddressBlocks(); + const css::uno::Sequence< OUString>& GetAddressBlocks(); - void SetSettings(bool bIsCountry, const OUString& sCountry); - bool IsIncludeCountry() const {return !m_pNeverRB->IsChecked();} + void SetSettings(bool bIsCountry, const OUString& sCountry); + bool IsIncludeCountry() const {return !m_pNeverRB->IsChecked();} OUString GetCountry() const; }; @@ -140,7 +140,7 @@ public: class AddressMultiLineEdit : public VclMultiLineEdit, public SfxListener { - Link<> m_aSelectionLink; + Link<AddressMultiLineEdit&,void> m_aSelectionLink; VclPtr<SwCustomizeAddressBlockDialog> m_pParentDialog; using VclMultiLineEdit::Notify; @@ -160,7 +160,7 @@ public: virtual Size GetOptimalSize() const SAL_OVERRIDE; - void SetSelectionChangedHdl( const Link<>& rLink ) {m_aSelectionLink = rLink;} + void SetSelectionChangedHdl( const Link<AddressMultiLineEdit&,void>& rLink ) {m_aSelectionLink = rLink;} void SetText( const OUString& rStr ) SAL_OVERRIDE; OUString GetAddress(); @@ -224,7 +224,7 @@ private: DECL_LINK_TYPED(ListBoxSelectHdl_Impl, SvTreeListBox*, void); DECL_LINK(EditModifyHdl_Impl, void *); DECL_LINK_TYPED(ImageButtonHdl_Impl, Button*, void); - DECL_LINK(SelectionChangedHdl_Impl, AddressMultiLineEdit*); + DECL_LINK_TYPED(SelectionChangedHdl_Impl, AddressMultiLineEdit&, void); DECL_LINK(FieldChangeHdl_Impl, void *); bool HasItem_Impl(sal_Int32 nUserData); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits