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-16 11:22:22 +0000 |
commit | 77235ac64be61afd707931675fec100c7c50d01c (patch) | |
tree | 9159b28ad08e13785a5b529d2182e0d38974798b /editeng/source/editeng | |
parent | b101ff56e874824fa9f0d37a8468b07dbf3d002c (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>
Diffstat (limited to 'editeng/source/editeng')
-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 f00678fa091e..49aeaf23ff09 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -403,7 +403,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); } } } @@ -414,7 +416,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 13a53acfc0f7..2ef02909e6ee 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -408,6 +408,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(); } @@ -1005,6 +1006,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; |