diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-16 12:34:12 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-17 09:02:03 +0200 |
commit | feffeb503457c369e7d12b5ce151b6b588192e14 (patch) | |
tree | b837cc9db6544007b47fcf6fc7c14040578c788f /editeng/source | |
parent | f43be1f63880451e74281df89496c377c9395523 (diff) |
editeng: introduce OutlinerViewShell::NotifyOtherViews()
This allows notifying other views about e.g. cursor position changes
even if SfxLokHelper::notifyOtherViews() is not accessible from editeng.
Change-Id: I921e97344ffe562109a221f241e70b3f68ee9aaf
Reviewed-on: https://gerrit.libreoffice.org/28162
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 77235ac64be61afd707931675fec100c7c50d01c)
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 8 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 8dea0b8bb5b5..5d64e4f81b93 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -404,7 +404,9 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bActivat if (pImpEditView->mpViewShell && !bActivate) { - pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr()); + OString aPayload = OString::boolean(true); + pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload.getStr()); + pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", aPayload); } } } @@ -415,7 +417,9 @@ void EditView::HideCursor(bool bDeactivate) if (pImpEditView->mpViewShell && !bDeactivate) { - pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr()); + OString aPayload = OString::boolean(false); + pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload.getStr()); + pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", aPayload); } } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 01972d3a8fce..795a82453ef8 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -407,6 +407,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou } mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRectangle.getStr()); + mpViewShell->NotifyOtherViews(LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", sRectangle); pOutWin->Pop(); } @@ -1004,6 +1005,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) OString sRect = aRect.toString(); mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr()); + mpViewShell->NotifyOtherViews(LOK_CALLBACK_INVALIDATE_VIEW_CURSOR, "rectangle", sRect); } CursorDirection nCursorDir = CursorDirection::NONE; |