[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jul 31 09:10:42 UTC 2018


 sw/source/uibase/docvw/edtwin.cxx |   30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

New commits:
commit b917fe54aa1ab2b39d7a0b6ed7f66fc9c4f6d74e
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Jul 30 13:12:43 2018 +0200
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Tue Jul 31 11:10:21 2018 +0200

    tdf#118971: allow arrow keys to move images or drawing objects
    
    Partially revert 2d5ce0e1b233c83f91481cd6b9306ac8de7f5ff8
    
    Change-Id: Ie4c91529c1ce878f4b0474d815a3a88ed48769c2
    Reviewed-on: https://gerrit.libreoffice.org/58318
    Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>
    Tested-by: Heiko Tietze <tietze.heiko at gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit e1d73cb5552c2566c6d7463ce001e555523f3d92)
    Reviewed-on: https://gerrit.libreoffice.org/58342
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 5e509ee18ec3..3be0d47726de 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1768,7 +1768,11 @@ KEYINPUT_CHECKTABLE:
                         eFlyState = SwKeyState::Fly_Change;
                         nDir = MOVE_LEFT_BIG;
                     }
-                    break;
+                    goto KEYINPUT_CHECKTABLE_INSDEL;
+                }
+                case KEY_RIGHT | KEY_MOD1:
+                {
+                    goto KEYINPUT_CHECKTABLE_INSDEL;
                 }
                 case KEY_UP:
                 case KEY_UP | KEY_MOD1:
@@ -1779,7 +1783,7 @@ KEYINPUT_CHECKTABLE:
                         eFlyState = SwKeyState::Fly_Change;
                         nDir = MOVE_UP_BIG;
                     }
-                    break;
+                    goto KEYINPUT_CHECKTABLE_INSDEL;
                 }
                 case KEY_DOWN:
                 case KEY_DOWN | KEY_MOD1:
@@ -1790,8 +1794,26 @@ KEYINPUT_CHECKTABLE:
                         eFlyState = SwKeyState::Fly_Change;
                         nDir = MOVE_DOWN_BIG;
                     }
-                    break;
+                    goto KEYINPUT_CHECKTABLE_INSDEL;
+                }
+
+KEYINPUT_CHECKTABLE_INSDEL:
+                if( rSh.IsTableMode() || !rSh.GetTableFormat() )
+                {
+                    const SelectionType nSelectionType = rSh.GetSelectionType();
+
+                    eKeyState = SwKeyState::KeyToView;
+                    if(SwKeyState::KeyToView != eFlyState)
+                    {
+                        if((nSelectionType & (SelectionType::DrawObject|SelectionType::DbForm))  &&
+                                rSh.GetDrawView()->AreObjectsMarked())
+                            eKeyState = SwKeyState::Draw_Change;
+                        else if(nSelectionType & (SelectionType::Frame|SelectionType::Ole|SelectionType::Graphic))
+                            eKeyState = SwKeyState::Fly_Change;
+                    }
                 }
+                break;
+
 
                 case KEY_DELETE:
                     if ( !rSh.HasReadonlySel() || rSh.CursorInsideInputField())
@@ -1968,7 +1990,7 @@ KEYINPUT_CHECKTABLE:
                     {
                         eFlyState = SwKeyState::Fly_Change;
                         nDir = MOVE_RIGHT_BIG;
-                        break;
+                        goto KEYINPUT_CHECKTABLE_INSDEL;
                     }
                 case KEY_TAB:
                 {


More information about the Libreoffice-commits mailing list