From 62391d51788eb5a9b72b26e25cbb42fa21b0c091 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Fri, 25 Jul 2014 15:03:39 +0200 Subject: sal_uInt16: constify and avoid temporaries Change-Id: I27a9b1c9aed70b8b16fd74bf76f5ce1941de0221 --- sw/source/uibase/shells/txtcrsr.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'sw/source/uibase/shells/txtcrsr.cxx') 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 ) { -- cgit