diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 28 | ||||
-rw-r--r-- | sw/source/uibase/inc/edtwin.hxx | 5 |
4 files changed, 30 insertions, 10 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 18b2d348e5c0..8d36a0e9e6f7 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3276,7 +3276,8 @@ SvxFrameDirection SwCursorShell::GetTextDirection( const Point* pPt ) const bool SwCursorShell::IsInVerticalText( const Point* pPt ) const { const SvxFrameDirection nDir = GetTextDirection( pPt ); - return SvxFrameDirection::Vertical_RL_TB == nDir || SvxFrameDirection::Vertical_LR_TB == nDir; + return SvxFrameDirection::Vertical_RL_TB == nDir || SvxFrameDirection::Vertical_LR_TB == nDir + || nDir == SvxFrameDirection::Vertical_LR_BT; } bool SwCursorShell::IsInRightToLeftText() const diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 2ef8b3400a85..56c20dc229d0 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1993,7 +1993,9 @@ SvxFrameDirection SwContentNode::GetTextDirection( const SwPosition& rPos, { if ( pFrame->IsVertical() ) { - if ( pFrame->IsRightToLeft() ) + if (pFrame->IsVertLRBT()) + nRet = SvxFrameDirection::Vertical_LR_BT; + else if (pFrame->IsRightToLeft()) nRet = SvxFrameDirection::Vertical_LR_TB; else nRet = SvxFrameDirection::Vertical_RL_TB; 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 |