diff options
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 1c61342daacc..c83fd07b855f 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -1006,8 +1006,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(); @@ -1024,8 +1023,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(); @@ -1620,8 +1618,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, 1, true ); + bRet = m_pView->GetWrtShell().Down( bExpand, nCount, true ); } else throw uno::RuntimeException(); @@ -1638,8 +1635,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, 1, true ); + bRet = m_pView->GetWrtShell().Up( bExpand, nCount, true ); } else throw uno::RuntimeException(); |