diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-20 10:49:24 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-20 12:48:43 +0200 |
commit | f0006e79c4112b06b65c098722729b9a3f3301c7 (patch) | |
tree | ac7dcac47f7c8da208484f91c55a1abc11b742be /cui/source/dialogs | |
parent | 168463ed0537a5a9737aa5226657af1e263d0036 (diff) |
Handle link click directly in FixedHyperlink
Change-Id: I5b5f0648b6e6432b0928351a17d285df8c9da811
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index a08ec7546344..7d76879a1dec 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -39,8 +39,6 @@ #include <com/sun/star/lang/XServiceDisplayName.hpp> #include <com/sun/star/linguistic2/SpellFailure.hpp> #include <com/sun/star/frame/XStorable.hpp> -#include <com/sun/star/system/SystemShellExecuteFlags.hpp> -#include <com/sun/star/system/SystemShellExecute.hpp> #include <sfx2/app.hxx> #include <vcl/help.hxx> #include <vcl/graph.hxx> @@ -308,8 +306,6 @@ void SpellDialog::Init_Impl() m_pLanguageLB->SetSelectHdl(LINK( this, SpellDialog, LanguageSelectHdl ) ); - m_pExplainLink->SetClickHdl( LINK( this, SpellDialog, HandleHyperlink ) ); - // initialize language ListBox m_pLanguageLB->SetLanguageList( SvxLanguageListFlags::SPELL_USED, false, false, true ); @@ -2053,28 +2049,4 @@ void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet) pSpellDialog->m_pChangePB->Enable(); } -IMPL_LINK( SpellDialog, HandleHyperlink, FixedHyperlink&, rHyperlink, void ) -{ - OUString sURL=rHyperlink.GetURL(); - OUString sTitle=GetText(); - - if ( sURL.isEmpty() ) // Nothing to do, when the URL is empty - return; - try - { - uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute( - css::system::SystemShellExecute::create(::comphelper::getProcessComponentContext()) ); - xSystemShellExecute->execute( sURL, OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY ); - } - catch ( uno::Exception& ) - { - uno::Any exc( ::cppu::getCaughtException() ); - OUString msg( ::comphelper::anyToString( exc ) ); - const SolarMutexGuard guard; - ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, msg); - aErrorBox->SetText(sTitle); - aErrorBox->Execute(); - } -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |