From e1ac2a940389f52e28264a623a6620a7a0d94d57 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 30 Sep 2020 14:42:10 +0100 Subject: tdf#134566 gtk IM support for custom widgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5c731161768d09d021db5c353de816e173159096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103764 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/source/window/layout.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'vcl/source/window/layout.cxx') diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 8c2ff59f52d1..9e4831789f8d 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2857,6 +2857,23 @@ void VclDrawingArea::StartDrag(sal_Int8, const Point&) xContainer->StartDrag(this, m_nDragAction); } +OUString VclDrawingArea::GetSurroundingText() const +{ + OUString sSurroundingText; + if (m_aGetSurroundingHdl.Call(sSurroundingText) != -1) + return sSurroundingText; + return Control::GetSurroundingText(); +} + +Selection VclDrawingArea::GetSurroundingTextSelection() const +{ + OUString sSurroundingText; + int nCursor = m_aGetSurroundingHdl.Call(sSurroundingText); + if (nCursor != -1) + return Selection(nCursor, nCursor); + return Control::GetSurroundingTextSelection(); +} + VclHPaned::~VclHPaned() { } -- cgit v1.2.3