[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 10 10:53:16 UTC 2021
sc/source/ui/app/inputwin.cxx | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
New commits:
commit 4477ac0138cd23250065b10b537a95e3cac784dd
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon May 10 10:11:53 2021 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon May 10 12:52:42 2021 +0200
LOK: inform when input bar has cursor and focus
Now the cursor is rendered on the Drawing Area so
we need to send special message to inform that
cursor is shown. This fixes bug in online where
without cursor instead of sending character to
formula bar is was send to the spreadsheet and
formula bar was loosing focus at that time.
Change-Id: I0b1e03900bec855b1378da364f0391f50dbceccb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115310
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 47138fb4c717..47a76af0cef3 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1312,6 +1312,26 @@ void ScTextWnd::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangl
}
else
WeldEditView::Paint(rRenderContext, rRect);
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ bool bIsFocused = false;
+ if (HasFocus())
+ {
+ vcl::Cursor* pCursor = m_xEditView->GetCursor();
+ if (pCursor)
+ bIsFocused = true;
+ }
+
+ VclPtr<vcl::Window> pParent = mrGroupBar.GetVclParent().GetParentWithLOKNotifier();
+ if (!pParent)
+ return;
+
+ const vcl::ILibreOfficeKitNotifier* pNotifier = pParent->GetLOKNotifier();
+ std::vector<vcl::LOKPayloadItem> aItems;
+ aItems.emplace_back("visible", bIsFocused ? "true" : "false");
+ pNotifier->notifyWindow(pParent->GetLOKWindowId(), "cursor_visible", aItems);
+ }
}
EditView* ScTextWnd::GetEditView()
More information about the Libreoffice-commits
mailing list