diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-25 14:23:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-26 05:41:30 +0000 |
commit | cbe78f817da8db78d226b3ad2b1a10d0c2dcf188 (patch) | |
tree | 5af79207ce98d3249c4ffeeece6fbf41584591d4 /sw/source/uibase/wrtsh | |
parent | 31eda69d6b65f224209a100f3ed0801a5c305e1b (diff) |
tdf#100051 Partially revert "loplugin:constantparam in sw"
This partially reverts commit 9585c8b8c8d8724cc1bad4a2060c828c15599929.
Instead of removing the nCount parameters, make use of them in
SwXTextViewCursor::go{Left,Right,Down,Up}.
For the following testcase: a document with 1000 lines, and calling
goDown(1000, true) the spent time goes from 4 secs to 1.8 secs with this
for me.
Change-Id: I10351a6dbaa6d3fff883520c85701f60b05b4873
Reviewed-on: https://gerrit.libreoffice.org/25450
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/uibase/wrtsh')
-rw-r--r-- | sw/source/uibase/wrtsh/move.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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 ) |