Bug 89468 - Automatic hyperlink creation to file system does not work as expected when editing existing text
Summary: Automatic hyperlink creation to file system does not work as expected when ed...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyperlink-Calc
  Show dependency treegraph
 
Reported: 2015-02-19 11:22 UTC by pb
Modified: 2024-05-03 03:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pb 2015-02-19 11:22:48 UTC
If a cell contains text that can be parsed as a file path or url, and the user opens a dialog for creating a hyperlink, automatically populate the dialog with default values based on contents of cell.

Similarly, create a method whereby this can be applied to a set of cells that have been selected.
Comment 1 raal 2015-02-20 08:14:46 UTC
Hello,
please provide example. Works form me with string in cell "https://bugs.documentfoundation.org/show_bug.cgi?id=89468" and LO 4.4.0.3

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested information is provided.
Comment 2 pb 2015-02-20 21:05:23 UTC
I am using 4.4.0.1 on win 7 64bit.  Help claims this is "up to date," so I do not immediately see how to test this with v 4.4.0.3.

However, I now see that if I type a file path into a blank spreadsheet, it does automatically convert it into a link.  (I am not sure like that as a default behavior, but that is a different issue.)  So, the problem does not occur in that context.

HOWEVER, the original problem I observed occurred with values that came from a CSV file that had been exported by another app.

If, instead of typing in a path, I insert a path by pasting from the clipboard, my original bug persists -- the path is not automatically converted to a link upon pasting, and additionally the link dialog does not fill in any fields when summoned.

(Also, I discovered another bug:  once LO has decided that something is a hyperlink, there is no obvious way to edit it;  one can only delete it.  Since I have not checked if this was previously reported, you can save me some searching effort if you happen to know whether this uneditability has been previously reported.)
Comment 3 pb 2015-02-20 21:08:21 UTC
I should clarify that the pasting I am referring to is pasting text that has been put into the clipboard by another app (in my case, emacs).  If I copy the link from calc itself, there is no problem.

(In reply to pb from comment #2)
> I am using 4.4.0.1 on win 7 64bit.  Help claims this is "up to date," so I
> do not immediately see how to test this with v 4.4.0.3.
> 
> However, I now see that if I type a file path into a blank spreadsheet, it
> does automatically convert it into a link.  (I am not sure like that as a
> default behavior, but that is a different issue.)  So, the problem does not
> occur in that context.
> 
> HOWEVER, the original problem I observed occurred with values that came from
> a CSV file that had been exported by another app.
> 
> If, instead of typing in a path, I insert a path by pasting from the
> clipboard, my original bug persists -- the path is not automatically
> converted to a link upon pasting, and additionally the link dialog does not
> fill in any fields when summoned.
> 
> (Also, I discovered another bug:  once LO has decided that something is a
> hyperlink, there is no obvious way to edit it;  one can only delete it. 
> Since I have not checked if this was previously reported, you can save me
> some searching effort if you happen to know whether this uneditability has
> been previously reported.)
Comment 4 pb 2015-02-20 21:43:26 UTC
I just noticed there is also another dimension to this bug.

If I type the text "/tmp" or "\tmp" (not including the quotes), calc treats this as straight text.

If I then go into that cell, and edit the contents to become "C:\tmp" or"C:\tmp", calc now decides that only the "C:\" or "C:/" is a link, and ignores the remaining text as far as the link target is concerned.

In such a case the entire "C:/tmp" should become the link target.  That is really a bug, not an enhancement.


In addition, as far as enhancements are concerned, it might also be useful if the link dialog pre-filled appropriate fields with the content of a text cell, since it is possible that the user will want this text to be part of the link target path.
Comment 5 raal 2015-02-21 08:43:08 UTC
(In reply to pb from comment #4)
> I just noticed there is also another dimension to this bug.
> 
> If I type the text "/tmp" or "\tmp" (not including the quotes), calc treats
> this as straight text.
> 
> If I then go into that cell, and edit the contents to become "C:\tmp"
> or"C:\tmp", calc now decides that only the "C:\" or "C:/" is a link, and
> ignores the remaining text as far as the link target is concerned.
> 

I wrote C:\tmp  into cell and whole "C:\tmp" is recognized as link. When I click on icon hyperlink I can see 
path: file:///C:/tmp
text : C:\tmp
so path correctly converted into hyperlink.

Version: 4.5.0.0.alpha0+
Build ID: 52b25c1adf3a70819aea2080b0ad50a14a3c104b
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-02-17_03:10:47
Comment 6 pb 2015-02-21 18:47:23 UTC
(In reply to raal from comment #5)
> (In reply to pb from comment #4)
> > I just noticed there is also another dimension to this bug.
> > 
> > If I type the text "/tmp" or "\tmp" (not including the quotes), calc treats
> > this as straight text.
> > 
> > If I then go into that cell, and edit the contents to become "C:\tmp"
> > or"C:\tmp", calc now decides that only the "C:\" or "C:/" is a link, and
> > ignores the remaining text as far as the link target is concerned.
> > 
> 
> I wrote C:\tmp  into cell and whole "C:\tmp" is recognized as link. When I
> click on icon hyperlink I can see 
> path: file:///C:/tmp
> text : C:\tmp
> so path correctly converted into hyperlink.
> 
> Version: 4.5.0.0.alpha0+
> Build ID: 52b25c1adf3a70819aea2080b0ad50a14a3c104b
> TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time:
> 2015-02-17_03:10:47

Sorry, you don't seem to understand what I was trying to say.
How to reproduce:

1.  Type "/tmp" into cell and hit return, exiting the cell.
2.  Observe that calc does not consider this to be a link.
3.  Enter the cell, move cursor to beginning of text in cell, before all of "/tmp", making sure there is no selection that will be clobbered by typing.
4.  Type "C:", and exit the cell.
5.  Cell text now says "C:/tmp".
6.  Only "C:" is highlighted as a link.
7.  Tooltip indicates this link wants to open "file:///c:/".
8.  The desired behavior would be to open "file:///c:/tmp".
Comment 7 pb 2015-02-21 18:49:11 UTC
(In reply to raal from comment #1)
> Hello,
> please provide example. Works form me with string in cell
> "https://bugs.documentfoundation.org/show_bug.cgi?id=89468" and LO 4.4.0.3
> 
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' once the requested information is provided.

Although you replied to the additional dimension of the bug, you did not indicate whether you are able to confirm the original bug being reported, namely that pasting a path that was put into the clipboard as pure text, for example from notepad, fails to be noticed as a link.
Comment 8 pb 2015-02-21 19:07:31 UTC
I have escalated this from enhancement to bug.  Originally, I thought there was a functionality that was not provided but should be.  However, now I see that an attempt is made to provide this functionality, but it is buggy, hence this is a bug.
Comment 9 Buovjaga 2015-03-03 17:13:32 UTC
(In reply to pb from comment #6)
> 1.  Type "/tmp" into cell and hit return, exiting the cell.
> 2.  Observe that calc does not consider this to be a link.
> 3.  Enter the cell, move cursor to beginning of text in cell, before all of
> "/tmp", making sure there is no selection that will be clobbered by typing.
> 4.  Type "C:", and exit the cell.
> 5.  Cell text now says "C:/tmp".
> 6.  Only "C:" is highlighted as a link.
> 7.  Tooltip indicates this link wants to open "file:///c:/".
> 8.  The desired behavior would be to open "file:///c:/tmp".

Reproduced in 4.5 alpha.
I guess this is somehow not the default behaviour, as I could not get C:\temp to become a hyperlink at all in my 4.4 install.

Win 7 Pro 64-bit Version: 4.5.0.0.alpha0+
Build ID: 7c0eb12009496a35c927cd5b2520f9c34d50860b
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-03-03_10:52:12
Locale: fi_FI
Comment 10 pb 2015-03-03 19:59:46 UTC
Thank you for confirming.

Please also note the following:

1.  To my knowledge, I have not done anything to alter the default behavior, so I'm not sure why you do not see at least correct behavior when typing in an entire path string de novo.  To be clear:  if I enter a blank cell, and type into it "c:\temp"  or "c:/temp", calc recognizes this as a link.  I believe this is what raal did and found it to work.

2.  In addition to the bug that you confirmed, there is a related bug, which is that if you paste from the clipboard, when the clipboard contains plain text that was copied to there from another app, such as notebook, the pasted text will not be recognized as a link.

3.  Another facet of that bug is that if a CSV file that is being imported contains text fields that should be parsed as links, that does not occur.

4.  And, finally, for the benefit of anyone who happens to discover this bug report when trying to figure out how to work around this issue when they might have a large number of links that should be but are not links, there is a simple, if not ideal, workaround:  Create a new column (or row, depending on layout), and insert the formula "hyperlink(<url-or-filepath-cell>, <display-text-cell-or-string>)".  This can easily be propagated to multiple cells by copying.
Comment 11 QA Administrators 2016-11-08 11:35:57 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2020-10-27 04:25:57 UTC Comment hidden (obsolete)
Comment 13 Buovjaga 2022-05-03 16:20:14 UTC
Still repro, adjusting summary

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 83d0f2eebae41d431d9a5bfd1a918523977752d0
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded Jumbo
Comment 14 QA Administrators 2024-05-03 03:16:53 UTC
Dear pb,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug