summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2022-02-25 13:05:28 +0300
committerMert Tumer <mert.tumer@collabora.com>2022-02-28 17:54:24 +0100
commitbc86da350e3b5137a1a3c86b19f5c6c028b67b21 (patch)
tree1beca24f762f0cd198a967f7405e5493e39202f0
parentf509da33f2b63be957bb4897c1bb20db1d3fc2a2 (diff)
dont send text selection start/end when there is no selection
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 <mert.tumer@collabora.com> Change-Id: I4402e04d4a16a1f840499c57421fd01caf43f116 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130525 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--sw/source/core/crsr/viscrs.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index f81f9750b312..6b8c3c5b71a2 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -524,6 +524,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())