summaryrefslogtreecommitdiff
path: root/svx/source/editeng/impedit2.cxx
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2000-11-20 10:53:50 +0000
committerMalte Timmermann <mt@openoffice.org>2000-11-20 10:53:50 +0000
commitc41853c90dd188acf3df76c7d5e386e479354a08 (patch)
tree3678332f7438d575bd0c863cc7d83a63c5fbdd52 /svx/source/editeng/impedit2.cxx
parentd49a191d1639cb05c698302fe0da470f82928ba6 (diff)
Start vertical writing
Diffstat (limited to 'svx/source/editeng/impedit2.cxx')
-rw-r--r--svx/source/editeng/impedit2.cxx31
1 files changed, 24 insertions, 7 deletions
diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx
index 5c5bd8922069..14448011b187 100644
--- a/svx/source/editeng/impedit2.cxx
+++ b/svx/source/editeng/impedit2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impedit2.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: mt $ $Date: 2000-11-07 18:25:29 $
+ * last change: $Author: mt $ $Date: 2000-11-20 11:53:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -976,12 +976,33 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE
BOOL bCtrl = rKeyEvent.GetKeyCode().IsMod1() ? TRUE : FALSE;
- switch ( rKeyEvent.GetKeyCode().GetCode() )
+ USHORT nCode = rKeyEvent.GetKeyCode().GetCode();
+
+ if ( IsVertical() )
+ {
+ switch ( nCode )
+ {
+ case KEY_UP: nCode = KEY_LEFT;
+ break;
+ case KEY_DOWN: nCode = KEY_RIGHT;
+ break;
+ case KEY_LEFT: nCode = KEY_DOWN;
+ break;
+ case KEY_RIGHT: nCode = KEY_UP;
+ break;
+ }
+ }
+
+ switch ( nCode )
{
case KEY_UP: aPaM = CursorUp( aPaM, pEditView );
break;
case KEY_DOWN: aPaM = CursorDown( aPaM, pEditView );
break;
+ case KEY_LEFT: aPaM = bCtrl ? WordLeft( aPaM ) : CursorLeft( aPaM );
+ break;
+ case KEY_RIGHT: aPaM = bCtrl ? WordRight( aPaM ) : CursorRight( aPaM );
+ break;
case KEY_HOME: aPaM = bCtrl ? CursorStartOfDoc() : CursorStartOfLine( aPaM );
break;
case KEY_END: aPaM = bCtrl ? CursorEndOfDoc() : CursorEndOfLine( aPaM );
@@ -990,10 +1011,6 @@ EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pE
break;
case KEY_PAGEDOWN: aPaM = bCtrl ? CursorEndOfDoc() : PageDown( aPaM, pEditView );
break;
- case KEY_LEFT: aPaM = bCtrl ? WordLeft( aPaM ) : CursorLeft( aPaM );
- break;
- case KEY_RIGHT: aPaM = bCtrl ? WordRight( aPaM ) : CursorRight( aPaM );
- break;
}
if ( aOldPaM != aPaM )