Kaydet (Commit) 62391d51 authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_uInt16: constify and avoid temporaries

Change-Id: I27a9b1c9aed70b8b16fd74bf76f5ce1941de0221
üst 07c00671
...@@ -86,7 +86,7 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq) ...@@ -86,7 +86,7 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
rReq.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nCount) ); rReq.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nCount) );
rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) ); rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) );
} }
sal_uInt16 nSlot = rReq.GetSlot(); const sal_uInt16 nSlot = rReq.GetSlot();
rReq.Done(); rReq.Done();
// Get EditWin before calling the move functions (shell change may occur!) // Get EditWin before calling the move functions (shell change may occur!)
SwEditWin& rTmpEditWin = GetView().GetEditWin(); SwEditWin& rTmpEditWin = GetView().GetEditWin();
...@@ -122,9 +122,8 @@ void SwTextShell::ExecMove(SfxRequest &rReq) ...@@ -122,9 +122,8 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
SwEditWin& rTmpEditWin = GetView().GetEditWin(); SwEditWin& rTmpEditWin = GetView().GetEditWin();
rTmpEditWin.FlushInBuffer(); rTmpEditWin.FlushInBuffer();
sal_uInt16 nSlot = rReq.GetSlot();
bool bRet = false; bool bRet = false;
switch ( nSlot ) switch ( rReq.GetSlot() )
{ {
case FN_START_OF_LINE_SEL: case FN_START_OF_LINE_SEL:
bRet = rSh.LeftMargin( true, false ); bRet = rSh.LeftMargin( true, false );
...@@ -175,8 +174,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq) ...@@ -175,8 +174,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer(); GetView().GetEditWin().FlushInBuffer();
sal_uInt16 nSlot = rReq.GetSlot(); switch( rReq.GetSlot() )
switch( nSlot )
{ {
case FN_START_OF_NEXT_PAGE_SEL : case FN_START_OF_NEXT_PAGE_SEL :
rSh.SttNxtPg( true ); rSh.SttNxtPg( true );
...@@ -256,8 +254,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq) ...@@ -256,8 +254,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer(); GetView().GetEditWin().FlushInBuffer();
sal_uInt16 nSlot = rReq.GetSlot(); switch ( rReq.GetSlot() )
switch ( nSlot )
{ {
case FN_NEXT_WORD_SEL: case FN_NEXT_WORD_SEL:
rSh.NxtWrd( true ); rSh.NxtWrd( true );
...@@ -311,7 +308,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq) ...@@ -311,7 +308,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
void SwTextShell::ExecMoveMisc(SfxRequest &rReq) void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
{ {
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
sal_uInt16 nSlot = rReq.GetSlot(); const sal_uInt16 nSlot = rReq.GetSlot();
bool bSetRetVal = true, bRet = true; bool bSetRetVal = true, bRet = true;
switch ( nSlot ) switch ( nSlot )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment