Kaydet (Commit) 32f419fe authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: implement per-view LOK_CALLBACK_CURSOR_VISIBLE

Change-Id: I4e00679547997cfb3dafe603b908f055011a3b30
üst 1a83f30e
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <hintids.hxx> #include <hintids.hxx>
#include <svx/svdmodel.hxx> #include <svx/svdmodel.hxx>
#include <editeng/frmdiritem.hxx> #include <editeng/frmdiritem.hxx>
#include <sfx2/viewsh.hxx>
#include <SwSmartTagMgr.hxx> #include <SwSmartTagMgr.hxx>
#include <doc.hxx> #include <doc.hxx>
#include <rootfrm.hxx> #include <rootfrm.hxx>
...@@ -62,6 +63,7 @@ ...@@ -62,6 +63,7 @@
#include <comcore.hrc> #include <comcore.hrc>
#include <IDocumentLayoutAccess.hxx> #include <IDocumentLayoutAccess.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
using namespace com::sun::star; using namespace com::sun::star;
using namespace util; using namespace util;
...@@ -2109,8 +2111,13 @@ void SwCrsrShell::ShowCrsr() ...@@ -2109,8 +2111,13 @@ void SwCrsrShell::ShowCrsr()
m_bSVCrsrVis = true; m_bSVCrsrVis = true;
m_pCurCrsr->SetShowTextInputFieldOverlay( true ); m_pCurCrsr->SetShowTextInputFieldOverlay( true );
if (isTiledRendering()) if (comphelper::LibreOfficeKit::isActive())
libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr()); {
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(); UpdateCrsr();
} }
...@@ -2126,8 +2133,13 @@ void SwCrsrShell::HideCrsr() ...@@ -2126,8 +2133,13 @@ void SwCrsrShell::HideCrsr()
m_pCurCrsr->SetShowTextInputFieldOverlay( false ); m_pCurCrsr->SetShowTextInputFieldOverlay( false );
m_pVisCrsr->Hide(); m_pVisCrsr->Hide();
if (isTiledRendering()) if (comphelper::LibreOfficeKit::isActive())
libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr()); {
if (comphelper::LibreOfficeKit::isViewCallback())
GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr());
else
libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr());
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment