diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-18 14:32:53 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-18 14:54:38 +0200 |
commit | 2aa9079c4709f18e5943bdc9c879d17b97cbb855 (patch) | |
tree | b520e63e88b7cd2bd55ff0503e13604c41837cc2 | |
parent | a772bba744601f0e5938213dfa6781d9bdc91137 (diff) |
sw: implement per-view LOK_CALLBACK_CURSOR_VISIBLE
feature/tiled-editing
Change-Id: I4e00679547997cfb3dafe603b908f055011a3b30
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 46c4fc22954d..9f14b4d83daa 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -23,6 +23,7 @@ #include <hintids.hxx> #include <svx/svdmodel.hxx> #include <editeng/frmdiritem.hxx> +#include <sfx2/viewsh.hxx> #include <SwSmartTagMgr.hxx> #include <doc.hxx> #include <rootfrm.hxx> @@ -62,6 +63,7 @@ #include <comcore.hrc> #include <IDocumentLayoutAccess.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> +#include <comphelper/lok.hxx> using namespace com::sun::star; using namespace util; @@ -2109,8 +2111,13 @@ void SwCrsrShell::ShowCrsr() m_bSVCrsrVis = true; m_pCurCrsr->SetShowTextInputFieldOverlay( true ); - if (isTiledRendering()) - libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr()); + if (comphelper::LibreOfficeKit::isActive()) + { + if (comphelper::LibreOfficeKit::isViewCallback()) + GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr()); + else + libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr()); + } UpdateCrsr(); } @@ -2126,8 +2133,13 @@ void SwCrsrShell::HideCrsr() m_pCurCrsr->SetShowTextInputFieldOverlay( false ); m_pVisCrsr->Hide(); - if (isTiledRendering()) - libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr()); + if (comphelper::LibreOfficeKit::isActive()) + { + if (comphelper::LibreOfficeKit::isViewCallback()) + GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr()); + else + libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr()); + } } } |