summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-10-20 10:49:24 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-10-20 12:48:43 +0200
commitf0006e79c4112b06b65c098722729b9a3f3301c7 (patch)
treeac7dcac47f7c8da208484f91c55a1abc11b742be /desktop
parent168463ed0537a5a9737aa5226657af1e263d0036 (diff)
Handle link click directly in FixedHyperlink
Change-Id: I5b5f0648b6e6432b0928351a17d285df8c9da811
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx18
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx24
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.hxx1
6 files changed, 1 insertions, 50 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index c7530159e248..a2b7988d390c 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -636,6 +636,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
}
}
+
bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
{
const SolarMutexGuard guard;
@@ -700,12 +701,10 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager,
get(m_pCancelBtn, "cancel");
m_pExtensionBox->InitFromDialog(this);
- m_pExtensionBox->SetHyperlinkHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) );
m_pAddBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleAddBtn ) );
m_pCloseBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCloseBtn ) );
- m_pGetExtensions->SetClickHdl( LINK( this, ExtMgrDialog, HandleHyperlink ) );
m_pCancelBtn->SetClickHdl( LINK( this, ExtMgrDialog, HandleCancelBtn ) );
m_pBundledCbx->SetClickHdl( LINK( this, ExtMgrDialog, HandleExtTypeCbx ) );
@@ -1073,13 +1072,6 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn, Button*, void)
#endif
}
-
-IMPL_LINK( ExtMgrDialog, HandleHyperlink, FixedHyperlink&, rHyperlink, void )
-{
- openWebBrowser( rHyperlink.GetURL(), GetText() );
-}
-
-
IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl, Idle *, void)
{
if ( m_bStopProgress )
@@ -1199,8 +1191,6 @@ UpdateRequiredDialog::UpdateRequiredDialog(vcl::Window *pParent, TheExtensionMan
get(m_pProgressText, "progresslabel");
get(m_pProgressBar, "progress");
- m_pExtensionBox->SetHyperlinkHdl( LINK( this, UpdateRequiredDialog, HandleHyperlink ) );
-
m_pUpdateBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleUpdateBtn ) );
m_pCloseBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCloseBtn ) );
m_pCancelBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCancelBtn ) );
@@ -1414,12 +1404,6 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleCloseBtn, Button*, void)
}
-IMPL_LINK( UpdateRequiredDialog, HandleHyperlink, FixedHyperlink&, rHyperlink, void )
-{
- openWebBrowser( rHyperlink.GetURL(), GetText() );
-}
-
-
IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl, Idle *, void)
{
if ( m_bStopProgress )
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 39c406522c4f..fdd23d8255e8 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -137,7 +137,6 @@ class ExtMgrDialog : public ModelessDialog,
DECL_LINK( HandleCancelBtn, Button*, void );
DECL_LINK( HandleCloseBtn, Button*, void );
DECL_LINK( HandleExtTypeCbx, Button*, void );
- DECL_LINK( HandleHyperlink, FixedHyperlink&, void );
DECL_LINK(TimeOutHdl, Idle *, void);
DECL_LINK( startProgress, void *, void );
DECL_STATIC_LINK( ExtMgrDialog, Restart, void *, void );
@@ -204,7 +203,6 @@ class UpdateRequiredDialog : public ModalDialog,
DECL_LINK( HandleCancelBtn, Button*, void );
DECL_LINK(TimeOutHdl, Idle *, void);
DECL_LINK( startProgress, void *, void );
- DECL_LINK( 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.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 2eaef2913346..df198dc16115 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -481,9 +481,6 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const Rectan
rEntry->m_pPublisher->SetText(rEntry->m_sPublisher);
Size aSize = FixedText::CalcMinimumTextSize(rEntry->m_pPublisher);
rEntry->m_pPublisher->SetSizePixel(aSize);
-
- if (m_aClickHdl.IsSet())
- rEntry->m_pPublisher->SetClickHdl( m_aClickHdl );
}
// Get max title width
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 403311fb5073..7543ad20761d 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -126,8 +126,6 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
Image m_aWarningImage;
Image m_aDefaultImage;
- Link<FixedHyperlink&,void> m_aClickHdl;
-
VclPtr<ScrollBar> m_pScrollBar;
rtl::Reference<ExtensionRemovedListener> m_xRemoveListener;
@@ -185,7 +183,6 @@ public:
long PointToPos( const Point& rPos );
void SetScrollHdl( const Link<ScrollBar*,void>& rLink );
void DoScroll( long nDelta );
- 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 85ae2a080748..cedfdbe7e504 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -54,8 +54,6 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/XAbortChannel.hpp>
#include <com/sun/star/task/XJob.hpp>
@@ -911,10 +909,6 @@ void UpdateDialog::initDescription()
m_pPublisherLink->Hide();
m_pReleaseNotesLabel->Hide();
m_pReleaseNotesLink->Hide();
-
- Link<FixedHyperlink&,void> aLink = LINK( this, UpdateDialog, hyperlink_clicked );
- m_pPublisherLink->SetClickHdl( aLink );
- m_pReleaseNotesLink->SetClickHdl( aLink );
}
void UpdateDialog::clearDescription()
@@ -1308,22 +1302,4 @@ IMPL_LINK_NOARG(UpdateDialog, closeHandler, Button*, void)
EndDialog();
}
-IMPL_LINK( UpdateDialog, hyperlink_clicked, FixedHyperlink&, rHyperlink, void )
-{
- OUString sURL = rHyperlink.GetURL();
- if ( sURL.isEmpty() )
- return;
-
- try
- {
- uno::Reference< css::system::XSystemShellExecute > xSystemShellExecute(
- css::system::SystemShellExecute::create(m_context) );
- //throws lang::IllegalArgumentException, system::SystemShellExecuteException
- xSystemShellExecute->execute( sURL, OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY);
- }
- catch ( const uno::Exception& )
- {
- }
-}
-
/* 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 2662a41beb11..96bb6450cfb3 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -163,7 +163,6 @@ private:
DECL_LINK(allHandler, CheckBox&, void);
DECL_LINK(okHandler, Button*, void);
DECL_LINK(closeHandler, Button*, void);
- DECL_LINK(hyperlink_clicked, FixedHyperlink&, void);
css::uno::Reference< css::uno::XComponentContext > m_context;
VclPtr<FixedText> m_pchecking;