Bug 125622 - Add quotes parser to file Libreoffice Writer hyperlink dialog field
Summary: Add quotes parser to file Libreoffice Writer hyperlink dialog field
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyperlink-Dialog
  Show dependency treegraph
 
Reported: 2019-06-01 14:30 UTC by Alberto Cunha
Modified: 2019-06-03 11:56 UTC (History)
3 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 Alberto Cunha 2019-06-01 14:30:54 UTC
Description:
Thank you for the excellent work you´ve been doing!

If I press SHIFT + right mouse click on windows explorer, I can use an option called "copy as path" to any file I want. 

The problem is that this copy comes with quotes. Example: "C:\Users\yourname\OneDrive\TRANSCRIPTIONS\IMPORTANT DOCUMENT.odt"

It would be great LibreOffice could check if the hyperlink is quoted, and then, remove this quotes (hyperlinks are never quoted).

Steps to Reproduce:
1. On windows explorer:  SHIFT + right click on any file .
2. On windows explorer: click on "copy as path"
3. On Libreoffice Writer: press shift + K
4. On Libreoffice Writer: On hyperlink dialog, CTRL + V on URL 

Actual Results:
Hyperlink wont work because it tries to use the quotes in the URL.

Expected Results:
I would expect it to understand that quotes on first and last character should be ignored.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Dieter 2019-06-01 15:36:12 UTC
Alberto, I confirm the described behaviour. I agree, that it would be an enhancement. I add Design Team for further input.
Comment 2 Heiko Tietze 2019-06-03 09:04:36 UTC
Sounds like a useful enhancement. But probably not so easy to realize. What do you think, Eike?
Comment 3 Eike Rathke 2019-06-03 11:50:49 UTC
I don't know why you ask me, but.. those quoted file paths copied from clipboard seem to be a Windows-only problem. Other OS may use them as well (or rather single-quoted in case they contain characters that with double quotes could be interpreted by the shell) but don't copy them to the clipboard it seems. Yet other mechanisms to quote i.e. spaces in file paths exist, like /path/space\ here/file, and we certainly don't want to guess and mess around with everything. Also, file names starting and/or ending with a quote character are perfectly valid and in some cases removing them may be unwanted.

My suggestion would be to not mess around with this, or if then do it only for Windows paths in a dumb manner that looks for "C:\..." (or any other drive letter) and only then removes the quotes.
Comment 4 Heiko Tietze 2019-06-03 11:56:25 UTC
(In reply to Eike Rathke from comment #3)
> My suggestion would be to not mess around with this, or if then do it only
> for Windows paths in a dumb manner that looks for "C:\..." (or any other
> drive letter) and only then removes the quotes.

Thanks for the advice. Let's do the dumb thing for Windows only.