diff options
Diffstat (limited to 'sw/source/uibase/uno/unotxvw.cxx')
-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 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(); |