summaryrefslogtreecommitdiff
path: root/vcl/source/app/salvtables.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-10-25 15:27:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-10-27 17:00:59 +0100
commitb9405fbc4e19901c78d136895c5ab0437d8450ac (patch)
treef42d180c9f6b4450959ff94d6f40a2ae881d8984 /vcl/source/app/salvtables.cxx
parent23c30c073495201acb82e6e2e83bb0840f25acce (diff)
Resolves: tdf#137620 add DeleteSurroundingText at vcl::Window level
a) give it a default implementation based on the current one b) re-use code introduced for WeldEditView::DeleteSurroundingText for the EditView containing vcl::Window in impress/draw and various similar Annotation windows Change-Id: I55547c70e90ee394795b5545450cf8131538fad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104781 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/app/salvtables.cxx')
-rw-r--r--vcl/source/app/salvtables.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 26e382af0536..303907501e96 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5848,6 +5848,7 @@ SalInstanceDrawingArea::SalInstanceDrawingArea(VclDrawingArea* pDrawingArea, Sal
m_xDrawingArea->SetCommandHdl(LINK(this, SalInstanceDrawingArea, CommandHdl));
m_xDrawingArea->SetQueryTooltipHdl(LINK(this, SalInstanceDrawingArea, QueryTooltipHdl));
m_xDrawingArea->SetGetSurroundingHdl(LINK(this, SalInstanceDrawingArea, GetSurroundingHdl));
+ m_xDrawingArea->SetDeleteSurroundingHdl(LINK(this, SalInstanceDrawingArea, DeleteSurroundingHdl));
m_xDrawingArea->SetStartDragHdl(LINK(this, SalInstanceDrawingArea, StartDragHdl));
}
@@ -5941,6 +5942,7 @@ void SalInstanceDrawingArea::enable_drag_source(rtl::Reference<TransferDataConta
SalInstanceDrawingArea::~SalInstanceDrawingArea()
{
+ m_xDrawingArea->SetDeleteSurroundingHdl(Link<const Selection&, bool>());
m_xDrawingArea->SetGetSurroundingHdl(Link<OUString&, int>());
m_xDrawingArea->SetQueryTooltipHdl(Link<tools::Rectangle&, OUString>());
m_xDrawingArea->SetCommandHdl(Link<const CommandEvent&, bool>());
@@ -6017,6 +6019,11 @@ IMPL_LINK(SalInstanceDrawingArea, GetSurroundingHdl, OUString&, rSurrounding, in
return m_aGetSurroundingHdl.Call(rSurrounding);
}
+IMPL_LINK(SalInstanceDrawingArea, DeleteSurroundingHdl, const Selection&, rSelection, bool)
+{
+ return m_aDeleteSurroundingHdl.Call(rSelection);
+}
+
IMPL_LINK(SalInstanceDrawingArea, QueryTooltipHdl, tools::Rectangle&, rHelpArea, OUString)
{
return m_aQueryTooltipHdl.Call(rHelpArea);