[Libreoffice-commits] core.git: sc/source

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Thu May 12 11:53:46 UTC 2016


 sc/source/ui/app/inputhdl.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 8bcacdc832058a7728ab5e8260a2266033033a07
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Fri May 6 12:05:14 2016 +0200

    tdf#63994 Calc Multiline Input: Create new line with Shift-Return
    
    Change-Id: I5ddf6d51aaf7168cf116169f30a1c308b3445a6d
    Reviewed-on: https://gerrit.libreoffice.org/24694
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b40f93d..afaccd2 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3210,8 +3210,12 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
     switch ( nCode )
     {
         case KEY_RETURN:
-            if (bControl && !bShift && (!bInputLine || pInputWin))
+            // New line when in the input line and Shift/Ctrl-Enter is pressed,
+            // or when in a cell and Ctrl-Enter is pressed.
+            if ((pInputWin && bInputLine && bControl != bShift) || (!bInputLine && bControl && !bShift))
+            {
                 bDoEnter = true;
+            }
             else if (nModi == 0 && nTipVisible && pFormulaData && miAutoPosFormula != pFormulaData->end())
             {
                 PasteFunctionData();


More information about the Libreoffice-commits mailing list