Problem description: EDITING: In a body of text, select a portion of text that contains an end-of-line, and then drag and drop the selection anywhere within the following paragraph. This results in duplication of text. The selection may consist of just the end-of-line of the preceding paragraph. Drop it anyuwhere within the next paragraph, including at the end, and text is duplicated. Steps to reproduce: 1. Create nine paragraphs of text (a minimum of five lines is required for testing, but more allows for the testing of a selection consisting of multiple paragraphs), i.e.: Paragraph1. Paragraph2. Paragraph3. Paragraph4. Paragraph5. Paragraph6. Paragraph7. Paragraph8. Paragraph9. 2. Select from the start of paragraph 4 to the start of paragraph 7 so that the end-of-line character of paragraph 6 is last in the selection. 3. Drag the selection and drop at the end of paragraph 7. Current behavior: Paragraphs 4 and 7 are duplicated: Paragraph1. Paragraph2. Paragraph3. Paragraph7.Paragraph4. Paragraph5. Paragraph6. Paragraph7.Paragraph4 Paragraph8. Paragraph9. Expected behavior: Paragraph 4 should only once appear appended to the end of paragraph 7: Paragraph1. Paragraph2. Paragraph3. Paragraph7.Paragraph4. Paragraph5. Paragraph6. Paragraph8. Paragraph9. The selection may also include a portion of the following paragraph. In the above example, some of paragraph 7 could be included in the selection to be dropped at the end of paragraph 7. Operating System: Windows 7 Version: 3.6.5.2 release
First observed in version 3.6.5.2 Still present in version 3.6.6.2
reproducible with LO 4.1.4.2 (Win7 Home, 64bit) If I select in addition a few characters of the "Paragraph7." I get the following strange result: Paragraph1. Paragraph2. Paragraph3. graph7.Paragraph4. Paragraph5. Paragraph6. Paragraph7.Paragraph4. !!br0ken!! Paragraph8. Paragraph9.
*** Bug 83698 has been marked as a duplicate of this bug. ***
*** Bug 82010 has been marked as a duplicate of this bug. ***
Simpler reproduction instructions as suggested by bug 83698 comment 0: 1. In a new Writer document, type "A<return>bc" 2. Select "A<return>b" 3. Drag the text after "c" using the mouse Expected result: - "cA b" Actual result: (until recently): "cA bcA !!br0ken!!" (on current dbgutil 4.5 master): Death from soffice.bin: /home/asbel/Development/LibreOffice/core/sal/rtl/strtmpl.cxx:1394: void rtl_uString_newFromSubString(rtl_uString**, const rtl_uString*, sal_Int32, sal_Int32): Assertion `false' failed.
Created attachment 113354 [details] Linux 4.5 master backtrace
Reproducing this is a little unreliable, but as near as I can tell the "!!br0ken!!" message started with the below commit. However, performing a drag and drop following the instructions in comment 5 doesn't give the correct result all the way back to 3.3, so the actual underlying bug is inherited. Adding Cc: to mstahl@redhat.com; Any chance you could take a look at this? This commit seems to have mutated an existing bug into a somewhat worse form. commit 8d25fde680beb9dafb7c9c861b5c00d1ae4f4985 Author: Michael Stahl <mstahl@redhat.com> Date: Sun Feb 17 00:14:26 2013 +0100 sw; convert SwTxtNode::m_Text to OUString Do not convert any of the 16bit index variables at this time: the enforced limit of TXTNODE_MAX should ensure that they are sufficient, and there are thousands of these variables all around sw. (also, STRING_LEN/STRING_NOTFOUND is used as a "not found" value all over the place) Change-Id: Id26a145701de731470b0bcb95359ed62d4d6d579
fixed on master
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fabc45a6a902c8988eff087831f8b2f84ea8ae6c sw: tdf#63022 fix drag-and-drop of text in same paragraph It will be available in 5.2.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-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9f0e9c7c52fe2685838cfd9f71a44105a3688d1d&h=libreoffice-5-1 sw: tdf#63022 fix drag-and-drop of text in same paragraph It will be available in 5.1.2. 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.