summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-09-22 10:52:45 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-09-22 13:51:17 +0200
commite387193eab0e4729d02b6ffd2c972c3d71942947 (patch)
treef1d0056b5f2ff47049f7a864942633f4b7a7c11f /sw/source/core
parenta4480555561df77e36c5f622cb63e4cf44b2490a (diff)
sw: move LOK_CALLBACK_VIEW_CURSOR_VISIBLE to SwCursorShell
That's where the non-view variant is emitted, and SwVisibleCursor said visibility=false even if the cursor was expected to be visible. Also fix the test callback that checked if the payload is equal to the "true" literal, but actually the payload was a JSON. Change-Id: Ifa0e23eb274925e8ab8ef5e7c21370ad2cd22282
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx8
-rw-r--r--sw/source/core/crsr/viscrs.cxx3
2 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index d0ffa27fd754..d91d954138f5 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1215,8 +1215,14 @@ void SwCursorShell::NotifyCursor(SfxViewShell* pOtherShell) const
}
else
{
- // Cursor position and visibility.
+ // Cursor position.
m_pVisibleCursor->SetPosAndShow(pOtherShell);
+ // Cursor visibility.
+ if (GetSfxViewShell() != pOtherShell)
+ {
+ OString aPayload = OString::boolean(m_bSVCursorVis);
+ SfxLokHelper::notifyOtherView(GetSfxViewShell(), pOtherShell, LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", aPayload);
+ }
// Text selection.
m_pCurrentCursor->Show(pOtherShell);
// Graphic selection.
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 531ab885ac37..0e848b88a859 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -204,10 +204,7 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell* pViewShell)
if (pViewShell == m_pCursorShell->GetSfxViewShell())
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr());
else
- {
SfxLokHelper::notifyOtherView(m_pCursorShell->GetSfxViewShell(), pViewShell, LOK_CALLBACK_INVALIDATE_VIEW_CURSOR, "rectangle", sRect);
- SfxLokHelper::notifyOtherView(m_pCursorShell->GetSfxViewShell(), pViewShell, LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", OString::boolean(m_bIsVisible));
- }
}
else
{