Apache OpenOffice (AOO) Bugzilla – Issue 18823
Hyperlink Document Targets not updated
Last modified: 2013-08-07 14:41:36 UTC
When you use the Insert > Hyperlink dialog to insert a hyperlink, the document targets you specify are not updated when new sections (Heading style) are added to the document. It doesn't happen when you use the Navigator Drag Mode. For example you create a link in section 4.5, the link is a reference to section 2.3. When you insert a new section before section 2.3. Section 2.3 becomes section 2.4, because of the newly created section. But the link still references section 2.3, not section 2.4. If you use the Navigator Drag Mode, it won't happen. The link will reference section 2.4. Regards, Jean-Marc Molina.
*** Issue 18824 has been marked as a duplicate of this issue. ***
reassigend to jw
please install the latest OOo-release wich is 1.1.1b and try to reproduce this error. this issue will be closed on feb 27 2004 if i do not read any further comments from the issue reporter
What are the changes you made ? I installed OOo 1.1.1b and inserted 2 links : using the Insert > Hyperlink menu and by dragging and dropping a Heading from the Navigator. I exactly got the same results as before. « Insert > Hyperlink » generates the following XML : <text:a xlink:type="simple" xlink:href="#2.1.%20Heading%20B1%7Coutline"> Drag & Drop generates : <text:a xlink:type="simple" xlink:href="#2.1.Heading%20B1%7Coutline"> « %20 » is inserted between #2.1. (Numbering) and the Heading value : « Heading%20B1 ». Once again if I insert a Heading before #2.1, that new heading is numbered #2.1 and the old one, « Heading B1 », is numbered #2.2. If I click the « Dragged and Dropped » link, it works but if I click the link inserted using the menu, it jumps to the new Heading, not « Heading B1 ». So the target is lost. It doesn't work because of the extra « %20 », I tried to remove it and it worked like a charm. However I don't think keeping that system is the ideal solution. A better way would be to use a unique identifier for headings. Like using primary keys in a database to identify a new item. Each time you insert a new heading, a new id is generated. Then that id is used as a value for the hyperlink target. It would be like using bookmarks, one unique bookmark per heading.
interesting, if i follow your steps, inserting the hyperling per dialog, behave like you said inserting the hyperlink by drop method behaves strange i had 7 chapters with div subchapters.i created some links by the hyperlink dialog, than entered the 6. chapter by doping it in the document as link and entered a new 6. chapter the link always is assigned to subchapter 2.1 if if the doped link is the only one it updated the link..... reassigend to os set to new set target OOo2.0
.
As it's a major issue for me I was wondering if OS could give us some information about how he will fix this issue. I thought about a few solutions to resolve this issue but these are only tricks as I don't know anything about OOo development. For example I tried to create bookmarks using somekind of automatically incremented primary key (an integer). First time I need to add a hyperlink, I create bookmark 1, then bookmark 2... Bookmarks are created just beside the headings. I don't have tried it yet but I'm sure it's not that hard to automate the bookmark creation process but it would far more complex to override the navigator drag & drop behaviour for example, or handle headings creation, modification, deletion...
Fixed in cws swqbugfixes01 ->goa02: The hyperlinks that are created now have the same format as those from the navigator. That allows them to find a headline at first using the numbering level and position and then checks the outline text. Inserting new outlines keeps them working but changing the headline's text and position will certainly make them invalid. It's better to use cross references to jump to certain points in the document because they are not using short -living addresses like heading level/position and text. Hyperlinks cannot be updated automatically.
:
cws swqbugfixes02 can be found on so-cwsserv06
verified on CWS swqbugfixes02
seen good in src680_m51-3 closing