Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||URL containing brackets not handled properly by Autocorrect|
|Component:||code||Assignee:||AOO issues mailing list <issues>|
|Status:||CONFIRMED ---||QA Contact:|
|Priority:||P3||CC:||h.ilter, hdu, issues, michael.ruess, philipp.lohmann, stephan.bergmann.secondary|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description voschix 2008-11-24 12:40:59 UTC
If I paste an URL containing a pair of brackets into a Writer document, the auto-insertion function leaves out the closing bracket. The effect is not immediate, but when I convert the document to pdf, and then try to print the pdf with Adobe Reader (Version 8.1.3), the print fails. The Error message reads "The document could not be printed"). Example: The URL "http://en.wikipedia.org/wiki/Layers_(digital_image_editing)" gets truncated to "http://en.wikipedia.org/wiki/Layers_(digital_image_editing" This error seems to be very similar to the error 58011 reported in 2005 that was (or should have been) fixed in OOo 2.0.1
Comment 1 michael.ruess 2008-11-27 11:12:10 UTC
MRU->OS: could you please have a look whether this is a problem of the Autoformat of the Break iterator? When entering a link like www.blabla.hallo(wach) the closing bracket won't be regarded for the link formatting.
Comment 2 Oliver Specht 2008-11-27 14:27:37 UTC
->sb: AutoCorrect uses URIHelper::FindFirstURLInText()
Comment 3 Stephan Bergmann 2008-11-27 15:21:08 UTC
That the final ")" is not part of the hyperlink but just plain text is probably indeed due to URIHelper::findFirstURLInText. As greenrd2004 put it in issue 58011: "this URL was auto-recognised by OpenOffice when I pasted it, but the auto-recognising code didn't include the closing bracket (probably for good heuristic reasons, because most of the time a closing bracket in pasted text *isn't* part of a URL)." Indeed, the heuristic used to detect URLs is not (and cannot be) perfect. However, I assume the main problem of voschix (correct me if I am wrong) in this issue is that the resulting PDF document cannot be printed---which indeed looks like issue 58011. And I doubt the reason for *that* problem is the behavior of URIHelper::findFirstURLInText.
Comment 4 voschix 2008-11-27 17:22:42 UTC
I have done some more tests, using Firefox 3.0.4, Adobe Reader 8.1.3, CutePDF 2.7, Adobe Acrobat Standard 6.0. Things are getting more confused. The link with both brackets: "http://en.wikipedia.org/wiki/Layers_(digital_image_editing)" opens from OpenOffice.org Writer correctly the page â€œhttp://en.wikipedia.org/wiki/Layers_(digital_image_editing)â€ The OO.o pdf function translates this double bracket link into: â€œhttp://en.wikipedia.org/wiki/Layers_%5C(digital_image_editing%5C)â€ which opens this page from Adobe Reader: http://en.wikipedia.org/wiki/Layers_\(digital_image_editing\) The pdf prints fine from Adobe Reader. The link with the closing bracket missing (as produced by the auto-insertion function of OO.o): "http://en.wikipedia.org/wiki/Layers_(digital_image_editing" opens this page when ctrl-clicked in OO.o Writer: â€œhttp://en.wikipedia.org/wiki/Layers_(digital_image_editingâ€ The OO.o pdf function translates this single-bracket link into: â€œhttp://en.wikipedia.org/wiki/Layers_â€ which from Adobe Reader opens this page: â€œhttp://en.wikipedia.org/wiki/Layersâ€ However the pdf document that contains this link refuses to print from Adobe Reader with the unspecific error message: â€œThe document could not be printedâ€ If I use CutePDF or Acrobat Writer to create the pdf from the OO.o Writer and not the built-in pdf function the result is different: The link created in the pdf looks the same: â€œhttp://en.wikipedia.org/wiki/Layers_â€ but it prints ok from Adobe Reader.
Comment 5 Stephan Bergmann 2008-11-28 08:55:22 UTC
@hdu,pl: Wild guess is that there is some problem writing unbalanced parentheses to PDF (as at least in PostScript parentheses have special meaning---no idea whether that is true in PDF as well).