summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx28
-rw-r--r--sw/source/uibase/inc/edtwin.hxx5
2 files changed, 25 insertions, 8 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 9d947f235f38..22458d77b710 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1454,12 +1454,28 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
if( ( bVertText && ( !bTableCursor || bVertTable ) ) ||
( bTableCursor && bVertTable ) )
{
- // Attempt to integrate cursor travelling for mongolian layout does not work.
- // Thus, back to previous mapping of cursor keys to direction keys.
- if( KEY_UP == nKey ) nKey = KEY_LEFT;
- else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT;
- else if( KEY_LEFT == nKey ) nKey = KEY_DOWN;
- else /* KEY_RIGHT == nKey */ nKey = KEY_UP;
+ SvxFrameDirection eDirection = rSh.GetTextDirection();
+ if (eDirection == SvxFrameDirection::Vertical_LR_BT)
+ {
+ // Map from physical to logical, so rotate clockwise.
+ if (KEY_UP == nKey)
+ nKey = KEY_RIGHT;
+ else if (KEY_DOWN == nKey)
+ nKey = KEY_LEFT;
+ else if (KEY_LEFT == nKey)
+ nKey = KEY_UP;
+ else /* KEY_RIGHT == nKey */
+ nKey = KEY_DOWN;
+ }
+ else
+ {
+ // Attempt to integrate cursor travelling for mongolian layout does not work.
+ // Thus, back to previous mapping of cursor keys to direction keys.
+ if( KEY_UP == nKey ) nKey = KEY_LEFT;
+ else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT;
+ else if( KEY_LEFT == nKey ) nKey = KEY_DOWN;
+ else /* KEY_RIGHT == nKey */ nKey = KEY_UP;
+ }
}
if ( rSh.IsInRightToLeftText() )
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index 0f63aa229884..abb7f4cd68a4 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -56,12 +56,13 @@ enum class SdrHitKind;
To translate the pixel positions from the buffer OutputDevice to the real
pixel positions, use the PixelToLogic methods of this class.
*/
-class SwEditWin final : public vcl::Window,
+class SW_DLLPUBLIC SwEditWin final : public vcl::Window,
public DropTargetHelper, public DragSourceHelper
{
static QuickHelpData* m_pQuickHlpData;
- static long m_nDDStartPosX, m_nDDStartPosY;
+ static long m_nDDStartPosX;
+ static long m_nDDStartPosY;
Color m_aWaterCanTextColor; // text color; for the watering can
Color m_aWaterCanTextBackColor; // text background; for the watering can