diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-16 12:35:30 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-16 12:35:54 +0200 |
commit | 8d44385bf64c1ea9bdb9100fc7ed005ac7071968 (patch) | |
tree | 4d0897a98757d40ff212f2328a9a8bd433aeaf61 /desktop/source | |
parent | e324766d54ef67625b4ca9ba727a95316c2a1dc5 (diff) |
convert Link<> to typed
Change-Id: I48893ac7130ad671864faa5eb55409b21cdda77e
Diffstat (limited to 'desktop/source')
5 files changed, 13 insertions, 21 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index c8c3954aa1bc..a1c31072ade3 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -1072,11 +1072,9 @@ IMPL_LINK_NOARG_TYPED(ExtMgrDialog, HandleUpdateBtn, Button*, void) } -IMPL_LINK( ExtMgrDialog, HandleHyperlink, FixedHyperlink*, pHyperlink ) +IMPL_LINK_TYPED( ExtMgrDialog, HandleHyperlink, FixedHyperlink&, rHyperlink, void ) { - openWebBrowser( pHyperlink->GetURL(), GetText() ); - - return 1; + openWebBrowser( rHyperlink.GetURL(), GetText() ); } @@ -1404,11 +1402,9 @@ IMPL_LINK_NOARG_TYPED(UpdateRequiredDialog, HandleCloseBtn, Button*, void) } -IMPL_LINK( UpdateRequiredDialog, HandleHyperlink, FixedHyperlink*, pHyperlink ) +IMPL_LINK_TYPED( UpdateRequiredDialog, HandleHyperlink, FixedHyperlink&, rHyperlink, void ) { - openWebBrowser( pHyperlink->GetURL(), GetText() ); - - return 1; + openWebBrowser( rHyperlink.GetURL(), GetText() ); } diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 1038f095ab90..f5bf065b3a1a 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -136,7 +136,7 @@ class ExtMgrDialog : public ModelessDialog, DECL_DLLPRIVATE_LINK_TYPED( HandleCancelBtn, Button*, void ); DECL_DLLPRIVATE_LINK_TYPED( HandleCloseBtn, Button*, void ); DECL_DLLPRIVATE_LINK_TYPED( HandleExtTypeCbx, Button*, void ); - DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * ); + DECL_DLLPRIVATE_LINK_TYPED( HandleHyperlink, FixedHyperlink&, void ); DECL_DLLPRIVATE_LINK_TYPED(TimeOutHdl, Idle *, void); DECL_DLLPRIVATE_LINK_TYPED( startProgress, void *, void ); @@ -202,7 +202,7 @@ class UpdateRequiredDialog : public ModalDialog, DECL_DLLPRIVATE_LINK_TYPED( HandleCancelBtn, Button*, void ); DECL_DLLPRIVATE_LINK_TYPED(TimeOutHdl, Idle *, void); DECL_DLLPRIVATE_LINK_TYPED( startProgress, void *, void ); - DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * ); + DECL_DLLPRIVATE_LINK_TYPED( HandleHyperlink, FixedHyperlink&, void ); static bool isEnabled( const css::uno::Reference< css::deployment::XPackage > &xPackage ); static bool checkDependencies( const css::uno::Reference< css::deployment::XPackage > &xPackage ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 1a58a17fe25f..b6db33572548 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -126,7 +126,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox Image m_aWarningImage; Image m_aDefaultImage; - Link<> m_aClickHdl; + Link<FixedHyperlink&,void> m_aClickHdl; VclPtr<ScrollBar> m_pScrollBar; @@ -190,7 +190,7 @@ public: long PointToPos( const Point& rPos ); void SetScrollHdl( const Link<ScrollBar*,void>& rLink ); void DoScroll( long nDelta ); - void SetHyperlinkHdl( const Link<>& rLink ){ m_aClickHdl = rLink; } + void SetHyperlinkHdl( const Link<FixedHyperlink&,void>& rLink ){ m_aClickHdl = rLink; } virtual void RecalcAll(); void RemoveUnlocked(); diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 7b6133cce877..3cc0935f1114 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -922,7 +922,7 @@ void UpdateDialog::initDescription() m_pReleaseNotesLabel->Hide(); m_pReleaseNotesLink->Hide(); - Link<> aLink = LINK( this, UpdateDialog, hyperlink_clicked ); + Link<FixedHyperlink&,void> aLink = LINK( this, UpdateDialog, hyperlink_clicked ); m_pPublisherLink->SetClickHdl( aLink ); m_pReleaseNotesLink->SetClickHdl( aLink ); } @@ -1319,13 +1319,11 @@ IMPL_LINK_NOARG_TYPED(UpdateDialog, closeHandler, Button*, void) EndDialog(); } -IMPL_LINK( UpdateDialog, hyperlink_clicked, FixedHyperlink*, pHyperlink ) +IMPL_LINK_TYPED( UpdateDialog, hyperlink_clicked, FixedHyperlink&, rHyperlink, void ) { - OUString sURL; - if ( pHyperlink ) - sURL = OUString( pHyperlink->GetURL() ); + OUString sURL = rHyperlink.GetURL(); if ( sURL.isEmpty() ) - return 0; + return; try { @@ -1337,8 +1335,6 @@ IMPL_LINK( UpdateDialog, hyperlink_clicked, FixedHyperlink*, pHyperlink ) catch ( const uno::Exception& ) { } - - return 1; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index fc1ab43029e1..ce0c6394ecc4 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -163,7 +163,7 @@ private: DECL_LINK_TYPED(allHandler, CheckBox&, void); DECL_LINK_TYPED(okHandler, Button*, void); DECL_LINK_TYPED(closeHandler, Button*, void); - DECL_LINK(hyperlink_clicked, FixedHyperlink *); + DECL_LINK_TYPED(hyperlink_clicked, FixedHyperlink&, void); css::uno::Reference< css::uno::XComponentContext > m_context; VclPtr<FixedText> m_pchecking; |