Created attachment 158449 [details] Bugdoc with Macro Open the attached document. Run the macro it contains. It's not possible to compare the text ranges from the bookmarks against each other, when the bookmark is in a table (or a section in a table).
throws an com.sun.star.lang.IllegalArgumentException, reproducible with: Version 3.6.7.2 (Build ID: e183d5b) AOO 4.1.5
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2b7e24334c9b9c69c1ebf03ed66a2143c6aec972 tdf#131184 Allow comparing text ranges in table with body text It will be available in 7.0.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/a2644485cee8b0e93751a2ca8911a411b07cd03f tdf#131184 Allow comparing text ranges in table with body text It will be available in 6.4.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.