diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index b84496be2c27..be2d5e3887a2 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -17,6 +17,7 @@ #include <sfx2/viewfrm.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> +#include <editeng/outliner.hxx> #include <shellimpl.hxx> @@ -199,6 +200,21 @@ void SfxLokHelper::notifyInvalidation(SfxViewShell const* pThisView, const OStri pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, aBuf.makeStringAndClear().getStr()); } +void SfxLokHelper::notifyVisCursorInvalidation(OutlinerViewShell const* pThisView, const OString& rRectangle) +{ + OString sPayload; + if (comphelper::LibreOfficeKit::isViewIdForVisCursorInvalidation()) + { + sPayload = OString("{ \"viewId\": \"") + OString::number(SfxLokHelper::getView()) + + "\", \"rectangle\": \"" + rRectangle + "\" }"; + } + else + { + sPayload = rRectangle; + } + pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sPayload.getStr()); +} + void SfxLokHelper::notifyAllViews(int nType, const OString& rPayload) { const auto payload = rPayload.getStr(); |