Issue 48566 - add "TITLE" attribute to html link <a href>
Summary: add "TITLE" attribute to html link <a href>
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.3.1
Hardware: All All
: P3 Minor with 4 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: data_loss
Depends on:
Blocks:
 
Reported: 2005-05-02 20:11 UTC by officista
Modified: 2023-01-03 09:04 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description officista 2005-05-02 20:11:53 UTC
I would be nice to have the possibility to add in html documents the attribute 
TITLE in the link field, so to have tooltips in internet explorer.
Comment 1 michael.ruess 2005-05-03 08:06:07 UTC
Reassigned to ES.
Comment 2 eric.savary 2005-05-08 22:10:44 UTC
Reassigned
Comment 3 caiot1 2005-08-05 22:44:23 UTC
.
Comment 4 ace_dent 2008-05-16 00:52:00 UTC
OpenOffice.org Issue Tracker - Feedback Request.

The Issue you raised is currently assigned to 'Requirements' pending review, but
has not been updated within the last 3 years. Please consider re-testing with
one of the latest versions of OOo, as the problem(s) may have already been
addressed. Either use the recent stable version:
http://download.openoffice.org/index.html
or consider trying the new OOo 3 BETA (still in testing):
http://download.openoffice.org/3.0beta/
 
Please report back the outcome so this Issue may be Closed or Progressed as
necessary - otherwise it may be Resolved as Invalid in the future. You may also
wish to search for (and note) any duplicates of this Issue that may have
advanced further by checking the Issue Tracker:
http://www.openoffice.org/issues/query.cgi
 
Many thanks,
Andrew
 
Cleaning-up and Closing old Issues as part of:
~ The Grand Bug Squash, pre v3 ~
http://marketing.openoffice.org/3.0/announcementbeta.html
Comment 5 officista 2008-05-16 21:35:37 UTC
still valid in 2.3.1 (cannot test 3.0 since I only have a productive PC).
therefore changed version to 2.3.1
Comment 6 anupkshah 2008-05-18 00:50:14 UTC
I confirm that this is also not implemented for 2.4
Comment 7 strellman 2009-04-17 14:59:15 UTC
Using a fresh copy of OO 3.0.1 copying html into writer and then pasting it back
into the website destroys existing hyperlink titles.  I was hoping to use it for
editing content offline for Drupal using the TinyMCE wysiwyg editor.
Comment 8 damjan 2023-01-03 07:51:32 UTC
(In reply to strellman from comment #7)
> Using a fresh copy of OO 3.0.1 copying html into writer and then pasting it
> back
> into the website destroys existing hyperlink titles.  I was hoping to use it
> for
> editing content offline for Drupal using the TinyMCE wysiwyg editor.

If hyperlink titles are getting destroyed on a round-trip, that's not an "ENHANCEMENT", that's closer to a data loss "DEFECT".
Comment 9 damjan 2023-01-03 08:59:00 UTC
The HTML image writing code in OutHTML_Image() of main/sw/source/filter/html/htmlfly.cxx fetches the current link properties like URL, name and target from a pURLItem of type SwFmtURL, defined in main/sw/inc/fmturl.hxx with these fields:

    String    sTargetFrameName; // in diesen Frame soll die URL
    String    sURL;             //Einfache URL
    String    sName;            // Name des Anchors
    ImageMap *pMap;             //ClientSide Images

    sal_Bool      bIsServerMap;     //mit der URL eine ServerSideImageMap


The HTML text writing code in OutHTML_SwFmtINetFmt() of main/sw/source/filter/html/htmlatr.cxx fetches the current link properties like URL, name and target from an instance of SwFmtINetFmt, defined in main/sw/inc/fmtinfmt.hxx with these fields:

        String msURL;                                   // die URL
        String msTargetFrame;                   // in diesen Frame soll die URL
        String msINetFmtName;
        String msVisitedFmtName;
        String msHyperlinkName;                            // Name des Links
        SvxMacroTableDtor* mpMacroTbl;
        SwTxtINetFmt* mpTxtAttr;                        // mein TextAttribut
        sal_uInt16 mnINetFmtId;
        sal_uInt16 mnVisitedFmtId;


Both of those would need to be extended to store title as well.

When the HTML is read, links are parsed in SwHTMLParser::NewAnchor(). It supports many options, but there's no title.

Fixing those would only get us to title pass-through support: being able to save the titles we loaded without losing them. If we want to expose the title through UNO, we might need new APIs, if we want to allow editing through the UI, we'd need the link editing form changed to include the title.