Steps to reproduce: 1. Create new empty writer document; 2. Press Ctrl+F2, switch to Functions tab, select Input Field, enter "test" (w/o quotes) in Reference, press Insert; 3. Enter any text in Input Field query window, press OK (or Ctrl+Enter); 4. Close in Fields window (not required, for the convenience); 5. Set cursor in front of the input field (press Home), press Enter for the new line. Current behavior: input field duplicated to the new line Expected behavior: newline inserted before the input field Operating System: Windows XP Last worked in: 4.1.3.2 release
tested under Win7 64bit reproducible in LibO 4.2.0.4 and 4.3alpha 31 jan build not reproducible in LibO 4.1.4.2, hence regression. I add Writer expert to CC list.
Hmm, not reproducable here on master 1d9d11c6e596365c66f756e8f62f0fcfb32b3b88 from 2013-03-19. Can you please recheck if this still happens on master?
(daily builds are available from http://dev-builds.libreoffice.org/daily/ )
Whoops, it _is_ reproducable on master (and on 4.2.3~rc1). I selected "placeholder" instead of "input field" in the functions tab.
Created attachment 96237 [details] possible fix So attached patch does fix the issue, but it very lowlevel. Cutting out something with zero length should be a noop in general, but it still does stuff -- even though I cant imagine it does something sensible. Now it might very well be that something using the cut implementation depends (or works around) on any funky behavior cutting nothing has and would cause trouble if this patch is applied. Running subsequentcheck/slowcheck/unitcheck on this right now to see if there are any obvious issues with this.
Bjoern Michaelsen committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=31b76e83d70718c95ac7913469629ea2c0294bfe fdo#74981: cutting nothing should do nothing, should fix field dupes The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Patched on master and review request for LibreOffice 4.2 at: https://gerrit.libreoffice.org/#/c/8730/
Bjoern Michaelsen committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f384598d8eec91c3c0f84a07ff3e59b8e3e13b3f&h=libreoffice-4-2 fdo#74981: cutting nothing should do nothing, should fix field dupes It will be available in LibreOffice 4.2.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Bjoern Michaelsen committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8bf22e7fe67b3321e2b2dcc8fb98882ef0eef4ca related fdo#74981: add a unittest for kicks The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a1718045bd6218e07caebda7c4cacdcb853eabd3 fdo#74981: sw: fix input field handling when splitting paragraphs It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5152c52de76bc650cceb6fcf2fce060b3e765f86&h=libreoffice-4-4 fdo#74981: sw: fix input field handling when splitting paragraphs It will be available in 4.4.0.0.beta3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.