summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-05-03 11:39:37 +0200
committerMichael Stahl <mstahl@redhat.com>2016-05-03 11:41:04 +0200
commit39d719a80d8c87856c84e3ecd569d45fa6f8a30e (patch)
tree4ee236efd7daf215492c165ccab32cef3ca59b89
parent20ae3d14187dacce2c2a1d2eab389e6110fe8442 (diff)
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
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index e9e586cdfe3d..0b5ef6d1cdff 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1185,9 +1185,6 @@ bool SwFieldMgr::InsertField(
new SwInputField( pTyp, rData.m_sPar1, rData.m_sPar2, nSubType|nsSwExtendedSubType::SUB_INVISIBLE, nFormatId);
pField = pInpField;
}
-
- // start dialog
- pCurShell->StartInputFieldDlg(pField, false, rData.m_pParent);
break;
}
@@ -1329,6 +1326,14 @@ bool SwFieldMgr::InsertField(
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)
pCurShell->UpdateExpFields(true);