summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/fixedhyper.hxx1
-rw-r--r--vcl/source/app/salvtables.cxx7
2 files changed, 6 insertions, 2 deletions
diff --git a/include/vcl/fixedhyper.hxx b/include/vcl/fixedhyper.hxx
index da1e8ea84fbb..b46a37a2688d 100644
--- a/include/vcl/fixedhyper.hxx
+++ b/include/vcl/fixedhyper.hxx
@@ -94,6 +94,7 @@ class VCL_DLLPUBLIC FixedHyperlink : public FixedText
m_aClickHdl is called if the text is clicked.
*/
void SetClickHdl( const Link<FixedHyperlink&,void>& rLink ) { m_aClickHdl = rLink; }
+ const Link<FixedHyperlink&,void>& GetClickHdl() const { return m_aClickHdl; }
// ::FixedHyperbaseLink
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 82ca26bea13d..afca107ef91c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1932,6 +1932,7 @@ class SalInstanceLinkButton : public SalInstanceContainer, public virtual weld::
{
private:
VclPtr<FixedHyperlink> m_xButton;
+ Link<FixedHyperlink&,void> m_aOrigClickHdl;
DECL_LINK(ClickHdl, FixedHyperlink&, void);
public:
@@ -1939,6 +1940,7 @@ public:
: SalInstanceContainer(pButton, pBuilder, bTakeOwnership)
, m_xButton(pButton)
{
+ m_aOrigClickHdl = m_xButton->GetClickHdl();
m_xButton->SetClickHdl(LINK(this, SalInstanceLinkButton, ClickHdl));
}
@@ -1964,15 +1966,16 @@ public:
virtual ~SalInstanceLinkButton() override
{
- m_xButton->SetClickHdl(Link<FixedHyperlink&,void>());
+ m_xButton->SetClickHdl(m_aOrigClickHdl);
}
};
#include <vcl/pngwrite.hxx>
#include <tools/stream.hxx>
-IMPL_LINK_NOARG(SalInstanceLinkButton, ClickHdl, FixedHyperlink&, void)
+IMPL_LINK(SalInstanceLinkButton, ClickHdl, FixedHyperlink&, rButton, void)
{
+ m_aOrigClickHdl.Call(rButton);
signal_clicked();
}