From 3a2c156eb8b5e68e9de430e788a57e0c220f7e3a Mon Sep 17 00:00:00 2001 From: Mert Tumer Date: Fri, 25 Feb 2022 13:05:28 +0300 Subject: dont send text selection start/end when there is no selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when there is no selection, startrect and endrect get the cursor coordinates, we should not send it. Otherwise this causes selection handles to appear on online Signed-off-by: Mert Tumer Change-Id: I4402e04d4a16a1f840499c57421fd01caf43f116 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130525 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131520 Tested-by: Jenkins --- sw/source/core/crsr/viscrs.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sw') diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 26e43813575d..0501162a2a16 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -521,6 +521,13 @@ OString SwSelPaintRects::getLOKPayload( int nType, int nViewId, bool* ignore ) c SwRect aEndRect; FillStartEnd(aStartRect, aEndRect); + // no selection rect + if (!size()) + { + *ignore = true; + return OString(); + } + if( nType == LOK_CALLBACK_TEXT_SELECTION_START ) { if (aStartRect.HasArea()) -- cgit