summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx4
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx12
-rw-r--r--sw/source/uibase/wrtsh/move.cxx8
3 files changed, 10 insertions, 14 deletions
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 5a36e7e963b3..0f8ccdaf1d47 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -191,8 +191,8 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
sal_uInt16 nCount, bool bBasicCall, bool bVisual = false );
bool Right ( sal_uInt16 nMode, bool bSelect,
sal_uInt16 nCount, bool bBasicCall, bool bVisual = false );
- bool Up ( bool bSelect, bool bBasicCall = false );
- bool Down ( bool bSelect, bool bBasicCall = false );
+ bool Up ( bool bSelect, sal_uInt16 nCount = 1, bool bBasicCall = false );
+ bool Down ( bool bSelect, sal_uInt16 nCount = 1, bool bBasicCall = false );
void NxtWrd ( bool bSelect = false ) { SimpleMove( &SwWrtShell::NxtWrd_, bSelect ); }
bool PrvWrd ( bool bSelect = false ) { return SimpleMove( &SwWrtShell::PrvWrd_, bSelect ); }
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index 2eb2f50b801f..ecbb9df8a620 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -1000,8 +1000,7 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand)
if (!IsTextSelection())
throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) );
- for( sal_uInt16 i = 0; i < nCount; i++ )
- bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, 1, true );
+ bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, nCount, true );
}
else
throw uno::RuntimeException();
@@ -1018,8 +1017,7 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand)
if (!IsTextSelection())
throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) );
- for( sal_uInt16 i = 0; i < nCount; i++ )
- bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, 1, true );
+ bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, nCount, true );
}
else
throw uno::RuntimeException();
@@ -1616,8 +1614,7 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand)
if (!IsTextSelection())
throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) );
- for( sal_uInt16 i = 0; i < nCount; i++ )
- bRet = m_pView->GetWrtShell().Down( bExpand, true );
+ bRet = m_pView->GetWrtShell().Down( bExpand, nCount, true );
}
else
throw uno::RuntimeException();
@@ -1634,8 +1631,7 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand)
if (!IsTextSelection())
throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) );
- for( sal_uInt16 i = 0; i < nCount; i++ )
- bRet = m_pView->GetWrtShell().Up( bExpand, true );
+ bRet = m_pView->GetWrtShell().Up( bExpand, nCount, true );
}
else
throw uno::RuntimeException();
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 81b9c7a2d400..7125044c7d13 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -127,7 +127,7 @@ bool SwWrtShell::Right( sal_uInt16 nMode, bool bSelect,
}
}
-bool SwWrtShell::Up( bool bSelect, bool bBasicCall )
+bool SwWrtShell::Up( bool bSelect, sal_uInt16 nCount, bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
@@ -138,10 +138,10 @@ bool SwWrtShell::Up( bool bSelect, bool bBasicCall )
}
ShellMoveCursor aTmp( this, bSelect );
- return SwCursorShell::Up();
+ return SwCursorShell::Up(nCount);
}
-bool SwWrtShell::Down( bool bSelect, bool bBasicCall )
+bool SwWrtShell::Down( bool bSelect, sal_uInt16 nCount, bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
@@ -153,7 +153,7 @@ bool SwWrtShell::Down( bool bSelect, bool bBasicCall )
}
ShellMoveCursor aTmp( this, bSelect );
- return SwCursorShell::Down();
+ return SwCursorShell::Down(nCount);
}
bool SwWrtShell::LeftMargin( bool bSelect, bool bBasicCall )