I have written a 430-page manual in Writer. It suffers from a peculiar problem: The "Target in document" window shows hundreds of nonsensical items in the "Bookmark" node of the tree. Because of these extra items, it is very difficult to spot the genuine bookmarks. A typical spurious entry looks like this: _RefHeading_xxxxx_yyyyyyyyyy Where- "_RefHeading_" text (literal) is always there. xxxxx is a five-digit random number. yyyyyyyyyyy is a ten-digit random number. HISTORY: The document used to crash very frequently in OOo (and later in LO). So I copied and pasted its chapters in separate odt file, and then created a master file to link them. At this stage, I discovered that I cannot easily insert cross-links from one chapter to another in the master. So I exported the master as a normal odt, and then broke all links to subdocuments (Edit>Links menu). The result is a 430+ page odt file. I am editing this file to insert hyperlinks. But there are too many spurious bookmarks, as described above.
Forgot to add: The spurious bookmarks appear only in the "Target in document" window: The Navigator panel shows only the genuine bookmarks. I can share the document (5 MB).
There is a related discussion at OOo forum: http://www.oooforum.org/forum/viewtopic.phtml?t=125387 That means I am not the only one to see this problem. According to this discussion, the problem is created when a document has a TOC and then if is edited+saved. Subsequently, the "Target in document" window starts showing such spurious entries. The number of the spurious entries goes on increasing with each save operation.
[Reproducible] with parallel installation of Master "LOdev " 3.7.0.0.alpha0+ - WIN7 Home Premium (64bit) ENGLISH UI [Build ID: 3985521]" (tinderbox: W2008R2@16-minimal_build, pull time 2012-06-24)
[Reproducible] with Server installation of Master "LOdev 3.6.0alpha0+ – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: 475d0c5-829fc92-39746e8-206648e-fefd87]" (2012-02-14) Bibisect might help? @Michael: Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug
P.S. Apart from preventing such spurious bookmarks, there should also be a way to delete the bookmarks that have made their way into the document.
regression in OOo 3.2, worked in OOo 3.1. now, who was refactoring bookmarks in OOo 3.2 ? it seems the difference that causes this is that SwXBookmarks::getElementNames() returns CrossRefBookmarks since CWS swrefactormarks2 df6d312ca537402463e4eb0530f22b956600fc02 while previously it did only return real bookmarks. now how do we check for crossref there...
Created attachment 65982 [details] bugdoc with TOC and headings to reproduce problem so my first question was, where the heck do we have a "Target in Document" dialog; it is in Insert->Hyperlink, then click on "Document" and then the button below "Target in document"
fixed on master, now you only get real bookmarks
/me trying to whistle innocently. @mst: Did you check those awesome half-implemented fieldmarks to be working still -- IIRC that one changed some of those bookmark iterations to suddenly include 'internal' bookmarks too to work.
Thanks for resolving that problem! BTW is it possible to REMOVE those spurious bookmarks somehow? If not, I have some good news for the LibreOffice/OpenOffice users: The latest beta version (1.4) of the extension "AltSearch" can remove them. This beta was created by the author based on my request, but it is not released as stable version yet. Unfortunately, Altsearch is not listed in LibO's extensions. (WHY???) It is available from OpenOffice extensions site, here: http://extensions.openoffice.org/en/project/AltSearch Can someone from LO arrange the rest? 1. Get Tomas to release v1.4 2. Add AltSearch to http://extensions.libreoffice.org/ Thanks. -Narayan
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5ae1369a87ddc0293f6a78ef368179b6f8e43495&g=libreoffice-3-6 fdo#51514: SwXBookmarks: only consider real bookmarks: It will be available in LibreOffice 3.6.2.
narayanaras, the _RefHeading_ bookmarks are necessary to make cross-references work, so removing them doesn't seem like a good idea; they just shouldn't be displayed as Bookmarks in the UI anywhere.
Ah! Anyway this tool can remove the offending bookmarks only temporarily: If we refresh the TOC, they come back! So that's what I did, so that I can select the valid links easily. (No permanent damage done). Thanks for the clarification. I will convey that to Tomas (the AltSearch author).
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d781d21f09542873266c97a9483fa1c6e9549889&g=libreoffice-3-5 fdo#51514: SwXBookmarks: only consider real bookmarks: It will be available in LibreOffice 3.5.7.