diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 28 | ||||
-rw-r--r-- | cui/source/inc/SpellDialog.hxx | 1 | ||||
-rw-r--r-- | cui/source/inc/optlingu.hxx | 2 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 54 |
4 files changed, 2 insertions, 83 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: */ diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index 0dc32c1b1888..b2687063259a 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -192,7 +192,6 @@ private: DECL_LINK( AddToDictClickHdl, Button*, void ); DECL_LINK( LanguageSelectHdl, ListBox&, void ); DECL_LINK( DialogUndoHdl, SpellUndoAction_Impl&, void ); - DECL_LINK( HandleHyperlink, FixedHyperlink&, void ); DECL_LINK( InitHdl, void*, void ); diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index 3742d5291996..e192d36f1c31 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -81,7 +81,6 @@ class SvxEditModulesDlg : public ModalDialog DECL_LINK( LangSelectListBoxHdl_Impl, ListBox&, void ); DECL_LINK( BoxCheckButtonHdl_Impl2, SvLBoxButtonData*, void ); DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox*, void ); - DECL_LINK( OpenURLHdl_Impl, FixedHyperlink&, void ); void LangSelectHdl_Impl(ListBox*); public: @@ -143,7 +142,6 @@ private: DECL_LINK( BoxDoubleClickHdl_Impl, SvTreeListBox*, bool ); DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox*, void ); DECL_LINK( PostDblClickHdl_Impl, void *, void); - DECL_LINK( OpenURLHdl_Impl, FixedHyperlink&, void ); void UpdateModulesBox_Impl(); void UpdateDicBox_Impl(); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 1901cc60bdb5..2b374b136cbc 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -46,8 +46,6 @@ #include <com/sun/star/linguistic2/XDictionaryList.hpp> #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/ucb/CommandAbortedException.hpp> -#include <com/sun/star/system/SystemShellExecute.hpp> -#include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <unotools/extendedsecurityoptions.hxx> #include <svtools/treelistbox.hxx> #include "svtools/treelistentry.hxx" @@ -128,28 +126,6 @@ static sal_Int32 lcl_SeqGetEntryPos( return i < nLen ? i : -1; } -static void lcl_OpenURL( const OUString& _sURL ) -{ - if ( !_sURL.isEmpty() ) - { - OUString sURL = _sURL; - localizeWebserviceURI(sURL); - try - { - uno::Reference< uno::XComponentContext > xContext = - ::comphelper::getProcessComponentContext(); - uno::Reference< css::system::XSystemShellExecute > xSystemShell( - css::system::SystemShellExecute::create(xContext) ); - xSystemShell->execute( sURL, OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY ); - } - catch( const uno::Exception& e ) - { - OSL_TRACE( "Caught exception: %s\n thread terminated.\n", - OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); - } - } -} - bool KillFile_Impl( const OUString& rURL ) { bool bRet = true; @@ -1073,12 +1049,7 @@ SvxLinguTabPage::SvxLinguTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) m_pLinguOptionsCLB->SetSelectHdl( LINK( this, SvxLinguTabPage, SelectHdl_Impl )); m_pLinguOptionsCLB->SetDoubleClickHdl(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl)); - if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() - != SvtExtendedSecurityOptions::OPEN_NEVER ) - { - m_pMoreDictsLink->SetClickHdl( LINK( this, SvxLinguTabPage, OpenURLHdl_Impl ) ); - } - else + if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() == SvtExtendedSecurityOptions::OPEN_NEVER ) m_pMoreDictsLink->Hide(); xProp = LinguMgr::GetLinguPropertySet(); @@ -1513,13 +1484,6 @@ IMPL_LINK_NOARG(SvxLinguTabPage, PostDblClickHdl_Impl, void*, void) } -IMPL_LINK_NOARG(SvxLinguTabPage, OpenURLHdl_Impl, FixedHyperlink&, void) -{ - OUString sURL( m_pMoreDictsLink->GetURL() ); - lcl_OpenURL( sURL ); -} - - IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox, void ) { if (pBox == m_pLinguModulesCLB) @@ -1832,15 +1796,8 @@ SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rD m_pPrioUpPB->Enable( false ); m_pPrioDownPB->Enable( false ); - if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() - != SvtExtendedSecurityOptions::OPEN_NEVER ) - { - m_pMoreDictsLink->SetClickHdl( LINK( this, SvxEditModulesDlg, OpenURLHdl_Impl ) ); - } - else - { + if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() == SvtExtendedSecurityOptions::OPEN_NEVER ) m_pMoreDictsLink->Hide(); - } //fill language box Sequence< sal_Int16 > aAvailLang; @@ -2272,11 +2229,4 @@ IMPL_LINK_NOARG(SvxEditModulesDlg, BackHdl_Impl, Button*, void) LangSelectHdl_Impl(nullptr); } - -IMPL_LINK_NOARG(SvxEditModulesDlg, OpenURLHdl_Impl, FixedHyperlink&, void) -{ - OUString sURL( m_pMoreDictsLink->GetURL() ); - lcl_OpenURL( sURL ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |