Bug 95526 - Multi-line hyperlinks handled wrong
Summary: Multi-line hyperlinks handled wrong
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other All
: medium normal
Assignee: Armin Le Grand
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyperlink
  Show dependency treegraph
 
Reported: 2015-11-02 14:49 UTC by Jan-Marek Glogowski
Modified: 2017-09-21 08:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Text box with broken link handling (8.99 KB, application/odt)
2015-11-02 14:49 UTC, Jan-Marek Glogowski
Details
Broken link handling in Impress (12.89 KB, application/vnd.oasis.opendocument.presentation)
2015-11-02 14:51 UTC, Jan-Marek Glogowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2015-11-02 14:49:55 UTC
Created attachment 120205 [details]
Text box with broken link handling

If you add multi hyperlinks to an impress slide, where the first link is wrapped multiple lines, further links are assigned "off-by-one".

This means that for the attached document, the second links target is actually assigned to the wrapped part of the first link and the second link is not handled as a link at all.

Same happens for wrapped links in writers text boxes.
Comment 1 Jan-Marek Glogowski 2015-11-02 14:51:16 UTC
Created attachment 120206 [details]
Broken link handling in Impress
Comment 2 raal 2015-11-06 12:36:34 UTC
I can confirm with LO 5.0.2.2 and Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89)
win7
Comment 3 Juergen Funk (CIB) 2016-01-25 15:02:48 UTC
I have found more problems in this case (tested only in writer)

Always in the Textfield
1. When i insert in the attached "Text box with broken links handling" the 
   link  https://wiki.documentfoundation.orgCoreHacks
   #OOXML_export_and_import_of_Impress_text_fields then the text break at 
   the end of the Textfield is wrong (overwritten).

2. The tooltip (CTRL+Click to follow link: --link--) is missing.

3. Over menu: Insert->Hyperlink... in the Dialog you can set a text for the 
   Target, then the given text is show, but it is no as a link recognizable.

The other question is, why when the Textfield in edit modus, the links always show in one line and cut at the end of textfield. 
But when you leave the edit mode then the links breaks in two or more lines?!

This problem is in Textfield and Document the same, when you insert (copy or typing) a link and do not enter or space at the end, then the link would not be identified as a link, because the enter or the space existing.
Comment 4 Juergen Funk (CIB) 2016-01-25 15:27:41 UTC
In the ParaPortion is the content of the Textfield, but the links always with one line. 
The test is to scan this ParaPortion and then it is wrong when the link need more as one lines.
The question is here what is wrong, the test of the ParaPortion or the content of the ParaPortion, and why is a diffrent between the edit modus and show mode? 




Hints:
For point 2 in comment:3
 in sw/source/uibase/docvw/edtwin2.cxx
 in line 145: if( rsh.GetContentAtPos( aPos, aContentAtPos, false, &aFieldRect ) )
 should be tested of TextField with  rsh.IsObjSelectable( rLpt )
 
For point 3 in comment:3
 in svx/source/svdraw/svdview.cxx:
 in line 459: bool bTEHit(pPV &&
                  SdrObjectPrimitiveHit(*pTextObj, aLocalLogicPosition, 0, *pPV,
                   &pPV->GetVisibleLayers(), true));
in this case get '''false'''.
Comment 5 QA Administrators 2017-03-06 14:47:04 UTC Comment hidden (obsolete, spam)
Comment 6 Jan-Marek Glogowski 2017-03-10 11:22:43 UTC
The bug still exists on master (AKA 5.4 ATM).