Kaydet (Commit) 5c2811d6 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: implement per-view LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR

Change-Id: Ib4c1caede94d3eac372a3605c430bbbd353755f3
üst b20de6c5
...@@ -442,7 +442,7 @@ public: ...@@ -442,7 +442,7 @@ public:
{ return mpCareWindow ? mpCareWindow.get() : CareChildWin(rVSh); } { return mpCareWindow ? mpCareWindow.get() : CareChildWin(rVSh); }
static vcl::Window* CareChildWin(SwViewShell& rVSh); static vcl::Window* CareChildWin(SwViewShell& rVSh);
inline SfxViewShell *GetSfxViewShell() { return mpSfxViewShell; } inline SfxViewShell *GetSfxViewShell() const { return mpSfxViewShell; }
inline void SetSfxViewShell(SfxViewShell *pNew) { mpSfxViewShell = pNew; } inline void SetSfxViewShell(SfxViewShell *pNew) { mpSfxViewShell = pNew; }
// Selection of Draw Engine has been changed. // Selection of Draw Engine has been changed.
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include <memory> #include <memory>
#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
#include <paintfrm.hxx> #include <paintfrm.hxx>
// Here static members are defined. They will get changed on alteration of the // Here static members are defined. They will get changed on alteration of the
...@@ -178,7 +179,7 @@ void SwVisCrsr::_SetPosAndShow() ...@@ -178,7 +179,7 @@ void SwVisCrsr::_SetPosAndShow()
m_aTextCrsr.SetPos( aRect.Pos() ); m_aTextCrsr.SetPos( aRect.Pos() );
if (m_pCrsrShell->isTiledRendering()) if (comphelper::LibreOfficeKit::isActive())
{ {
// notify about page number change (if that happened) // notify about page number change (if that happened)
sal_uInt16 nPage, nVirtPage; sal_uInt16 nPage, nVirtPage;
...@@ -193,7 +194,10 @@ void SwVisCrsr::_SetPosAndShow() ...@@ -193,7 +194,10 @@ void SwVisCrsr::_SetPosAndShow()
// notify about the cursor position & size // notify about the cursor position & size
Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height()); Rectangle aSVRect(aRect.Pos().getX(), aRect.Pos().getY(), aRect.Pos().getX() + aRect.SSize().Width(), aRect.Pos().getY() + aRect.SSize().Height());
OString sRect = aSVRect.toString(); OString sRect = aSVRect.toString();
m_pCrsrShell->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr()); if (comphelper::LibreOfficeKit::isViewCallback())
m_pCrsrShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr());
else
m_pCrsrShell->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr());
} }
if ( !m_pCrsrShell->IsCrsrReadonly() || m_pCrsrShell->GetViewOptions()->IsSelectionInReadonly() ) if ( !m_pCrsrShell->IsCrsrReadonly() || m_pCrsrShell->GetViewOptions()->IsSelectionInReadonly() )
......
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