[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source

Eike Rathke erack at redhat.com
Tue Aug 16 20:03:43 UTC 2016


 sc/source/ui/view/viewfun2.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit f41b8757910e1c1c4838c0f884c6a29496321cb0
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Aug 12 12:16:38 2016 +0200

    check SelectionForbidsPaste() on EnterBlock()
    
    ... to prevent Alt+Enter filling a huge selection.
    
    (cherry picked from commit bbf671229cd06156e3d4eff5a2c7164ebd28e020)
    
    Backported.
    
    Change-Id: I8ce905c6e5ad0cb4dadf309f7b995142414e7193
    Reviewed-on: https://gerrit.libreoffice.org/28079
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index fb6a6eb..b9a4230 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -750,6 +750,12 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
         }
     }
 
+    if (GetViewData().SelectionForbidsPaste())
+    {
+        PaintArea(nCol, nRow, nCol, nRow);        // possibly the edit-engine is still painted there
+        return;
+    }
+
     ScDocument* pDoc = GetViewData().GetDocument();
     OUString aNewStr = rString;
     if ( pData )


More information about the Libreoffice-commits mailing list