[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - editeng/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Mar 20 06:14:37 PDT 2015


 editeng/source/editeng/impedit.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit a13b4325ef4cd17a73615224dca4bfd207f51d1a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Mar 20 14:12:57 2015 +0100

    ImpEditView::ShowCursor: don't assume map mode is twips
    
    This makes the blinking cursor appear at the expected position in
    Impress when editing shape text.
    
    Change-Id: I71ad9d10f40f1ae290dc235ae26072955af84a2d

diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index e24e407..046a24f 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -920,6 +920,13 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
         {
             const Point& rPos = GetCursor()->GetPos();
             Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight());
+
+            // LOK output is always in twips, convert from mm100 if necessary.
+            if (pOutWin->IsMapModeEnabled() && pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
+                aRect = OutputDevice::LogicToLogic(aRect, MAP_100TH_MM, MAP_TWIP);
+            // Let the LOK client decide the cursor width.
+            aRect.setWidth(0);
+
             OString sRect = aRect.toString();
             libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr());
         }


More information about the Libreoffice-commits mailing list