diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-12 15:16:50 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-16 09:38:09 +0100 |
commit | 2ba8f4d2c0e24bc356ab72e4f00e27560f471f16 (patch) | |
tree | 729b2a4f22065998148ad0d9262c53e7d6647f24 /editeng | |
parent | 00b758b40a23d715e4eb1cf8f62c901cd8c41249 (diff) |
editeng tiled rendering: emit callbacks necessary to have a blinking cursor
Change-Id: I031827cbcb14242ede549ce6f65f809795075db5
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 4db189260d64..684e7de6153a 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -62,6 +62,7 @@ #include <com/sun/star/lang/Locale.hpp> #include <linguistic/lngprops.hxx> #include <vcl/settings.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -394,12 +395,17 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) if ( !pImpEditView->DoAutoScroll() ) bGotoCursor = false; pImpEditView->ShowCursor( bGotoCursor, bForceVisCursor ); + + if (pImpEditView->isTiledRendering()) + pImpEditView->libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr()); } } void EditView::HideCursor() { pImpEditView->GetCursor()->Hide(); + if (pImpEditView->isTiledRendering()) + pImpEditView->libreOfficeKitCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr()); } Pair EditView::Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck ) diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 633593b4126b..0c54e5e23ad6 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -45,6 +45,7 @@ #include <svtools/transfer.hxx> #include <sot/exchange.hxx> #include <sot/formats.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -873,6 +874,14 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16 GetCursor()->SetSize( aCursorSz ); + if (isTiledRendering()) + { + const Point& rPos = GetCursor()->GetPos(); + Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight()); + OString sRect = aRect.toString(); + libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr()); + } + unsigned char nCursorDir = CURSOR_DIRECTION_NONE; if ( IsInsertMode() && !aEditSelection.HasRange() && ( pEditEngine->pImpEditEngine->HasDifferentRTLLevels( aPaM.GetNode() ) ) ) { |