summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-09-18 14:32:53 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-09-21 07:30:27 +0200
commit32f419fee5f9df4facb7a9b3ec910471d2a20247 (patch)
tree442562e5c17df899e517e10414144ca171b55f17 /sw
parent1a83f30ebe2c56b00804ce774537b34f1049be84 (diff)
sw: implement per-view LOK_CALLBACK_CURSOR_VISIBLE
Change-Id: I4e00679547997cfb3dafe603b908f055011a3b30
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 38e584ad0272..06aed4f369b6 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());
+ }
}
}