Kaydet (Commit) 39d719a8 authored tarafından Michael Stahl's avatar Michael Stahl

tdf#99529 sw: don't pop up input field dialog before inserting field

The dialog calls SwEditShell::UpdateFields(), so if there is already
a existing field at the current cursor position it will be "updated"
before the new field is inserted.

Change-Id: I8ddbbe00534950759781a1ce8d0dca0376663462
üst 20ae3d14
...@@ -1185,9 +1185,6 @@ bool SwFieldMgr::InsertField( ...@@ -1185,9 +1185,6 @@ bool SwFieldMgr::InsertField(
new SwInputField( pTyp, rData.m_sPar1, rData.m_sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId); new SwInputField( pTyp, rData.m_sPar1, rData.m_sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
pField = pInpField; pField = pInpField;
} }
// start dialog
pCurShell->StartInputFieldDlg(pField, false, rData.m_pParent);
break; break;
} }
...@@ -1329,6 +1326,14 @@ bool SwFieldMgr::InsertField( ...@@ -1329,6 +1326,14 @@ bool SwFieldMgr::InsertField(
pCurShell->Insert( *pField ); pCurShell->Insert( *pField );
if (TYP_INPUTFLD == rData.m_nTypeId)
{
// start dialog, not before the field is inserted tdf#99529
pCurShell->Left(CRSR_SKIP_CHARS,
false, (INP_VAR == (nSubType & 0xff)) ? 1 : 2, false );
pCurShell->StartInputFieldDlg(pField, false, rData.m_pParent);
}
if(bExp && bEvalExp) if(bExp && bEvalExp)
pCurShell->UpdateExpFields(true); pCurShell->UpdateExpFields(true);
......
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