summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2019-10-20 13:18:51 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-12-17 11:32:33 +0100
commitdfcfdf47b5da6a11b2c3118a0f63cc48c10c2cd7 (patch)
tree831f85befc8c830f5d00a4b0cef01e343e2746e0 /sfx2
parent1fd65c35f9cc44d94ac10e929b9c9c4bfb8d1afc (diff)
lok: get spelling context menu on long press
This patch handles a new flag attached to the invalidate view cursor message for informing the client when the text cursor is inside a mispelled word. This information is used for popping up the spelling context menu on a long press event instead of the standard context menu for a selected word. Change-Id: I13fcbe53c83ca6eb56300a601734cdc3211e88a0 Reviewed-on: https://gerrit.libreoffice.org/85244 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/lokhelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 12a5a4bb2926..524d0b1768e3 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -338,7 +338,7 @@ void SfxLokHelper::notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc
}
}
-void SfxLokHelper::notifyVisCursorInvalidation(OutlinerViewShell const* pThisView, const OString& rRectangle)
+void SfxLokHelper::notifyVisCursorInvalidation(OutlinerViewShell const* pThisView, const OString& rRectangle, bool bMispelledWord)
{
if (DisableCallbacks::disabled())
return;
@@ -347,7 +347,7 @@ void SfxLokHelper::notifyVisCursorInvalidation(OutlinerViewShell const* pThisVie
if (comphelper::LibreOfficeKit::isViewIdForVisCursorInvalidation())
{
sPayload = OStringLiteral("{ \"viewId\": \"") + OString::number(SfxLokHelper::getView()) +
- "\", \"rectangle\": \"" + rRectangle + "\" }";
+ "\", \"rectangle\": \"" + rRectangle + "\", \"mispelledWord\": \"" + OString::number(bMispelledWord ? 1 : 0) + "\" }";
}
else
{