On 16.06.2010 15:24, Knut Olav Bøhmer wrote:
Hi,

There are some old bug related to hyperlinks with bookmark: hyperlinks to
.doc files with bookmarks does not work.

I think the following bugs are related to each other. And the bug has been
there for at least 6 years.

http://qa.openoffice.org/issues/show_bug.cgi?id=26957
http://qa.openoffice.org/issues/show_bug.cgi?id=109752
http://qa.openoffice.org/issues/show_bug.cgi?id=109752
http://qa.openoffice.org/issues/show_bug.cgi?id=109752
http://qa.openoffice.org/issues/show_bug.cgi?id=19413

Any reason why one the issues is listed three times?

Besides that, these issues are totally unrelated and it doesn't make sense to construct a general hyperlink problem that just doesn't exist. Moreover, the Calc issue was reported just a few weeks ago. It seems that nobody just is aware of it (no QA or dev engineer was involved until now).

I wasn't able to reproduce issue 19413, perhaps we should close it.

Then there is issue 26957. It seems that the bug is triggered by the fact that the URL to open is handed over to the system, not handled by OOo internally. That can't work as "#" in file URLs are not what they are in e.g. http URLs. The only solution would be *not* to let the system handle the URL (and that's the reason why it works in Word).

Here's the code in sfx2/source/appl/appopen.cxx that decides whether a URL shall be handled internally or not:

aTypeName = xTypeDetection->queryTypeByURL( aURL.Main );
SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
const SfxFilter* pFilter = rMatcher.GetFilter4EA( aTypeName );
if ( !pFilter || !( pFilter->IsOwnFormat() ))
{

Changing that is a matter of minutes, but the side effect could be larger than expected. Allowing to handle all URLs internally that OOo can open (detected by pFilter != 0 in the code above) is not wanted, as many other formats like e.g jpg, png etc. surely should preferably handled by the system and the application registered there.

Another idea: check for "#" in the URL, and in case there is one, handle the URL internally.

In the   queryDispatch method the plan was to check for
       if ((aURL.Complete.startsWith("file://") )&&
(aURL.Complete.matches(".*doc#.*") )) {
and then use loadComponentFromURL. But .doc hyperlinks never arrived here.

You can't intercept loadComponentFromURL calls with a dispatch interceptor, your only can intercept - sic! - dispatch calls.

Regards,
Mathias

--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "nospamfor...@gmx.de".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org

Reply via email to