Kaydet (Commit) 63947810 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Caolán McNamara

convert FN_PARAM_MOVE_COUNT from SfxInt16 to SfxInt32

so that we can convert surrounding code from xub_StrLen to sal_Int32

Change-Id: Ib779c82a71405f855cfe72bcde2511e8153445f0
Reviewed-on: https://gerrit.libreoffice.org/6896Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2fbf95f5
......@@ -1947,7 +1947,7 @@ SfxVoidItem FrameDialog FN_FORMAT_FRAME_DLG
//--------------------------------------------------------------------------
SfxBoolItem GoDown FN_LINE_DOWN
(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
(SfxInt32Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
[
/* flags: */
AutoUpdate = FALSE,
......@@ -1972,7 +1972,7 @@ SfxBoolItem GoDown FN_LINE_DOWN
//--------------------------------------------------------------------------
SfxBoolItem GoLeft FN_CHAR_LEFT
(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
(SfxInt32Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
[
/* flags: */
AutoUpdate = FALSE,
......@@ -1997,7 +1997,7 @@ SfxBoolItem GoLeft FN_CHAR_LEFT
//--------------------------------------------------------------------------
SfxBoolItem GoRight FN_CHAR_RIGHT
(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
(SfxInt32Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
[
/* flags: */
AutoUpdate = FALSE,
......@@ -3222,7 +3222,7 @@ SfxVoidItem GoToStartOfPrevPageSel FN_START_OF_PREV_PAGE_SEL
//--------------------------------------------------------------------------
SfxBoolItem GoUp FN_LINE_UP
(SfxInt16Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
(SfxInt32Item Count FN_PARAM_MOVE_COUNT,SfxBoolItem Select FN_PARAM_MOVE_SELECTION)
[
/* flags: */
AutoUpdate = FALSE,
......
......@@ -197,7 +197,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
const SfxPoolItem* pSelectionItem;
sal_Bool bInsert = sal_False;
xub_StrLen nInsert = 0;
sal_Int32 nInsert = 0;
// The old item is for unknown reasons back in the set again.
if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pSelectionItem) )
......@@ -215,7 +215,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
aReq.Done();
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
aReq1.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nInsert) );
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_True) );
aReq1.Done();
}
......@@ -234,7 +234,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
if(bInsert)
{
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
aReq1.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nInsert) );
aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_False) );
aReq1.Done();
rWrtSh.SwapPam();
......
......@@ -48,12 +48,12 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
GetView().GetEditWin().FlushInBuffer();
const SfxItemSet *pArgs = rReq.GetArgs();
sal_Bool bSelect = sal_False;
sal_uInt16 nCount = 1;
sal_Int32 nCount = 1;
if(pArgs)
{
const SfxPoolItem *pItem;
if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, sal_True, &pItem))
nCount = ((const SfxInt16Item *)pItem)->GetValue();
nCount = ((const SfxInt32Item *)pItem)->GetValue();
if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, sal_True, &pItem))
bSelect = ((const SfxBoolItem *)pItem)->GetValue();
}
......@@ -69,14 +69,14 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
GetView().GetViewFrame()->GetBindings().GetRecorder();
if ( xRecorder.is() )
{
rReq.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nCount) );
rReq.AppendItem( SfxInt32Item(FN_PARAM_MOVE_COUNT, nCount) );
rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) );
}
sal_uInt16 nSlot = rReq.GetSlot();
rReq.Done();
// Get EditWin before calling the move functions (shell change may occur!)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
for( sal_uInt16 i = 0; i < nCount; i++ )
for( sal_Int32 i = 0; i < nCount; i++ )
{
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