From b9405fbc4e19901c78d136895c5ab0437d8450ac Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 25 Oct 2020 15:27:58 +0000 Subject: Resolves: tdf#137620 add DeleteSurroundingText at vcl::Window level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- vcl/source/app/salvtables.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vcl/source/app') 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::ReferenceSetDeleteSurroundingHdl(Link()); m_xDrawingArea->SetGetSurroundingHdl(Link()); m_xDrawingArea->SetQueryTooltipHdl(Link()); m_xDrawingArea->SetCommandHdl(Link()); @@ -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); -- cgit