[Libreoffice-commits] core.git: 2 commits - editeng/source

Miklos Vajna vmiklos at collabora.co.uk
Wed May 20 06:42:46 PDT 2015


 editeng/source/editeng/impedit.cxx  |    4 ++--
 editeng/source/editeng/impedit2.cxx |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c6f03d6fc25a3cea22f2ce035d0948bcaa74daa9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 20 15:26:27 2015 +0200

    ImpEditView::SetCursorAtPoint tiled rendering: avoid partial selections
    
    Same problem as in the previous commit, just for mouse move. Previously
    when selecting "abc" with the mouse only one or zero letter got selected
    as the mouse moved, now it's properly the whole afffected string.
    
    Change-Id: I025dbd71fc02a0c93a532ca188836ffb957d6b35

diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 676fc44..d1f5d95 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1531,8 +1531,8 @@ bool ImpEditView::SetCursorAtPoint( const Point& rPointPixel )
     EditPaM aPaM = pEditEngine->GetPaM(aDocPos);
     bool bGotoCursor = DoAutoScroll();
 
-    // aTmpNewSel: Diff between old and new, not the new selection
-    EditSelection aTmpNewSel( GetEditSelection().Max(), aPaM );
+    // aTmpNewSel: Diff between old and new, not the new selection, unless tiled rendering
+    EditSelection aTmpNewSel( isTiledRendering() ? GetEditSelection().Min() : GetEditSelection().Max(), aPaM );
 
     // #i27299#
     // work on copy of current selection and set new selection, if it has changed.
commit 18e08580b660111e7e9b0bae18ac9034f57475ba
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 20 15:18:30 2015 +0200

    ImpEditEngine::MoveCursor tiled rendering: avoid partial selections
    
    Tiled rendering assumes that the whole list of selection rectangles is
    sent, i.e. the information is not incremental.
    
    With this, if the text is "abc" and you are before "a" with the cursor,
    then pressing shift-rightarrow two times will result in "ab" being
    selected, not just "b".
    
    Change-Id: I70c043575d3c68d78342af0a6b78659d83b4f5f4

diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 87a1f94..7905893 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -909,8 +909,8 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE
     pEditView->pImpEditView->GetEditSelection().Max() = aPaM;
     if ( bKeyModifySelection )
     {
-        // Then the selection is expanded ...
-        EditSelection aTmpNewSel( aOldEnd, aPaM );
+        // Then the selection is expanded ... or the whole selection is painted in case of tiled rendering.
+        EditSelection aTmpNewSel( pEditView->isTiledRendering() ? pEditView->pImpEditView->GetEditSelection().Min() : aOldEnd, aPaM );
         pEditView->pImpEditView->DrawSelection( aTmpNewSel );
     }
     else


More information about the Libreoffice-commits mailing list