Issue 18823 - Hyperlink Document Targets not updated
Summary: Hyperlink Document Targets not updated
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC3
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: jack.warchold
QA Contact: issues@sw
URL: http://www.oooforum.org/forum/viewfor...
Keywords:
: 18824 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-08-29 17:06 UTC by goa103
Modified: 2013-08-07 14:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description goa103 2003-08-29 17:06:22 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.
Comment 1 mci 2003-09-11 15:57:24 UTC
*** Issue 18824 has been marked as a duplicate of this issue. ***
Comment 2 jack.warchold 2004-02-16 11:41:24 UTC
reassigend to jw
Comment 3 jack.warchold 2004-02-17 14:04:16 UTC
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
Comment 4 goa103 2004-02-18 19:24:26 UTC
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.
Comment 5 jack.warchold 2004-02-27 14:47:35 UTC
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
Comment 6 Oliver Specht 2004-03-15 07:56:45 UTC
.
Comment 7 goa103 2004-05-26 10:13:44 UTC
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...
Comment 8 Oliver Specht 2004-06-09 11:30:57 UTC
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.
Comment 9 Oliver Specht 2004-06-18 12:02:52 UTC
:
Comment 10 Oliver Specht 2004-06-18 12:07:00 UTC
cws swqbugfixes02 can be found on so-cwsserv06
Comment 11 Oliver Specht 2004-06-18 12:07:35 UTC
.
Comment 12 jack.warchold 2004-06-22 16:15:40 UTC
verified on CWS swqbugfixes02
Comment 13 jack.warchold 2004-09-08 13:19:44 UTC
seen good in src680_m51-3
closing