summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/txtcrsr.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-07-25 15:03:39 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-07-26 14:25:32 +0200
commit62391d51788eb5a9b72b26e25cbb42fa21b0c091 (patch)
tree8eae5f015c676ff4994d46f685948d9af7023e77 /sw/source/uibase/shells/txtcrsr.cxx
parent07c00671443f3f0a2e2e6c3a54c391f040e8fd2b (diff)
sal_uInt16: constify and avoid temporaries
Change-Id: I27a9b1c9aed70b8b16fd74bf76f5ce1941de0221
Diffstat (limited to 'sw/source/uibase/shells/txtcrsr.cxx')
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index 13822f5563fc..50bc83f3751f 100644
--- a/sw/source/uibase/shells/txtcrsr.cxx
+++ b/sw/source/uibase/shells/txtcrsr.cxx
@@ -86,7 +86,7 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
rReq.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nCount) );
rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) );
}
- sal_uInt16 nSlot = rReq.GetSlot();
+ const sal_uInt16 nSlot = rReq.GetSlot();
rReq.Done();
// Get EditWin before calling the move functions (shell change may occur!)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
@@ -122,9 +122,8 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
rTmpEditWin.FlushInBuffer();
- sal_uInt16 nSlot = rReq.GetSlot();
bool bRet = false;
- switch ( nSlot )
+ switch ( rReq.GetSlot() )
{
case FN_START_OF_LINE_SEL:
bRet = rSh.LeftMargin( true, false );
@@ -175,8 +174,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- sal_uInt16 nSlot = rReq.GetSlot();
- switch( nSlot )
+ switch( rReq.GetSlot() )
{
case FN_START_OF_NEXT_PAGE_SEL :
rSh.SttNxtPg( true );
@@ -256,8 +254,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- sal_uInt16 nSlot = rReq.GetSlot();
- switch ( nSlot )
+ switch ( rReq.GetSlot() )
{
case FN_NEXT_WORD_SEL:
rSh.NxtWrd( true );
@@ -311,7 +308,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- sal_uInt16 nSlot = rReq.GetSlot();
+ const sal_uInt16 nSlot = rReq.GetSlot();
bool bSetRetVal = true, bRet = true;
switch ( nSlot )
{