tdf#123968 sw: use inline editing for input fields for variables
commit742baabbe4d077e1ba913a7989300908f4637ac7
authorMichael Stahl <Michael.Stahl@cib.de>
Tue, 19 Mar 2019 11:29:09 +0000 (19 12:29 +0100)
committerThorsten Behrens <Thorsten.Behrens@CIB.de>
Mon, 8 Apr 2019 14:08:11 +0000 (8 16:08 +0200)
treeda1ccd9ea18d95c6aa77d74197de1140e00c4b64
parenta3881a66b8ffda4a8a89ecfc4347555e34193665
tdf#123968 sw: use inline editing for input fields for variables

* set these to RES_TXTATR_INPUTFIELD so they get a SwTextInputField
* only for string fields, the numeric ones break when editing
* SwCursorShell::CursorInsideInputField() must check type of the hint,
  not type of the field
* DocumentFieldsManager::UpdateExpFieldsImpl() is called with one field
  when it is inserted, and must expand the field into the SwTextNode then,
  and it's called when the user edits inside the field, and must *not*
  expand the field into the SwTextNode then
* SwDocUpdateField::MakeFieldList_() must iterate RES_TXTATR_INPUTFIELD
* SwEditWin::MouseButtonDown() must still pop up the edit dialog on
  double-click
* SetFieldsDirty() should check RES_TXTATR_INPUTFIELD because SwGetExp
  may depend on them
* a very odd API design: SwSetExpField::PutValue() allows to change the
  "InputFlag", which is actually used by the ODF import!
  This needs some alchemy to convert between SwTextField and
  SwTextInputField hints, see SwXTextField::TransmuteLeadToInputField().
* etc.

Change-Id: I45c471703f102ebcb04b8567f9d76c17d5a063e7
Co-authored-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-on: https://gerrit.libreoffice.org/69414
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
12 files changed:
sw/inc/crsrsh.hxx
sw/source/core/crsr/crstrvl.cxx
sw/source/core/doc/DocumentFieldsManager.cxx
sw/source/core/doc/docfld.cxx
sw/source/core/edit/edfld.cxx
sw/source/core/fields/expfld.cxx
sw/source/core/inc/unofield.hxx
sw/source/core/txtnode/atrfld.cxx
sw/source/core/unocore/unofield.cxx
sw/source/ui/fldui/fldedt.cxx
sw/source/uibase/docvw/edtwin.cxx
sw/source/uibase/shells/textfld.cxx