summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2020-11-13 15:14:17 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2020-11-16 07:53:34 +0100
commit1707f85404cdfff83e1e8d4db5c1d281ef2682fc (patch)
treef4eabef9062527092388f36d1a130024606b3774
parent63540cbef6484fa9dc017c93676d0b5e85075303 (diff)
tdf#138187 Don't open UNO hyperlink control's URL twice
It looks like handling the click by opening the URL was added directly to 'FixedHyperlink' in commit f0006e79c4112b06b65c098722729b9a3f3301c7 Date: Thu Oct 20 10:49:24 2016 +0200 Handle link click directly in FixedHyperlink to deduplicate the handling done explicitly in various dialogs by themselves. The handling in 'VCLXFixedHyperlink::ProcessWindowEvent', which did the same for the case where no action listeners exist, there since commit ea665e6fe7af34fcdcefd73bc05c68eb88e42073 Date: Tue Jan 29 14:05:57 2008 +0000 INTEGRATION: CWS fwk80_SRC680 (1.64.12); FILE MERGED 2008/01/24 12:27:38 pb 1.64.12.6: fix: #i83756# VCLXFixedHyperlink::ImplGetPropertyIds() added 2008/01/24 07:50:51 pb 1.64.12.5: RESYNC: (1.64-1.64.18.1); FILE MERGED 2008/01/15 09:14:01 mav 1.64.12.4: adopt for gcc 2008/01/15 08:13:04 pb 1.64.12.3: fix: #i83756# open the hyperlink if there are no action listeners 2008/01/14 09:48:30 pb 1.64.12.2: fix: #i83756# VCLXFixedHyperlink::get/setProperty() added 2008/01/11 15:04:28 pb 1.64.12.1: fix: #i83756# class VCLXFixedHyperlink remained, though, so clicking a UNO hyperlink control resulted in the corresponding URL being opened twice. Drop the extra handling from there so this only happens once. (I couldn't quickly double-check that the URL is only opened once before f0006e79c4112b06b65c098722729b9a3f3301c7 since opening the dialog from the sample file fails in such old versions in the bibisect repo.) Change-Id: I32eace51bf8f14e968a939398c2bf2fd6f83de28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105793 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 42a691933429dbb315de2bd7ba2724993c60411f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105851 Tested-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--toolkit/source/awt/vclxwindows.cxx22
1 files changed, 0 insertions, 22 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index c356aba16ee1..154573cf262b 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2880,28 +2880,6 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve
aEvent.Source = static_cast<cppu::OWeakObject*>(this);
maActionListeners.actionPerformed( aEvent );
}
- else
- {
- // open the URL
- OUString sURL;
- VclPtr< FixedHyperlink > pBase = GetAs< FixedHyperlink >();
- if ( pBase )
- sURL = pBase->GetURL();
- Reference< css::system::XSystemShellExecute > xSystemShellExecute( css::system::SystemShellExecute::create(
- ::comphelper::getProcessComponentContext() ) );
- if ( !sURL.isEmpty() )
- {
- try
- {
- // start browser
- xSystemShellExecute->execute(
- sURL, OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY );
- }
- catch( uno::Exception& )
- {
- }
- }
- }
[[fallthrough]];
}
default: