Created attachment 115028 [details] Copy crashes writer in 4.4 In writer 4.4 the document attached crashes if you highlight the whole of the text and copy. In 4.3.6 it does not.
This began (on master) at the below commit. Adding Cc: to mstahl@redhat.com; Could you possibly take a look at this one? Thanks commit 7a12360e1f2c0a5bc0927131a750740d35cfd1ab Author: Michael Stahl <mstahl@redhat.com> AuthorDate: Wed Dec 10 14:56:27 2014 +0100 Commit: Michael Stahl <mstahl@redhat.com> CommitDate: Wed Dec 10 16:22:17 2014 +0100 sw: don't assert when SwXBookmark creates duplicate CrossRef*Bookmark The bugdoc of fdo#87110 has a couple such duplicates. Check for it and let SwXBookmark throw an IllegalArgumentException. Change-Id: I460dc3a8d9c554c194a32a73526e13422ddd1c52
The document contains 2 cross-reference bookmarks on the same paragraph: <text:h text:style-name="P178" text:outline-level="3"> <text:bookmark-start text:name="__RefHeading__10798_1597553411"/> <text:bookmark-start text:name="__RefHeading___Toc394995642"/> <text:soft-page-break/> <text:span text:style-name="T29">3</text:span> <text:span text:style-name="T26">. <text:s text:c="2"/></text:span> <text:span text:style-name="T21">Objectives</text:span> <text:bookmark-end text:name="__RefHeading__10798_1597553411"/> <text:bookmark-end text:name="__RefHeading___Toc394995642"/> </text:h> the check in 7a12360e1f2c0a5bc0927131a750740d35cfd1ab should refuse to insert the second duplicate bookmark, but it does not detect the problem because it uses the Point, not the Start of the cursor to check, while the CrossRefBookmark class then discards the Point and uses the Start. subsequently this crashes when copying the duplicate bookmarks to the clipboard, because by then there is no extent anymore. 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=9d0c51daea67104349cac26de9839afa8baeb099 tdf#90808: sw: fix detection of duplicate CrossRefBookmarks It will be available in 5.0.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.
Please backport.
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=277945413e8f8ba0573be143db877007f8517221&h=libreoffice-4-4 tdf#90808: sw: fix detection of duplicate CrossRefBookmarks It will be available in 4.4.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.
Varun committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f8db2d7533785b89a149e7879d7a3c1909d41e6b Add test for tdf#90808 duplicate CrossRefBookmarks It will be available in 5.1.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.
please see comment https://bugs.documentfoundation.org/show_bug.cgi?id=94804#comment8
Migrating Whiteboard tags to Keywords: (bibisected) [NinjaEdit]